Closed reubenhwk closed 3 years ago
More details can be found in issue #36
I will test it. A quick note: on Debian 7, the older version of check doesn't support srunner_run, ck_assert_ptr_eq, ck_assert_ptr_ne. Running make check is not possible on it.
The DeprecatePrefix option should be taken into account when the prefix is removed from the interface. But it advertizes 7203 seconds of prefix lifetime only on radvd shutdown.
Hi mhanor,
I'm trying to think through the problem before trying to solve it...
Seems like the prefix list needs to be generated in netlink.c where radvd is informed of added/removed addresses. Right now (in wrong-prefix branch) the list is generated in send just before sending. So if an address is removed from and interface, there's no way to know the old prefixes to deprecate.
The prefix list need to be maintained in the netlink code, not in send, and the state_info.cease_adv (the flag to deprecate prefixes), need to move from the iface to the prefix structure...from the netlink code, when an address is removed, that address's prefix structure's cease_adv can be set, the netlink code can then call send_ra to send the adverts to deprecate the prefix, then the prefixes with cease_adv set can be removed from the list.
Does that make sense to you?
On Wed, Dec 10, 2014 at 12:27 PM, mhanor notifications@github.com wrote:
The DeprecatePrefix option should be taken into account when the prefix is removed from the interface. But it advertizes 7203 seconds of prefix lifetime only on radvd shutdown.
— Reply to this email directly or view it on GitHub https://github.com/reubenhwk/radvd/issues/39#issuecomment-66518189.
Yes, maintaining the prefix list in netlink.c makes sense. It's also less optimal to re-generate the prefix list each time we want to send RAs. If nothing changes, why do it?
Is someone still looking at this issue?
No. Looks like I gave it some thought and never did it.
There's a related wrong-prefix branch. It seems related.
I dumped the wrong-prefix branch because it was too old and I didn't like the code anyway. I'm going to make another attempt at this...
Any news?
The way RADVD works now, all the prefixes that can be sent are generated from the config file parser when the config file is parsed. This is a problem with some type of automatic prefix is selected, ::/64, Base6Interface, Base6to4Interface.
The problem is when that interface comes up, radvd doesn't know to check new prefixes on that interface unless it reparses the config file.
What need to be done is to migrate logic from the parser into the send_ra code.