summaryrefslogtreecommitdiff
path: root/src/rtnl.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-05-18 12:18:13 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-05-18 16:35:02 +0200
commit7e6b36c1c922a2d3f3b7fa025a52bb508415ffc1 (patch)
tree28adf44d3705a51c784742e0194793673953e531 /src/rtnl.c
parent1108a9e8e29c8eaf5d110407f203f8229dfb6526 (diff)
downloadconnman-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rtnl.c b/src/rtnl.c
index 12ebdcbe..147d2dad 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));