Commit Graph

290 Commits

Author SHA1 Message Date
Mitesh Kanjariya
e8d26197fa bgpd: vrf/vni mapping command for default instance
Ticket: CM-18906
Review: CCR-6946
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2018-01-23 15:58:53 -08:00
Philippe Guibert
d6fed38109
Merge pull request #1618 from donaldsharp/zebra_startup_ordering
zebra route-leaking for static routes
2018-01-23 08:25:01 +01:00
Philippe Guibert
90ac32c209 zebra: replace 0 value on zebra with VRF_DEFAULT
On some places of code, the VRF_DEFAULT define was not used. This commit
is ensuring that the macros is well used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-01-22 14:58:02 +01:00
Donald Sharp
61408536df zebra: Add ability for default vrf to route-leak
Allow the end user to specify static routes that leak
across vrf's in the default vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:26:42 -05:00
Donald Sharp
37728041b6 zebra: Move ip route ... generation to vrf control
Move the code that generates the 'show run' output for
'ip route' to be controlled by the vrf config generation
code.  Since it really belongs there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:26:41 -05:00
Donald Sharp
b2ffa06b4f zebra: Add vrf level 'ip route ...' commands
Add the ability to accept 'ip route ...' commands
from within a vrf context.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:25:07 -05:00
Donald Sharp
cbb0dbf6bd zebra: Add the zvrf pointer to the 'struct static_route'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:22:46 -05:00
Donald Sharp
2f03bc8f72 zebra: Add zebra_static_route_leak function
Add a function to handle the route leaking of a static
route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:22:46 -05:00
Donald Sharp
2793a0980d zebra: When displaying nexthop information show correct vrf
If the vrf for the nexthop is different than the vrf the
route is in, display the nexthops vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:20:36 -05:00
Donald Sharp
99b9d9609f zebra: Use the correct vrf id to lookup the ifp pointer
Use the nexthop vrf_id to properly lookup the ifp pointer
for display purposes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:20:36 -05:00
Mitesh Kanjariya
9bb77a5b3d
Merge branch 'master' into evpn-symmetric-routing 2018-01-11 09:00:23 -08:00
Renato Westphal
fb6f7c2c25
Merge pull request #1515 from donaldsharp/selected_to_front1
Store selected_fib as a pointer off of rib_dest_t
2017-12-19 14:09:03 -02:00
mitesh
0412988bd5 zebra: only show vrf matched to a l3-vni in show vrf vni
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:57:08 -08:00
mitesh
3f02fbab67 zebra: pass ERR_STR_SZ in zebra_vxlan_process_vrf_vni_cmd
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:57:08 -08:00
Mitesh Kanjariya
90384b2471 zebra: vrf to vni mapping command is only valid under vrf submode
Ticket: CM-18821
Review: Trivial
Testing: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:57:07 -08:00
Mitesh Kanjariya
316f4ca4d9 zebra: json support for show evpn rmac specific mac command
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:57:06 -08:00
Mitesh Kanjariya
c0e519d32d zebra: json support for show evpn specific next-hop command
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:57:06 -08:00
Mitesh Kanjariya
35be5542dd zebra: json support for show vrf vni command
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:57:06 -08:00
Mitesh Kanjariya
9aa741eae8 zebra: show commands for specific rmac/nh entries
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:57:06 -08:00
Mitesh Kanjariya
b7cfce934f zebra, lib: zebra changes for symmetric routing support
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2017-12-14 10:56:44 -08:00
Donald Sharp
0efb5e9b4b zebra: Display if a taged route is being used as a realm
When displaying a specific route and if it has a tag
and if we have turned on realm support notify the user
that a tag value of (1-255) is installed into the kernel
with the realm set.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-12-14 09:49:43 -05:00
Donald Sharp
c0d136aec2 zebra: Try to move non zapi cli commands from zserv.c
zserv.c has become a bit of a dumping ground for zebra cli.
I'd like to focus the zserv.c code into it's core functionality
which is handling the zapi interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-12-13 07:57:15 -05:00
Donald Sharp
5f7a4718e2 zebra: Replace SELECTED_FIB flag with a rib_dest_t pointer
The SELECTED_FIB flag was placed upon the entry that we
have inserted into the kernel.  Remove this flag and replace
with a `rib_dest_t` *selected_fib.  Just keep track of the
selected_fib as we modify it.  This removes allot of
FOREACH_RE loops as that we do not need to find the
entry anymore.

At this point in time I think this is a very minor performance
boost.  Most `rib_dest_t` structures do not typically carry
more than 1 route_entry, but the minute you start having more
than one entry you can and will start having significant processing
time spent finding the selected_fib.

A future commit may re-order the route entries and possibly
keep more pointers on `rib_dest_t` to avoid lookup.  This
is a bit tricky because of the FIB_OVERRIDE code.

Signed-off-by Donald Sharp <sharpd@cumulusnetworks.com>
2017-12-05 17:26:32 -05:00
Quentin Young
10c61d28bf
zebra: add back support for nUlL0
Re-add support for typos when specifying a null route.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-11-28 14:12:07 -05:00
Renato Westphal
88aa65f849
Merge pull request #1470 from donaldsharp/zebra_multicast
Zebra multicast
2017-11-21 12:50:46 -02:00
Donald Sharp
fba31af2b5 zebra: Fix 'show ip rpf' to actually work
Rework of do_show_ip_route caused the 'show ip rpf'
cli to stop working.  This put's it back into working
order.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-19 19:47:32 -05:00
Donald Sharp
ab59f4f7e3 ldpd, zebra: Fix make dist compiles
The original clippy implementation used if VTYSH_EXTRACT_PL
was defined or not to know to include as part of the creation
of vtysh.

Follow their lead here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-09 11:14:33 -05:00
Russ White
453a5340a8
Merge pull request #1363 from donaldsharp/z_improvements
Z improvements
2017-10-31 20:27:19 -04:00
Renato Westphal
5ce91022c1 zebra: unify the ipv4/ipv6 'show ip route' commands - part 2/2
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-25 16:03:56 -02:00
Donald Sharp
62d52dedf0 zebra: Add Hidden 'zebra zapi-packets (1-10000)' command
Allow the end user to specify how many packets we want
to process at one time coming down the zapi, before
we yield and let other things process.

This is a Hidden command because it is not necessarily
something that we want end users to be able to play with

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-25 11:13:42 -04:00
Donald Sharp
3a30f50f3f zebra: Allow user to specify work-queue processing hold time
Allow the user to modify the work-queue processing hold time
from 10ms to a value from (0-10000).  Make the command hidden
as that it's a semi-dangerous command and it could cause
issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-25 10:59:05 -04:00
Renato Westphal
ce0ff16bd9 zebra: fix route node leak on error path
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-24 10:23:33 -02:00
Renato Westphal
a3e13ef37f zebra: 'show ip route' with multiple options at the same time
Now it's possible to specify multiple options when viewing the RIB or
FIB.

Example: 'show ip route 192.168.0.0/16 longer-prefixes tag 10 ospf'

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-24 10:23:33 -02:00
Renato Westphal
ecffa493c0 zebra: unify the ipv4/ipv6 'show ip route' commands - part 1/2
Note: I had to remove one assert in clidef.py in order to fix a build
error when using a preprocessor string (FRR_IP_REDIST_STR_ZEBRA) inside
a DEFPY command. This should be revisited later.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-24 10:12:40 -02:00
Renato Westphal
8526b84200 zebra: fix display of negative route metrics and tags
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-05 22:55:58 -03:00
Renato Westphal
67c0a9206c Merge pull request #1180 from dwalton76/ipv6-static-route-null0
Ipv6 static route null0
2017-09-27 13:42:53 -03:00
Daniel Walton
1e058f38c2 zebra: split ip route DEFUNs for blackhole, reject, etc
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-09-27 15:35:28 +00:00
Daniel Walton
d7d75634e9 zebra: cleanup reject vs blackhole vs null0 vs Null0
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-09-20 22:24:27 +04:00
Renato Westphal
a2addae8fe *: use clang's 'ForEachMacros' format style option
This fixes the broken indentation of several foreach loops throughout
the code.

From clang's documentation[1]:
  ForEachMacros: A vector of macros that should be interpreted as foreach
  loops instead of as function calls.

[1] http://clang.llvm.org/docs/ClangFormatStyleOptions.html

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-15 14:53:46 -03:00
Daniel Walton
bb92922eaa zebra: cleanup reject vs blackhole vs null0 vs Null0
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-09-14 18:11:29 +00:00
Donald Sharp
14a481d916 zebra: Allow 'show ip route...' to display uptime for all routes
Display uptime for all route types instead of just for RIP,
OSPFv2, ISIS, NHRP, TABLE? and BGP routes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-12 14:58:10 -04:00
Donald Sharp
eaf5150f58 zebra: Modify 'show ip route ...' to show duplicated nexthops
Add the ability for person issuing 'show ip route...' commands
to see if we've suppressed adding a nexthop to the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-12 14:52:20 -04:00
Renato Westphal
57a58d777f zebra: accept Null0 again in addition to null0
Restore behavior before commit a830942.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-05 11:50:34 -03:00
Renato Westphal
9aabb2ea74 zebra: display static blackhole routes consistently
If we configure a static route pointing to null0 and zebra displays
it with the 'blackhole' keyword in the running configuration, the
frr-reload.py script will have issues. Fix this by introducing the
'static_blackhole_type' enum.

Fixes #1091.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-05 11:50:34 -03:00
Renato Westphal
cc54cfee3a zebra: remove refcnt from the route_entry structure
This reference counter was introduced in 2001, apparently to solve a
problem with connected routes being added/removed multiple times. The RIB
code changed a lot since then, and giving the current callers of rib_add()
and rib_delete() it's safe to assume that we don't need this anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-31 21:17:11 -03:00
Renato Westphal
b3c18264e4 Merge pull request #1079 from qlyoung/fix-style-a
*: fix style
2017-08-31 13:22:55 -03:00
Jafar Al-Gharaibeh
959768e8d0 Merge pull request #1044 from donaldsharp/combination
Coverity Cleanup of Stuff
2017-08-31 10:25:55 -05:00
Quentin Young
60466a63f2
*: fix style
Fixes style nits introduced by recent pull requests.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-08-30 11:27:11 -04:00
David Lamparter
a830942228 zebra: cleanup blackhole support
blackhole support was horribly broken. cleanup by removing blackhole
stuff from ZEBRA_FLAG_*

introduces support for "prohibit" routes (Linux/netlink only)
also clean up blackhole options on "ip route" vty commands.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-28 05:07:51 +02:00
Renato Westphal
0af35d90a1 *: fix assorted issues detected by Coverity Scan
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-08-24 21:49:39 -03:00