diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-25 12:28:39 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-25 12:28:39 -0400 |
| commit | 5dfeba1904be75c2c8b89d319965755f4b6a4794 (patch) | |
| tree | f37fe9b375535f1559b7ce846669ec306adf7da6 /zebra/kernel_socket.c | |
| parent | c84ed8700efc07d66d2ea7373dcc2d9e116f1003 (diff) | |
zebra: Do not allow delete of route from kernel in non-startup case
This is a continuation of 915902cb82cfd. Basically the netlink
read of messages up from the kernel is now noticing the proper
owner of the route. As such when rib_delete was being called
as part of the upcall from the kernel we were not noticing that
we were the originator and not diss-allowing the rib_delete
from happening. This restores this behavior that we were getting
pre-915902cb82cfd
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/kernel_socket.c')
| -rw-r--r-- | zebra/kernel_socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index df8cdb3ab3..9907ef5b79 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -1042,7 +1042,7 @@ void rtm_read(struct rt_msghdr *rtm) if (rtm->rtm_type == RTM_CHANGE) rib_delete(AFI_IP, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - NULL, 0, 0); + NULL, 0, 0, true); if (!nh.type) { nh.type = NEXTHOP_TYPE_IPV4; @@ -1057,7 +1057,7 @@ void rtm_read(struct rt_msghdr *rtm) else rib_delete(AFI_IP, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - &nh, 0, 0); + &nh, 0, 0, true); } if (dest.sa.sa_family == AF_INET6) { /* One day we might have a debug section here like one in the @@ -1088,7 +1088,7 @@ void rtm_read(struct rt_msghdr *rtm) if (rtm->rtm_type == RTM_CHANGE) rib_delete(AFI_IP6, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - NULL, 0, 0); + NULL, 0, 0, true); if (!nh.type) { nh.type = ifindex ? NEXTHOP_TYPE_IPV6_IFINDEX @@ -1105,7 +1105,7 @@ void rtm_read(struct rt_msghdr *rtm) else rib_delete(AFI_IP6, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, 0, zebra_flags, &p, NULL, - &nh, 0, 0); + &nh, 0, 0, true); } } |
