[quagga-dev 11575] Re: [quagga-users 13801] Filtering prefixes in ripngd

John Fraizer john at op-sec.us
Fri Oct 10 22:14:16 BST 2014


Disregard the previous patch.  It seems that vtysh_cmd.c is a dynamically
generated file.  The following patch is against vtysh.c and applies cleanly.

*** ./quagga-0.99.23.1/vtysh/vtysh.c.orig       Mon Aug 25 16:56:53 2014
--- ./quagga-0.99.23.1/vtysh/vtysh.c    Fri Oct 10 20:53:31 2014
***************
*** 834,843 ****
--- 834,908 ----
        break;
      }
    return CMD_SUCCESS;
  }

+
+  /* Begin Add distribute-list and distribute-list prefix commands to RIPD
and RIPNGD */
+  /* John Fraizer <john at op-sec.us> */
+  DEFSH (VTYSH_RIPD, ripd_distribute_list_all_cmd_vtysh,
+       "distribute-list WORD (in|out)",
+       "Filter networks in routing updates\n"
+       "Access-list name\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  DEFSH (VTYSH_RIPD, ripd_no_distribute_list_all_cmd_vtysh,
+       "no distribute-list WORD (in|out)",
+       NO_STR
+       "Filter networks in routing updates\n"
+       "Access-list name\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  DEFSH (VTYSH_RIPD, ripd_distribute_list_prefix_all_cmd_vtysh,
+       "distribute-list prefix WORD (in|out)",
+       "Filter prefixes in routing updates\n"
+       "Name of an IP prefix-list\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  DEFSH (VTYSH_RIPD, ripd_no_distribute_list_prefix_all_cmd_vtysh,
+       "no distribute-list prefix WORD (in|out)",
+       NO_STR
+       "Filter prefixes in routing updates\n"
+       "Name of an IP prefix-list\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  DEFSH (VTYSH_RIPNGD, ripngd_distribute_list_all_cmd_vtysh,
+       "distribute-list WORD (in|out)",
+       "Filter networks in routing updates\n"
+       "Access-list name\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  DEFSH (VTYSH_RIPNGD, ripngd_no_distribute_list_all_cmd_vtysh,
+       "no distribute-list WORD (in|out)",
+       NO_STR
+       "Filter networks in routing updates\n"
+       "Access-list name\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  DEFSH (VTYSH_RIPNGD, ripngd_distribute_list_prefix_all_cmd_vtysh,
+       "distribute-list prefix WORD (in|out)",
+       "Filter prefixes in routing updates\n"
+       "Name of an IP prefix-list\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  DEFSH (VTYSH_RIPNGD, ripngd_no_distribute_list_prefix_all_cmd_vtysh,
+       "no distribute-list prefix WORD (in|out)",
+       NO_STR
+       "Filter prefixes in routing updates\n"
+       "Name of an IP prefix-list\n"
+       "Filter incoming routing updates\n"
+       "Filter outgoing routing updates\n")
+
+  /* End Add distribute-list and distribute-list prefix commands to RIPD
and RIPNGD */
+
  DEFUNSH (VTYSH_ALL,
         vtysh_end_all,
         vtysh_end_all_cmd,
         "end",
         "End current mode and change to enable mode\n")
***************
*** 2478,2483 ****
--- 2543,2561 ----
    install_element (CONFIG_NODE, &vtysh_password_text_cmd);
    install_element (CONFIG_NODE, &vtysh_enable_password_cmd);
    install_element (CONFIG_NODE, &vtysh_enable_password_text_cmd);
    install_element (CONFIG_NODE, &no_vtysh_enable_password_cmd);

+  /* Begin Add distribute-list and distribute-list prefix commands to RIPD
and RIPNGD */
+  /* John Fraizer <john at op-sec.us> */
+    install_element (RIP_NODE, &ripd_distribute_list_all_cmd_vtysh);
+    install_element (RIP_NODE, &ripd_no_distribute_list_all_cmd_vtysh);
+    install_element (RIPNG_NODE, &ripngd_distribute_list_all_cmd_vtysh);
+    install_element (RIPNG_NODE, &ripngd_no_distribute_list_all_cmd_vtysh);
+    install_element (RIP_NODE, &ripd_distribute_list_prefix_all_cmd_vtysh);
+    install_element (RIP_NODE,
&ripd_no_distribute_list_prefix_all_cmd_vtysh);
+    install_element (RIPNG_NODE,
&ripngd_distribute_list_prefix_all_cmd_vtysh);
+    install_element (RIPNG_NODE,
&ripngd_no_distribute_list_prefix_all_cmd_vtysh);
+  /* End Add distribute-list and distribute-list prefix commands to RIPD
and RIPNGD */
+
+
  }



--
John Fraizer
LinkedIn profile: http://www.linkedin.com/in/johnfraizer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20141010/cbbfd410/attachment-0001.html>


More information about the Quagga-dev mailing list