diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-18 12:18:13 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-18 16:35:02 +0200 |
commit | 7e6b36c1c922a2d3f3b7fa025a52bb508415ffc1 (patch) | |
tree | 28adf44d3705a51c784742e0194793673953e531 /src/rtnl.c | |
parent | 1108a9e8e29c8eaf5d110407f203f8229dfb6526 (diff) | |
download | connman-7e6b36c1c922a2d3f3b7fa025a52bb508415ffc1.tar.gz connman-7e6b36c1c922a2d3f3b7fa025a52bb508415ffc1.tar.bz2 connman-7e6b36c1c922a2d3f3b7fa025a52bb508415ffc1.zip |
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.
Diffstat (limited to 'src/rtnl.c')
-rw-r--r-- | src/rtnl.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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)); |