projects
/
project
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b33974
)
router: improve deprecation handling
author
Steven Barth
<steven@midlink.org>
Thu, 20 Aug 2015 08:45:31 +0000
(10:45 +0200)
committer
Steven Barth
<steven@midlink.org>
Thu, 20 Aug 2015 08:45:31 +0000
(10:45 +0200)
src/router.c
patch
|
blob
|
history
src/router.h
patch
|
blob
|
history
diff --git
a/src/router.c
b/src/router.c
index
d7452f5
..
1ae8d1a
100644
(file)
--- a/
src/router.c
+++ b/
src/router.c
@@
-314,6
+314,8
@@
static uint64_t send_router_advert(struct interface *iface, const struct in6_add
p->nd_opt_pi_valid_time = htonl(TIME_LEFT(addr->valid, now));
if (addr->preferred > (uint32_t)now)
p->nd_opt_pi_preferred_time = htonl(TIME_LEFT(addr->preferred, now));
+ else if (addr->valid - now < 7200)
+ p->nd_opt_pi_valid_time = 0;
if (TIME_LEFT(addr->preferred, now) > dns_time) {
diff --git
a/src/router.h
b/src/router.h
index
720490d
..
5b5f4d7
100644
(file)
--- a/
src/router.h
+++ b/
src/router.h
@@
-31,7
+31,7
@@
struct icmpv6_opt {
#define MaxValidTime 65535
-#define MaxRtrAdvInterval
(MaxValidTime / 3)
+#define MaxRtrAdvInterval
1800
#define ND_RA_FLAG_PROXY 0x4
#define ND_RA_PREF_HIGH (1 << 3)