]> git.proxmox.com Git - mirror_frr.git/commit
*: 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>
Mon, 30 Jan 2017 18:40:53 +0000 (13:40 -0500)
commit1a11782c408a60afb464fe232fc2e3fa1e298436
treeafe14f343e850e01f579fec10598fff4bdb936e2
parent0845b8727a90768a1a8e6ff389bfe83c2e87d2e9
*: 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>
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