From 7e6b36c1c922a2d3f3b7fa025a52bb508415ffc1 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Tue, 18 May 2010 12:18:13 +0200 Subject: [PATCH] Support RTPROT_KERNEL when adding/deleting routes RTM_*ROUTE messages can come with an RTPROT_KERNEL protocol when setting route after bringing the interface up. --- src/rtnl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rtnl.c b/src/rtnl.c index 12ebdcb..147d2da 100644 --- a/src/rtnl.c +++ b/src/rtnl.c @@ -790,7 +790,8 @@ static void rtnl_newroute(struct nlmsghdr *hdr) rtnl_route(hdr); if (msg->rtm_table == RT_TABLE_MAIN && - msg->rtm_protocol == RTPROT_BOOT && + (msg->rtm_protocol == RTPROT_BOOT || + msg->rtm_protocol == RTPROT_KERNEL) && msg->rtm_type == RTN_UNICAST) process_newroute(msg->rtm_family, msg->rtm_scope, msg, RTM_PAYLOAD(hdr)); @@ -803,7 +804,8 @@ static void rtnl_delroute(struct nlmsghdr *hdr) rtnl_route(hdr); if (msg->rtm_table == RT_TABLE_MAIN && - msg->rtm_protocol == RTPROT_BOOT && + (msg->rtm_protocol == RTPROT_BOOT || + msg->rtm_protocol == RTPROT_KERNEL) && msg->rtm_type == RTN_UNICAST) process_delroute(msg->rtm_family, msg->rtm_scope, msg, RTM_PAYLOAD(hdr)); -- 2.7.4