summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-09-29 01:07:59 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-09-29 01:08:34 +0200
commit6653b861748719ab58e21a81e01d59d4d8afe10c (patch)
treed8b55079b09097778f2ca18406c95bd28092bc1d
parent67b225a9c0d38989028763de5c07164f0bfee504 (diff)
system-linux: do not delete kernel-generated ipv6 routes to fix using advertised routes
-rw-r--r--system-linux.c5
1 files changed, 5 insertions, 0 deletions
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;