radvd-project / radvd

radvd | Official repository: https://github.com/radvd-project/radvd
https://radvd.litech.org/
Other
203 stars 106 forks source link

separate config file prefix list from advert prefix list #39

Closed reubenhwk closed 3 years ago

reubenhwk commented 10 years ago

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.

reubenhwk commented 10 years ago

More details can be found in issue #36

mhanor commented 9 years ago

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.

mhanor commented 9 years ago

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.

reubenhwk commented 9 years ago

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.

mhanor commented 9 years ago

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?

jaredmauch commented 8 years ago

Is someone still looking at this issue?

reubenhwk commented 8 years ago

No. Looks like I gave it some thought and never did it.

reubenhwk commented 8 years ago

There's a related wrong-prefix branch. It seems related.

reubenhwk commented 8 years ago

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...

Neustradamus commented 4 years ago

Any news?