]> git.puffer.fish Git - mirror/frr.git/commitdiff
Merge branch 'cmaster-next' into vtysh-grammar
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 21 Oct 2016 19:49:16 +0000 (19:49 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 21 Oct 2016 19:49:16 +0000 (19:49 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
bgpd/bgp_vty.c

1  2 
bgpd/bgp_aspath.c
bgpd/bgp_route.c
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/rfapi/rfapi_vty.c
lib/json.c

Simple merge
Simple merge
diff --cc bgpd/bgp_vty.c
index b22dcfac1ef7b1a6c0b85074dc763eab4dd3d471,7884d2d503dca4d974d0ca6df0d8d04b1ef781a4..9589cde841504235bd9dfa74408ae888b50331cd
@@@ -5484,59 -5785,125 +5484,67 @@@ DEFUN (no_neighbor_maximum_prefix
         NO_STR
         NEIGHBOR_STR
         NEIGHBOR_ADDR_STR2
 -       "Maximum number of prefix accept from this peer\n")
 +       "Maximum number of prefix accept from this peer\n"
 +       "maximum no. of prefix limit\n"
 +       "Threshold value (%) at which to generate a warning msg\n"
 +       "Restart bgp connection after limit is exceeded\n"
 +       "Restart interval in minutes"
 +       "Only give warning message when limit is exceeded\n")
  {
 -  return peer_maximum_prefix_unset_vty (vty, argv[0], bgp_node_afi (vty),
 +  int idx_peer = 2;
 +  return peer_maximum_prefix_unset_vty (vty, argv[idx_peer]->arg, bgp_node_afi (vty),
                                        bgp_node_safi (vty));
  }
 - 
 -ALIAS (no_neighbor_maximum_prefix,
 -       no_neighbor_maximum_prefix_val_cmd,
 -       NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295>",
 -       NO_STR
 +
 +
 +/* "neighbor allowas-in" */
 +DEFUN (neighbor_allowas_in,
 +       neighbor_allowas_in_cmd,
-        "neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [(1-10)]",
++       "neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]",
         NEIGHBOR_STR
         NEIGHBOR_ADDR_STR2
 -       "Maximum number of prefix accept from this peer\n"
 -       "maximum no. of prefix limit\n")
 -
 -ALIAS (no_neighbor_maximum_prefix,
 -       no_neighbor_maximum_prefix_threshold_cmd,
 -       NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100>",
 -       NO_STR
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "Maximum number of prefix accept from this peer\n"
 -       "maximum no. of prefix limit\n"
 -       "Threshold value (%) at which to generate a warning msg\n")
 -
 -ALIAS (no_neighbor_maximum_prefix,
 -       no_neighbor_maximum_prefix_warning_cmd,
 -       NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> warning-only",
 -       NO_STR
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "Maximum number of prefix accept from this peer\n"
 -       "maximum no. of prefix limit\n"
 -       "Only give warning message when limit is exceeded\n")
 -
 -ALIAS (no_neighbor_maximum_prefix,
 -       no_neighbor_maximum_prefix_threshold_warning_cmd,
 -       NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> warning-only",
 -       NO_STR
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "Maximum number of prefix accept from this peer\n"
 -       "maximum no. of prefix limit\n"
 -       "Threshold value (%) at which to generate a warning msg\n"
 -       "Only give warning message when limit is exceeded\n")
 -
 -ALIAS (no_neighbor_maximum_prefix,
 -       no_neighbor_maximum_prefix_restart_cmd,
 -       NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> restart <1-65535>",
 -       NO_STR
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "Maximum number of prefix accept from this peer\n"
 -       "maximum no. of prefix limit\n"
 -       "Restart bgp connection after limit is exceeded\n"
 -       "Restart interval in minutes")
 -
 -ALIAS (no_neighbor_maximum_prefix,
 -       no_neighbor_maximum_prefix_threshold_restart_cmd,
 -       NO_NEIGHBOR_CMD2 "maximum-prefix <1-4294967295> <1-100> restart <1-65535>",
 -       NO_STR
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "Maximum number of prefix accept from this peer\n"
 -       "maximum no. of prefix limit\n"
 -       "Threshold value (%) at which to generate a warning msg\n"
 -       "Restart bgp connection after limit is exceeded\n"
 -       "Restart interval in minutes")
 -
 -/* "neighbor allowas-in" */
 -DEFUN (neighbor_allowas_in,
 -       neighbor_allowas_in_cmd,
 -       NEIGHBOR_CMD2 "allowas-in",
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "Accept as-path with my AS present in it\n")
 +       "Accept as-path with my AS present in it\n"
-        "Number of occurances of AS number\n")
++       "Number of occurances of AS number\n"
++       "Only accept my AS in the as-path if the route was originated in my AS\n")
  {
-   int idx_number = 3;
 +  int idx_peer = 1;
++  int idx_number_origin = 3;
    int ret;
+   int origin = 0;
    struct peer *peer;
-   unsigned int allow_num;
+   int allow_num = 0;
  
 -  peer = peer_and_group_lookup_vty (vty, argv[0]);
 +  peer = peer_and_group_lookup_vty (vty, argv[idx_peer]->arg);
    if (! peer)
      return CMD_WARNING;
  
-   if (argc <= idx_number)
 -  if (argc == 1)
++  if (argc <= idx_number_origin)
      allow_num = 3;
    else
-     VTY_GET_INTEGER_RANGE ("AS number", allow_num, argv[idx_number]->arg, 1, 10);
+     {
 -      if (strncmp (argv[1], "o", 1) == 0)
++      if (argv[idx_number_origin]->type == WORD_TKN)
+         origin = 1;
+       else
 -        VTY_GET_INTEGER_RANGE ("AS number", allow_num, argv[1], 1, 10);
++        allow_num = atoi (argv[idx_number_origin]->arg);
+     }
  
    ret = peer_allowas_in_set (peer, bgp_node_afi (vty), bgp_node_safi (vty),
-                            allow_num);
+                            allow_num, origin);
  
    return bgp_vty_return (vty, ret);
  }
  
 -ALIAS (neighbor_allowas_in,
 -       neighbor_allowas_in_arg_cmd,
 -       NEIGHBOR_CMD2 "allowas-in (<1-10>|origin)",
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "Accept as-path with my AS present in it\n"
 -       "Number of occurances of AS number\n"
 -       "Only accept my AS in the as-path if the route was originated in my AS\n")
 -
  DEFUN (no_neighbor_allowas_in,
         no_neighbor_allowas_in_cmd,
-        "no neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [(1-10)]",
 -       NO_NEIGHBOR_CMD2 "allowas-in",
++       "no neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]",
         NO_STR
         NEIGHBOR_STR
         NEIGHBOR_ADDR_STR2
 -       "allow local ASN appears in aspath attribute\n")
 +       "allow local ASN appears in aspath attribute\n"
-        "Number of occurances of AS number\n")
++       "Number of occurances of AS number\n"
++       "Only accept my AS in the as-path if the route was originated in my AS\n")
  {
 +  int idx_peer = 2;
    int ret;
    struct peer *peer;
  
    return bgp_vty_return (vty, ret);
  }
  
 -ALIAS (no_neighbor_allowas_in,
 -       no_neighbor_allowas_in_val_cmd,
 -       NO_NEIGHBOR_CMD2 "allowas-in (<1-10>|origin)",
 -       NO_STR
 -       NEIGHBOR_STR
 -       NEIGHBOR_ADDR_STR2
 -       "allow local ASN appears in aspath attribute\n"
 -       "Number of occurances of AS number\n"
 -       "Only accept my AS in the as-path if the route was originated in my AS\n")
--
  DEFUN (neighbor_ttl_security,
         neighbor_ttl_security_cmd,
 -       NEIGHBOR_CMD2 "ttl-security hops <1-254>",
 +       "neighbor <A.B.C.D|X:X::X:X|WORD> ttl-security hops (1-254)",
         NEIGHBOR_STR
         NEIGHBOR_ADDR_STR2
         "Specify the maximum number of hops to the BGP peer\n")
diff --cc bgpd/bgpd.c
Simple merge
Simple merge
diff --cc lib/json.c
Simple merge