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:
d111809
)
router: support ra_lifetime being 0
author
Jan-Philipp Litza
<jplitza@users.noreply.github.com>
Thu, 4 Jul 2019 11:31:25 +0000
(13:31 +0200)
committer
Hans Dedecker
<dedeckeh@gmail.com>
Sun, 7 Jul 2019 20:02:49 +0000
(22:02 +0200)
The value 0 has the special meaning of not being a default router. This
is useful to only advertise prefixes or DNS settings without being a
real router.
Signed-off-by: Jan-Philipp Litza <janphilipp@litza.de>
src/router.c
patch
|
blob
|
history
diff --git
a/src/router.c
b/src/router.c
index 50324283d4e5bca231b3ba3527d6fb89b10886d0..0040e7a1f8bdd12d0950f1e97c26a6cd89af9c4c 100644
(file)
--- a/
src/router.c
+++ b/
src/router.c
@@
-354,7
+354,7
@@
static uint32_t calc_ra_lifetime(struct interface *iface, uint32_t maxival)
if (iface->ra_lifetime >= 0) {
lifetime = iface->ra_lifetime;
- if (lifetime < maxival)
+ if (lifetime
> 0 && lifetime
< maxival)
lifetime = maxival;
else if (lifetime > 9000)
lifetime = 9000;