system-linux: do not delete kernel-generated ipv6 routes to fix using advertised...
authorFelix Fietkau <nbd@openwrt.org>
Fri, 28 Sep 2012 23:07:59 +0000 (01:07 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 28 Sep 2012 23:08:34 +0000 (01:08 +0200)
system-linux.c

index e1343a500c0d5007d2e8269282e5d5bb0fe44f5b..eb73e95d428e11e3952e824806bb6e3982a4ffca 100644 (file)
@@ -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;