]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/distribute.c
Merge remote-tracking branch 'origin/stable/2.0'
[mirror_frr.git] / lib / distribute.c
index 2e76e352cb8ee6fc2b8653b121fe8dd6e18c2b08..7b7d49d1d6733f5d2aa4dfeb697baa940f8c1a85 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING.  If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
@@ -254,6 +253,7 @@ DEFUN (distribute_list,
        distribute_list_cmd,
        "distribute-list [prefix] WORD <in|out> [WORD]",
        "Filter networks in routing updates\n"
+       "Specify a prefix\n"
        "Access-list name\n"
        "Filter incoming routing updates\n"
        "Filter outgoing routing updates\n"
@@ -316,7 +316,9 @@ DEFUN (no_distribute_list,
        no_distribute_list_cmd,
        "no [ipv6] distribute-list [prefix] WORD <in|out> [WORD]",
        NO_STR
+       "IPv6\n"
        "Filter networks in routing updates\n"
+       "Specify a prefix\n"
        "Access-list name\n"
        "Filter incoming routing updates\n"
        "Filter outgoing routing updates\n"
@@ -524,14 +526,14 @@ distribute_list_init (int node)
   disthash = hash_create (distribute_hash_make,
                           (int (*) (const void *, const void *)) distribute_cmp);
 
-  install_element (node, &distribute_list_cmd);
-  install_element (node, &no_distribute_list_cmd);
-/*
-  install_element (RIP_NODE, &distribute_list_cmd);
-  install_element (RIP_NODE, &no_distribute_list_cmd);
-  install_element (RIPNG_NODE, &distribute_list_cmd);
-  install_element (RIPNG_NODE, &no_distribute_list_cmd);
- */
+  /* vtysh command-extraction doesn't grok install_element(node, ) */
+  if (node == RIP_NODE) {
+    install_element (RIP_NODE, &distribute_list_cmd);
+    install_element (RIP_NODE, &no_distribute_list_cmd);
+  } else if (node == RIPNG_NODE) {
+    install_element (RIPNG_NODE, &distribute_list_cmd);
+    install_element (RIPNG_NODE, &no_distribute_list_cmd);
+  }
 
   /* install v6 */
   if (node == RIPNG_NODE) {