summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-02-02 10:42:51 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-02-02 10:42:51 -0500
commit1a35e2e56533f75d68ed30bf24b3c131da4ba950 (patch)
tree068c7730ed7a58d5374d8123d81720597b40bbcd /zebra/rt_netlink.c
parentb384af46d50caaae87e1c7807227ac6b4d87f377 (diff)
parent56041a77064fe6924ca55dd4e394777b7a5900d0 (diff)
Merge remote-tracking branch 'origin/stable/2.0'
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 17b5a6e6d8..d88dc05b28 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -868,8 +868,10 @@ _netlink_route_build_singlepath(
if (nexthop->type == NEXTHOP_TYPE_IPV4
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
{
- _netlink_route_nl_add_gateway_info (rtmsg->rtm_family, AF_INET, nlmsg,
- req_size, bytelen, nexthop);
+ /* Send deletes to the kernel without specifying the next-hop */
+ if (cmd != RTM_DELROUTE)
+ _netlink_route_nl_add_gateway_info (rtmsg->rtm_family, AF_INET, nlmsg,
+ req_size, bytelen, nexthop);
if (cmd == RTM_NEWROUTE)
{