diff options
author | Dinesh G Dutt <ddutt@cumulusnetworks.com> | 2017-01-11 23:33:39 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-04-21 03:24:31 +0200 |
commit | 23b1f334515a1c9198f436cdf06982818378936c (patch) | |
tree | 72a07287a62d356dbb43a49c0a771f51f48c7f8a /zebra/rt_netlink.h | |
parent | Merge remote-tracking branch 'origin/stable/3.0' (diff) | |
download | frr-23b1f334515a1c9198f436cdf06982818378936c.tar.xz frr-23b1f334515a1c9198f436cdf06982818378936c.zip |
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
Diffstat (limited to 'zebra/rt_netlink.h')
-rw-r--r-- | zebra/rt_netlink.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/rt_netlink.h b/zebra/rt_netlink.h index 93ee622e3..af58a0f0d 100644 --- a/zebra/rt_netlink.h +++ b/zebra/rt_netlink.h @@ -28,6 +28,14 @@ #define NL_DEFAULT_ROUTE_METRIC 20 +/* Additional protocol strings to push into routes */ +#define RTPROT_BGP 186 +#define RTPROT_ISIS 187 +#define RTPROT_OSPF 188 +#define RTPROT_RIP 189 +#define RTPROT_RIPNG 190 + + extern void clear_nhlfe_installed (zebra_lsp_t *lsp); extern int |