X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=system-linux.c;h=c7b8b8f66c8c45bdcdf3dbdd7f57de9376d8402b;hp=af252ea64e21c68f71ccd8793bcdf4f1731aa0ec;hb=575b1fe1bc8f15e65d89a0905e1640277c17fadc;hpb=0079ac42fcff0e703467c188c37db902ee8cead8 diff --git a/system-linux.c b/system-linux.c index af252ea..c7b8b8f 100644 --- a/system-linux.c +++ b/system-linux.c @@ -899,7 +899,7 @@ static int system_rt(struct device *dev, struct device_route *route, int cmd) .rtm_family = (alen == 4) ? AF_INET : AF_INET6, .rtm_dst_len = route->mask, .rtm_table = RT_TABLE_MAIN, - .rtm_protocol = RTPROT_BOOT, + .rtm_protocol = (route->flags & DEVADDR_KERNEL) ? RTPROT_KERNEL : RTPROT_BOOT, .rtm_scope = scope, .rtm_type = (cmd == RTM_DELROUTE) ? 0: RTN_UNICAST, };