-
Notifications
You must be signed in to change notification settings - Fork 2k
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
ng_ndp: cache determined next-hop in FIB #3148
Conversation
* for later sends */ | ||
fib_add_entry(iface, (uint8_t *)dst, sizeof(ng_ipv6_addr_t), 0, | ||
(uint8_t *)next_hop_ip, sizeof(ng_ipv6_addr_t), 0, | ||
UINT32_MAX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change to FIB_LIFETIME_NO_EXPIRE
(same below)
The added FIB entries need to be removed if the neighbour node is not reachable anymore, since then a next-hop request (if the FIB is active) will always successfully lead to nirvana. |
@BytesGalore does |
Also, can routing protocols cope with the fact, that this would "randomly" remove stuff from the FIB. @Lotterleben @cgundogan? |
yup, no mercy. The FIB do not determine if an entry is allowed to be deleted. @authmillenon you're right this is a problem since usually each routing protocol is responsible for a specific prefix. |
So maybe I should give them a "reasonable lifetime" instead? I think about
|
+1 for the reasonable lifetimes if they expire the FIB entry is removed automatically.
The FIB can handle access and manipulation from different sources. |
Since the routing protocols probably use prefixes for the next-hop entries and I am using the full addresses, there should be no collision right? Just one OT question popping-up: How ARE prefixes handled in the FIB? Up until now I assumed this is the |
If this is the case right :)
Currently with bytes (I know this is wrong 😊) but, |
oh, and when using IPv4, the subnet mask shouldn't be needed when an entry is flagged as prefix, since the trailing 0-Bits define the size of the subnet. |
But weren't subnet masks introduced because there weren't enough prefixes left, making subnets defined by stuff like e.g. 63.255.0.0 possible, too? |
(I know this discussion is going a little bit meta now :D will fix the timeouts soon). |
oh and regarding overwriting entries of RPs: this should be more or less impossible, since in l351 it is checked if there is already something in the FIB. I say "more or less" since I think the IPv6 thread can't be preempted by the routing protocol in this function, but I might be wrong there. |
To recap: I assume that it is safe to just remove the destination if the neighbor becomes unreachable, since it is unlikely that the routing protocol will add it exactly as in this function. |
somehow. If I remember right they were extended form Class-Network prefixes only to enable an arbitrary number of significant bits for private networks.
I can't tell for sure, but feels like not (or a proprietary and error-prone solution). |
ccfeb02
to
fa5a408
Compare
fa5a408
to
0465b83
Compare
Rebased and had to squash, since |
ACK, lets see what travis says |
ng_ndp: cache determined next-hop in FIB
RFC 4861 recommends the store the determined next-hop in the "Destination Cache". For my implementation I use the FIB as such, if it is availabe, so I cache the next hops not fount in the FIB also in there to shorten the determination for later packages.