mirror_frr/zebra
Dinesh G Dutt 1a11782c40 *: Add source of route as protocol string in ip route pushed into kernel
Ticket: CM-14313
Reviewed By:
Testing Done: bgpmin, ospfmin, bgp_kitchen_sink_test

'ip route show' displays all routes as belonging to protocol zebra.
The user has to run an additional command (in vtysh) to get the actual
source of a route (bgp/ospf/static etc.). This patch addresses that by
pushing the appropriate protocol string into the protocol field of the
netlink route update message. Now you can see routes with the correct
origin as well as filter on them (ip route show proto ospf).

'ospf' is used for both IPv4 and IPv6 routes, even though the OSPF
version is different in both cases.

Sample output (old):
9.9.12.13 via 69.254.2.38 dev swp3.2  proto zebra  metric 20
9.9.13.3  proto zebra  metric 20
        nexthop via 69.254.2.30  dev swp1.2 weight 1
        nexthop via 69.254.2.34  dev swp2.2 weight 1
        nexthop via 69.254.2.38  dev swp3.2 weight 1

Sample output (new):
9.9.12.13 via 69.254.2.38 dev swp3.2  proto bgp  metric 20
9.9.13.3  proto bgp  metric 20
        nexthop via 69.254.2.30  dev swp1.2 weight 1
        nexthop via 69.254.2.34  dev swp2.2 weight 1
        nexthop via 69.254.2.38  dev swp3.2 weight 1

Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
2017-01-30 13:40:53 -05:00
..
.gitignore [administrivia] Update gitignore files 2008-08-22 20:02:08 +01:00
client_main.c build: remove $Format tags 2016-12-20 17:54:03 +01:00
connected.c Quagga: Fix MPLS LSP scheduling to follow nexthop route update 2016-09-23 09:30:59 -04:00
connected.h Zebra: Remove reliance on NEXTHOP_TYPE_IPV4_ONLINK 2015-11-16 12:48:07 -08:00
debug.c *: Fix duplicate commands from view/enable node consolidation 2016-10-19 22:28:45 -04:00
debug.h Quagga: Static LSP configuration 2016-09-23 09:30:54 -04:00
GNOME-PRODUCT-ZEBRA-MIB Initial revision 2002-12-13 20:15:29 +00:00
GNOME-SMI Initial revision 2002-12-13 20:15:29 +00:00
if_ioctl_solaris.c zebra: Fix some warnings found during compile. 2016-10-07 21:05:05 -04:00
if_ioctl.c build: massively remove needless checks 2016-11-15 14:23:17 +09:00
if_netlink.c lib/zebra: put vrf_get() on a diet 2016-11-28 16:18:35 -02:00
if_netlink.h zebra: Refactor netlink interactions 2016-10-17 12:39:55 -07:00
if_null.c lib, zebra: Rework zebra_ns to be a bit more modular 2016-04-14 20:56:57 -04:00
if_sysctl.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
interface.c Merge branch '-renato' into stable/2.0 2016-12-05 16:23:28 +01:00
interface.h lib, zebra: unify link layer type and hardware address handling 2016-09-03 11:05:50 -04:00
ioctl_null.c Add missing GPL headers, and copyright claims that certainly apply. 2016-05-26 01:06:59 +00:00
ioctl_solaris.c zebra: Fix some warnings found during compile. 2016-10-07 21:05:05 -04:00
ioctl_solaris.h build/solaris: create ioctl_solaris.h 2016-06-09 10:51:59 -04:00
ioctl.c *: fix more initialisers (for BSD) 2016-06-08 15:01:33 -04:00
ioctl.h [zebra/solaris] Interface state fixups for Solaris. 2006-01-25 04:31:40 +00:00
ipforward_proc.c zebra: fix warnings in forward proc 2011-12-07 01:24:09 +04:00
ipforward_solaris.c 2005-06-28 Paul Jakma <paul.jakma@sun.com> 2005-06-28 17:17:12 +00:00
ipforward_sysctl.c build: remove INRIA, NRL and MUSICA IPv6 quirks 2016-06-03 14:40:03 -04:00
ipforward.h 2005-06-28 Paul Jakma <paul.jakma@sun.com> 2005-06-28 17:17:12 +00:00
irdp_interface.c zebra: use qobj and enable concurrent config edits 2016-10-07 09:09:52 -04:00
irdp_main.c lib: convert vrf code to use red-black trees as well 2016-11-28 16:18:35 -02:00
irdp_packet.c *: create a helper function to set the IP_MULTICAST_LOOP sockoption 2016-11-25 11:46:06 -02:00
irdp.h zebra: deal with irdp compile warnings 2009-12-10 14:22:44 +03:00
kernel_netlink.c *: Add source of route as protocol string in ip route pushed into kernel 2017-01-30 13:40:53 -05:00
kernel_netlink.h zebra: use unsigned args for *addattr 2016-10-18 08:39:21 -04:00
kernel_null.c zebra: kernel interface simplification 2016-10-18 08:36:21 -04:00
kernel_socket.c lib: replace strlcpy & strlcat with glibc versions 2016-11-15 17:35:36 +09:00
kernel_socket.h mpls: add support to the OpenBSD kernel 2016-09-23 09:31:15 -04:00
main.c zebra: Add vty_socket cli option to override the compiled-in location for the VTY Socket 2017-01-26 00:41:09 +07:00
Makefile.am zebra: Fix dist so that zebra includes right .h 2016-10-15 23:49:06 -04:00
misc_null.c zebra: clean up misc_null pragmas 2016-06-07 09:43:32 -04:00
redistribute_null.c Update Traffic Engineering Support for OSPFD 2016-09-03 11:05:50 -04:00
redistribute.c zebra/lib: remove redundant fields from zebra_vrf 2016-11-28 16:18:35 -02:00
redistribute.h Update Traffic Engineering Support for OSPFD 2016-09-03 11:05:50 -04:00
rib.h zebra: remove unused variable 2016-12-23 13:27:55 +07:00
router-id.c zebra/lib: remove redundant fields from zebra_vrf 2016-11-28 16:18:35 -02:00
router-id.h zebra: maintain the router-id per VRF 2015-10-30 00:19:15 -07:00
rt_netlink.c *: Add source of route as protocol string in ip route pushed into kernel 2017-01-30 13:40:53 -05:00
rt_netlink.h *: Add source of route as protocol string in ip route pushed into kernel 2017-01-30 13:40:53 -05:00
rt_socket.c lib: replace strlcpy & strlcat with glibc versions 2016-11-15 17:35:36 +09:00
rt.h zebra: kernel interface simplification 2016-10-18 08:36:21 -04:00
rtadv_null.c BGP: Trigger IPv6 router advertisements upon config of unnumbered neighbor 2016-05-02 13:53:38 -07:00
rtadv.c zebra/lib: remove redundant fields from zebra_vrf 2016-11-28 16:18:35 -02:00
rtadv.h zebra: fix build with rtadv disabled 2016-06-08 14:15:47 -04:00
rtread_getmsg.c zebra: Fix some warnings found during compile. 2016-10-07 21:05:05 -04:00
rtread_netlink.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
rtread_sysctl.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
test_main.c build: rename (1 of ?): configure.ac + preproc 2016-12-20 17:57:47 +01:00
testrib.conf zebra: Build the test client, can be useful, and add IPv6 to testrib.conf 2016-05-26 01:13:58 +00:00
zebra_fpm_dt.c zebra: add developer test functions for FPM code 2016-09-23 12:12:17 -04:00
zebra_fpm_netlink.c zebra/lib: remove redundant fields from zebra_vrf 2016-11-28 16:18:35 -02:00
zebra_fpm_private.h zebra: optionally use protobuf with FPM 2016-09-23 12:12:16 -04:00
zebra_fpm_protobuf.c fpm/protobuf: fix compile errors & warnings 2016-09-23 12:12:17 -04:00
zebra_fpm.c zebra/lib: remove redundant fields from zebra_vrf 2016-11-28 16:18:35 -02:00
zebra_fpm.h zebra: optionally use protobuf with FPM 2016-09-23 12:12:16 -04:00
zebra_memory.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_memory.h zebra/lib: plug several memleaks 2016-11-28 16:15:27 -02:00
zebra_mpls_netlink.c *: fix some licensing SNAFUs 2016-11-14 11:27:08 +09:00
zebra_mpls_null.c zebra: add missing license headers to two files 2016-11-28 17:34:54 +01:00
zebra_mpls_openbsd.c zebra: add missing license headers to two files 2016-11-28 17:34:54 +01:00
zebra_mpls_vty.c zebra: Disable mpls slightly different 2016-10-25 14:30:25 -04:00
zebra_mpls.c Merge branch '-renato' into stable/2.0 2016-12-05 16:23:28 +01:00
zebra_mpls.h zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
zebra_ns.c zebra/lib: move some code around 2016-11-28 16:18:35 -02:00
zebra_ns.h zebra/lib: plug several memleaks 2016-11-28 16:15:27 -02:00
zebra_ptm_null.c Zebra and bgpd: VRF support for BFD 2016-03-08 05:10:56 -08:00
zebra_ptm_redistribute.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_ptm_redistribute.h Zebra and bgpd: VRF support for BFD 2016-03-08 05:10:56 -08:00
zebra_ptm.c bgpd, zebra: Fix for ignored non-default VRF single-hop BFD status messages in Quagga 2017-01-30 13:40:21 -05:00
zebra_ptm.h bfd: Fix for missing BFD client regs/deregs from quagga clients 2016-06-21 03:39:58 -07:00
zebra_rib.c zebra: remove unused variable 2016-12-23 13:27:55 +07:00
zebra_rnh_null.c zebra: plug more memory leaks 2016-11-28 16:18:35 -02:00
zebra_rnh.c Merge branch '-renato' into stable/2.0 2016-12-05 16:23:28 +01:00
zebra_rnh.h zebra: plug more memory leaks 2016-11-28 16:18:35 -02:00
zebra_routemap.c build: rename (2 of ?): route_types macros 2016-12-20 18:34:29 +01:00
zebra_routemap.h *: Consistently support 32-bit route tags 2016-10-07 21:05:05 -04:00
zebra_snmp.c zebra: fix sign warning in SNMP code 2016-11-15 14:06:13 +09:00
zebra_static.c zebra: fix FIB route updates on *BSD 2016-12-23 13:27:03 +07:00
zebra_static.h Merge remote-tracking branch 'origin/cmaster' into cmaster-next 2016-10-21 16:05:03 -04:00
zebra_vrf.c zebra: plug more memory leaks 2016-11-28 16:18:35 -02:00
zebra_vrf.h zebra: plug more memory leaks 2016-11-28 16:18:35 -02:00
zebra_vty.c zebra: Allow tag values greater than 2 billion on arm 2017-01-06 12:37:44 -05:00
zebra.conf.sample Initial revision 2002-12-13 20:15:29 +00:00
zserv_null.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zserv.c zebra/lib: remove redundant fields from zebra_vrf 2016-11-28 16:18:35 -02:00
zserv.h zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00