summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
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 17b5a6e6d..d88dc05b2 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)
{