gluon/patches/lede/0002-odhcp6c-always-accept-RDNSS-independently-of-the-default-router-lifetime.patch

33 lines
1.1 KiB
Diff
Raw Normal View History

2015-05-21 23:09:19 +00:00
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 13 Nov 2014 01:17:24 +0100
2016-11-16 02:44:04 +00:00
Subject: odhcp6c: always accept RDNSS, independently of the default router lifetime
2015-05-21 23:09:19 +00:00
diff --git a/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch b/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch
new file mode 100644
2016-11-16 02:44:04 +00:00
index 0000000..b9a9a83
2015-05-21 23:09:19 +00:00
--- /dev/null
+++ b/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch
2016-11-16 02:44:04 +00:00
@@ -0,0 +1,22 @@
2015-05-21 23:09:19 +00:00
+--- a/src/ra.c
++++ b/src/ra.c
2016-11-16 02:44:04 +00:00
+@@ -442,19 +442,6 @@ bool ra_process(void)
2015-05-21 23:09:19 +00:00
+ }
+ }
+ }
+-
+- int states[2] = {STATE_RA_DNS, STATE_RA_SEARCH};
+- for (size_t i = 0; i < 2; ++i) {
+- size_t ra_dns_len;
+- uint8_t *start = odhcp6c_get_state(states[i], &ra_dns_len);
+- for (struct odhcp6c_entry *c = (struct odhcp6c_entry*)start;
2016-11-16 02:44:04 +00:00
+- (uint8_t*)c < &start[ra_dns_len] &&
+- (uint8_t*)odhcp6c_next_entry(c) <= &start[ra_dns_len];
+- c = odhcp6c_next_entry(c))
2015-05-21 23:09:19 +00:00
+- if (IN6_ARE_ADDR_EQUAL(&c->router, &from.sin6_addr) &&
+- c->valid > router_valid)
+- c->valid = router_valid;
+- }
+ }
+
+ if (found)