Renato Westphal
1d3f0eff59
zebra: unify the ipv4/ipv6 static route functions
...
Addresses Issue #655 .
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-27 23:46:56 -03:00
Renato Westphal
599186ad97
zebra: allow fully specified static ipv4 routes
...
Fully specified routes are useful when you need to ensure that the
nexthop address is reachable through the specified interface.
Addresses Issue #641 .
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-27 23:46:41 -03:00
Renato Westphal
c6cef20ba9
zebra: refactor zebra_static_ipv4() and static_ipv6_func()
...
This is a preliminary step to join both functions into one later.
The main idea here is to make these functions have separate arguments
for the nexthop address and the nexthop interface, and adjust the call
sites appropriately. Having an argument that could be a nexthop address
OR a nexthop interface was making the code very hard to follow. With
this simplification, a lot of code duplication was removed and now both
functions look very similar.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-27 23:39:35 -03:00
Renato Westphal
33df4bb219
zebra: accept static v6 routes with non-existent nexthop interfaces
...
We don't need to enforce that the interface exists because the route can
be activated later once the interface becomes available. We already do
this for IPv4 routes and IPv6 routes with both a nexthop address and a
nexthop interface.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-27 23:39:27 -03:00
Renato Westphal
d97c792e9f
zebra: remove redundant DEFUNs for labeled static routes
...
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-27 21:47:23 -03:00
Renato Westphal
8bcbf3b0d7
zebra: remove weird blackhole/reject ipv6 static routes
...
This is the v6 counterpart of commit 74d263466b
.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-27 21:45:01 -03:00
Renato Westphal
2f8aa457e0
zebra: use curly braces for optional arguments of static routes
...
This way the optional arguments can be provided in any order.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-07-27 21:44:34 -03:00
Daniel Walton
1ac79ce8df
zebra: static route cleanup
...
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
- The 'reject' keyword was being lost
- Hide the "ip route A.B.C.D A.B.C.D" config options since these will be
displayed as "ip route A.B.C.D/X"
2017-07-25 13:24:45 -07:00
David Lamparter
9d303b37d7
Revert "*: reindent pt. 2"
...
This reverts commit c14777c6bf
.
clang 5 is not widely available enough for people to indent with. This
is particularly problematic when rebasing/adjusting branches.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-22 14:52:33 +02:00
whitespace / reindent
c14777c6bf
*: reindent pt. 2
...
w/ clang 5
* reflow comments
* struct members go 1 per line
* binpack algo was adjusted
2017-07-17 15:26:02 -04:00
whitespace / reindent
d62a17aede
*: reindent
...
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
Donald Sharp
2850f0ea58
bgpd, zebra: Cleanup warnings from new code
...
1) Clean up VTY_NEWLINE -> \n
2) Remove usages of VTY_GET_INTEGER
Signed-off-by: Donald Sharp
2017-07-14 08:52:45 -04:00
Donald Sharp
1ea6b3f237
Merge remote-tracking branch 'origin/master' into evpn_plus_struct_attr
2017-07-14 08:24:46 -04:00
Donald Sharp
da571b7a6c
Merge remote-tracking branch 'origin/master' into evpn_plus_struct_attr
2017-07-14 08:11:05 -04:00
Russ White
28bd1c1158
Merge pull request #813 from opensourcerouting/newline-redux
...
newline redux
2017-07-14 08:00:43 -04:00
Donald Sharp
eef83e96f7
Merge pull request #762 from bingen/mutiple_nh_recursive_levels
...
Allow for more than 1 NH recursion level
2017-07-14 07:44:02 -04:00
David Lamparter
2d8270596a
Merge remote-tracking branch 'frr/master' into newline-redux
...
Lots of conflicts from CMD_WARNING_CONFIG_FAILED...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 13:07:30 +02:00
David Lamparter
55f70b671f
*: remove VTYNL, part 4 of 6
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +02:00
David Lamparter
61b7d449bd
*: remove VTYNL, part 3 of 6
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +02:00
David Lamparter
26a429fe8e
*: remove VTYNL, part 2 of 6
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:02 +02:00
David Lamparter
6d3c2ed4ed
*: remove VTYNL, part 1 of 6
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:02 +02:00
Daniel Walton
f1a05de982
vtysh: return non-zero for configuration failures
...
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This allows frr-reload.py (or anything else that scripts via vtysh)
to know if the vtysh command worked or hit an error.
2017-07-13 19:56:08 +00:00
David Lamparter
5c7571d43f
*: ditch vty_outln(), part 1 of 2
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-13 20:29:22 +02:00
vivek
cec2e17d27
zebra: EVPN/VxLAN UI definitions and handling
...
Implement various UI (vty) commands for EVPN/VxLAN.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-12 12:29:27 -04:00
Christian Franke
e3054ee94f
zebra: prettier format for multilevel-recursive routes
...
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-07-12 18:28:40 +02:00
ßingen
62b3c03f53
Avoid to make indentation even worse
2017-07-10 22:52:16 +02:00
ßingen
8e688dbd58
Rename ALL_NEXTHOPS_RO to ALL_NEXTHOPS
2017-07-10 21:14:59 +02:00
Daniel Walton
dfd8121281
Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-ipv4-plus-label-misc3
...
Conflicts:
bgpd/bgp_route.c
bgpd/bgp_zebra.c
2017-07-10 13:06:19 +00:00
Daniel Walton
dd6bd0f16d
bgpd: Install SAFI_LABELED_UNICAST routes in SAFI_UNICAST table
...
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-07-05 20:46:48 +00:00
Quentin Young
7111c1a0cd
*: fix excess docstring
...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-05 15:33:00 -04:00
Quentin Young
e31b6333f4
*: vty_outln (vty, "") --> vty_out (vty, VTYNL)
...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:56 +00:00
Quentin Young
1318e7c841
*: s/VTY_NEWLINE/VTYNL/g
...
Should be able to fit more vty_out onto one line now
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:54 +00:00
Quentin Young
96ade3ed77
*: use vty_outln
...
Saves 400 lines
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:31:28 +00:00
Russ White
0bc44f61c9
Merge pull request #754 from qlyoung/fix-argv-arg
...
use argv->text where appropriate
2017-06-29 11:06:15 -04:00
Jafar Al-Gharaibeh
0eef52fd95
Merge pull request #759 from qlyoung/remove-vty-argparsers
...
*: remove VTY_GET_*
2017-06-29 09:36:06 -05:00
Donald Sharp
b440fe5c82
Merge remote-tracking branch 'origin/stable/3.0'
2017-06-29 10:10:15 -04:00
ßingen
f9e1b38e1a
Allow for more than 1 NH recursion level
...
Before, only one level of recursive resolution was supported.
Signed-off-by: ßingen <bingen@voltanet.io>
2017-06-28 21:32:18 +02:00
Quentin Young
facfee22f5
*: remove VTY_GET_*
...
CLI validates input tokens, so there's no need to do it in handler
functions anymore.
spatch follows
----------------
@getull@
expression v;
expression str;
@@
<...
- VTY_GET_ULL(..., v, str)
+ v = strtoull (str, NULL, 10)
...>
@getul@
expression v;
expression str;
@@
<...
- VTY_GET_ULONG(..., v, str)
+ v = strtoul (str, NULL, 10)
...>
@getintrange@
expression name;
expression v;
expression str;
@@
<...
- VTY_GET_INTEGER_RANGE(name, v, str, ...)
+ v = strtoul (str, NULL, 10)
...>
@getint@
expression v;
expression str;
@@
<...
- VTY_GET_INTEGER(..., v, str)
+ v = strtoul (str, NULL, 10)
...>
@getv4@
expression v;
expression str;
@@
<...
- VTY_GET_IPV4_ADDRESS(..., v, str)
+ inet_aton (str, &v)
...>
@getv4pfx@
expression v;
expression str;
@@
<...
- VTY_GET_IPV4_PREFIX(..., v, str)
+ str2prefix_ipv4 (str, &v)
...>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-27 19:04:41 +00:00
Quentin Young
7e045c3d42
*: use ->text and strmatch where appropriate
...
Still need to go fix all the places where we do a 1-char strncmp...
spatch follows
------------------
@asdf@
expression idx;
@@
<...
strcmp (
- argv[idx]->arg,
+ argv[idx]->text,
...)
...>
@depends on asdf@
expression idx;
@@
<...
- !strcmp (argv[idx]->text,
+ strmatch (argv[idx]->text,
...)
...>
@depends on asdf@
expression idx;
expression arg;
@@
<...
- strcmp (argv[idx]->text, arg) == 0
+ strmatch (argv[idx]->text, arg)
...>
@depends on asdf@
expression idx;
expression arg;
@@
<...
- strcmp (argv[idx]->text, arg) != 0
+ !strmatch (argv[idx]->text, arg)
...>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-27 17:46:42 +00:00
Christian Franke
59b28c4523
zebra: fix ipv6 route command description strings
...
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-06-14 09:23:40 +02:00
Christian Franke
2664233e71
zebra: pass srcdest information also when creating blackhole routes
...
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2017-06-14 09:23:36 +02:00
David Lamparter
e885ed85bb
Merge pull request #624 "Babel"
...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-13 16:11:32 +02:00
David Lamparter
97bd5c48de
Merge remote-tracking branch 'frr/master' into pull-624
2017-06-13 09:18:14 +02:00
Donald Sharp
d722f26e09
zebra: Fix memory leak
...
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-10 16:39:41 -04:00
Donald Sharp
6201488ab3
zebra: Fix possible buffer overrun
...
Use the correct size of the string.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-10 15:42:13 -04:00
Quentin Young
31c6fa450a
zebra: remove extraneous help string
...
caused tag to display null0 helpstr
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 21:01:52 +00:00
Renato Westphal
e91163e78c
Merge pull request #647 from qlyoung/zebra-mpls-error-messages
...
zebra: more informative error messages & help strings for mpls labels
2017-06-02 22:53:53 -03:00
Donald Sharp
f0f77c9a59
zebra: Refactor 'struct rib' to be 'struct route_entry'
...
The 'struct rib' data structure is missnamed. It really
is a 'struct route_entry' as part of the 'struct route_node'.
We have 1 'struct route_entry' per route src. As such
1 route node can have multiple route entries if multiple
protocols attempt to install the same route.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-01 08:00:05 -04:00
Quentin Young
6feb1a21af
zebra: define mpls label helpstr
...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 21:50:20 +00:00
Quentin Young
8062bf1c6b
zebra: more informative error messages for mpls labels
...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 21:31:55 +00:00