Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read or delete autowired routes on startup #32

Closed
DarthGandalf opened this issue Aug 7, 2017 · 1 comment
Closed

Read or delete autowired routes on startup #32

DarthGandalf opened this issue Aug 7, 2017 · 1 comment
Milestone

Comments

@DarthGandalf
Copy link

Followup to #30

If ndppd segfaults for any reason, and gets restarted, the previously added routes will never get deleted? ndprbrd handles this case by "protocol 100", and reading such routes from the routing table upon startup.

@john-sharratt

ndprbrd deletes them after the expiration period. It may be easier to delete them immediately on startup, but then in the first minute IPv6 connectivity may be more broken.

@DarthGandalf DarthGandalf changed the title Read autowired routes on startup Read or delete autowired routes on startup Aug 7, 2017
@CasperVector
Copy link

CasperVector commented Sep 2, 2018

OpenWRT's odhcpd does not maintain the expiration table itself, but relies on the kernel's neighbour table and the assumption that ICMPv6 is not filtered by the hosts involved: it does not relay NSs and NAs by itself, but pings the destination address on network segment(s) other than the source segment; it then watches the neighbour table for changes, and sets up entries for said address in the NDP proxy table as well as the routing table accordingly. This mechanism also seems to be an alternative way to solve the issue which resulted in the creation of ndprbrd.
I have just slimmed down the odhcpd codebase (which also takes care of DHCPv6 and router discovery, and uses OpenWRT's libubox and UCI which are not widely adopted elsewhere) to ease integration in regular Linux distros. If you intend to implement a similar mechanism in ndppd, the spin-off might be of some interest. However, do note that the odhcpd codebase is GPLv2 only and therefore cannot be copied directly into ndppd which is GPLv3+; additionally, the codebase relies on libnl and epoll(), which makes it unportable outside of Linux.
A shortcoming of odhcpd's mechanism is that, depending on when the NDP proxy entry is setup, the first NS/NA packets might appear to be dropped. Additionally, this mechanism is still vulnerable to a rare race condition: if an entry was removed from the neighbour table when odhcpd is somehow not running, the corresponding entries in the NDP proxy table and the routing table would not be deleted; however, this seems much less likely to occur than the problem you mentioned.

@DanielAdolfsson DanielAdolfsson added this to the 1.0 milestone Dec 13, 2019
DanielAdolfsson added a commit that referenced this issue Dec 14, 2019
For now, owned routes are simply routes that have protocol 72 on Linux,
or PROTO3 flag on BSD. This first implementation removes all owned routes
when ndppd starts. #32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants