From 6e5aec718c0ee08deed0b213606c927c455965ac Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 3 Feb 2014 10:10:10 +0100 Subject: [PATCH] Revert "RA: fix on-link/off-link handling" New behavior breaks source-restrictions of on-link routes. This reverts commit 9817e4983c7d4e28f53b78d4fc6ea1eabed8affe. --- src/ra.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ra.c b/src/ra.c index 6132e45..560552f 100644 --- a/src/ra.c +++ b/src/ra.c @@ -356,18 +356,16 @@ bool ra_process(void) || entry.valid < entry.preferred) continue; + if (pinfo->nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_ONLINK) + changed |= odhcp6c_update_entry_safe(STATE_RA_ROUTE, &entry, 7200); + if (!(pinfo->nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_AUTO) || - pinfo->nd_opt_pi_prefix_len != 64) { - if (pinfo->nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_ONLINK) - changed |= odhcp6c_update_entry_safe(STATE_RA_ROUTE, &entry, 7200); + pinfo->nd_opt_pi_prefix_len != 64) continue; - } entry.target.s6_addr32[2] = lladdr.s6_addr32[2]; entry.target.s6_addr32[3] = lladdr.s6_addr32[3]; - if (!(pinfo->nd_opt_pi_flags_reserved & ND_OPT_PI_FLAG_ONLINK)) - entry.length = 128; changed |= odhcp6c_update_entry_safe(STATE_RA_PREFIX, &entry, 7200); } else if (opt->type == ND_OPT_RECURSIVE_DNS && opt->len > 2) { entry.router = from.sin6_addr; -- 2.39.5