From: Felix Fietkau Date: Fri, 28 Sep 2012 23:07:59 +0000 (+0200) Subject: system-linux: do not delete kernel-generated ipv6 routes to fix using advertised... X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=6653b861748719ab58e21a81e01d59d4d8afe10c system-linux: do not delete kernel-generated ipv6 routes to fix using advertised routes --- diff --git a/system-linux.c b/system-linux.c index e1343a5..eb73e95 100644 --- a/system-linux.c +++ b/system-linux.c @@ -382,8 +382,13 @@ static bool check_ifaddr(struct nlmsghdr *hdr, int ifindex) static bool check_route(struct nlmsghdr *hdr, int ifindex) { + struct rtmsg *r = NLMSG_DATA(hdr); struct nlattr *tb[__RTA_MAX]; + if (r->rtm_protocol == RTPROT_KERNEL && + r->rtm_family == AF_INET6) + return false; + nlmsg_parse(hdr, sizeof(struct rtmsg), tb, __RTA_MAX - 1, NULL); if (!tb[RTA_OIF]) return false;