0003-odhcp6c-always-accept-RDNSS-independent-of-the-default-router-lifetime.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 13 Nov 2014 01:17:24 +0100
  3. Subject: odhcp6c: always accept RDNSS, independent of the default router lifetime
  4. diff --git a/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch b/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch
  5. new file mode 100644
  6. index 0000000..cb694ca
  7. --- /dev/null
  8. +++ b/package/network/ipv6/odhcp6c/patches/001-always_accept_rdnss.patch
  9. @@ -0,0 +1,21 @@
  10. +--- a/src/ra.c
  11. ++++ b/src/ra.c
  12. +@@ -438,18 +438,6 @@ bool ra_process(void)
  13. + }
  14. + }
  15. + }
  16. +-
  17. +- int states[2] = {STATE_RA_DNS, STATE_RA_SEARCH};
  18. +- for (size_t i = 0; i < 2; ++i) {
  19. +- size_t ra_dns_len;
  20. +- uint8_t *start = odhcp6c_get_state(states[i], &ra_dns_len);
  21. +- for (struct odhcp6c_entry *c = (struct odhcp6c_entry*)start;
  22. +- (uint8_t*)c < &start[ra_dns_len] && &c->auxtarget[c->auxlen] <= &start[ra_dns_len];
  23. +- c = (struct odhcp6c_entry*)(&c->auxtarget[c->auxlen]))
  24. +- if (IN6_ARE_ADDR_EQUAL(&c->router, &from.sin6_addr) &&
  25. +- c->valid > router_valid)
  26. +- c->valid = router_valid;
  27. +- }
  28. + }
  29. +
  30. + if (found)