]> git.proxmox.com Git - mirror_frr.git/commit - debian/frr.dirs
Add source of route as protocol string in ip route pushed into kernel
authorDinesh G Dutt <ddutt@cumulusnetworks.com>
Wed, 11 Jan 2017 22:33:39 +0000 (14:33 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 21 Apr 2017 01:24:31 +0000 (21:24 -0400)
commit23b1f334515a1c9198f436cdf06982818378936c
tree72a07287a62d356dbb43a49c0a771f51f48c7f8a
parent9134c9e9586fce4dcc18b33668c50c2e200d9ef3
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
cumulus/etc/iproute2/rt_protos.d/frr.conf [new file with mode: 0644]
debian/frr.dirs
tools/frr
zebra/kernel_netlink.c
zebra/rt_netlink.c
zebra/rt_netlink.h