From 6653b861748719ab58e21a81e01d59d4d8afe10c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 29 Sep 2012 01:07:59 +0200 Subject: [PATCH] system-linux: do not delete kernel-generated ipv6 routes to fix using advertised routes --- system-linux.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.11.0