sys: net: gnrc: ndp: consider all interfaces for on-link targets#4456
sys: net: gnrc: ndp: consider all interfaces for on-link targets#4456kaspar030 wants to merge 1 commit intoRIOT-OS:masterfrom
Conversation
|
@kaspar030, IMO the current behavior for this setup is not a bug. In your example, you should be able to ping |
|
@OlegHahm is right, the correct way to approach this is over the FIB. |
(this is just to summarize opinions from IRC) Also, if a packet arrives through one interface, RIOT should still use the best-matching prefix on any interface to send the reply, right? |
|
I'm not sure if you read my previous statement, before you wrote that, but that is exactly what the FIB is for... |
|
Otherwise you weaken the definition between what a node is and what an interface is and by doing so you might screw with the routing behavior. |
Does this mean we should populate the fib then with default routes when adding addresses to the interface? This won't work anymore if we do not compile the fib into the binary. |
|
Yes (that's what Linux is doing in the background too btw afaik). If you do have multiple interfaces it does not make much sense to have no FIB IMHO. |
Why? If RIOT receives any IP packet and it is the final destination for that packet and it is a router, it should deliver that packet (which it does). But then, if RIOT sends a packet to the original sender, it should also be able to figure out the way back. IMHO making a difference between "fib" and "we save the prefix length with interfaces" doesn't make sense. From a conceptual PoV, they're the same: a table deciding what to use as next hop. |
|
If I look at the diff: what happens if the upper layer wants to explicitly send over a certain interface? IMO the lower layer (ND in this case) should not ignore that. |
Is there a use-case for non-link-local packets? edit I mean, for IPv6 non-link-local packets with a forced egress interface? |
|
Routing metrics for example. |
|
Testing RIOT (at least that is something where I use forced egress interfaces a lot on Linux ;-)) |
wouldn't they be part of the routing decision, not an "upper layer request"? |
|
Not sure if I fully understand the trend of the conversation here. There are two problems as far as I can see:
For the second point, wouldn't that belong in another PR anyway? |
|
After today's discussion: can we close this? |
|
Can someone summarize the outcome of this meeting regarding this issue here? |
|
Here is the idea of the protocol (@cgundogan @emmanuelsearch @haukepetersen @kaspar030 @thomaseichinger please correct me if there is something wrong about that):
With this no NDP hacks as this one are necessary. |
|
Maybe I misunderstand something. I thought this issue was about the following:
|
|
Yes but only because the FIB wasn't configured properly. The procedure above would update FIB and prefix list and take care that the situation you described doesn't happen anymore. The solution offered by this PR is more of a hack than a solution for this. |
|
Sounds somewhat strange to me. Why do we need an UDP based protocol for that. Can't we configure locally on the node if it should respond to an address that is configured to any interfaces vs. only to addresses configured to the receiving interface? |
This is not correct. Currently, it is impossible to say "prefix A is on link on interface X" other by setting an address on that interface, which implicitly adds it to the prefix list. The issue from this PR stands. |
The protocol has nothing to do with the issue here.
A node not answering to global addresses, no matter on which interface they're configured, is a bug (or an administrativly desired cut in otherwise expected connectivity). While as a next step that should be configurable, the current issue is that RIOT sends the reply over the link the original target is configured on, and not over the link that has the target address as on-link prefix. |
This shouldn't be fixed in the forwarding routine, but in the destination address check. |
|
I think we can either hardcode this (always answer to addresses configured to any interface) or setup an according forwarding rule (which is IMO conceptually more correct). I think both solutions have pros and cons. |
|
Yes, but this doesn't setup forwarding rules, it by-passes them. |
|
That's why I don't ACK. ;) |
|
Consider #4738 as an alternative |
This doesn't need a special forwarding rule. RIOT already answers to the ping. |
|
@kaspar030 this has nothing to do with forwarding, but address assignment. |
|
(or am I missing something?) |
|
Hm, not forwarding, but next-hop determination. When answering, RIOT doesn't consider the prefix assigned to it's ethos interface, then selects the 6lo for sending the reply. (possibly because of internal_default_router). |
|
I thought in your scenario the Anyway after this long discussion and now that I read the algorithm again, I might think that you are right regarding next-hop determination. The "I ping a node, but it does not answer for the non-receiving interface"-problem you hinted at earlier isn't fixed by this however and we still should consider #4738. |
Can you elaborate? |
|
echo request comes in on interface 5, gnrc decides it is for us, re-queues the packet, it arrives on interface 6, icmp handles it, tries to send the echo reply (with "iface 6" set, _next_hop_l2addr doesn't consider interface 5 when looking up target as interface is set, no next hop is found, internal_default_router finds a router, reply is sent there). Everything in brackets is theory. |
|
I can't follow, you're too fast for an old man. Let's break it down:
ad 3. Why would it be re-queued? ad 4. It arrives on another interface now? Why? Who sent it? |
|
Solved by #4738. |
I stumbled over this in the following setup:
edit I'm using ethernet (ethos) between linux and 6lr and both RIOT's are samr21 xpro.
Without this patch, when trying to ping dead::1 from Linux host, RIOT tries to only consider prefixes from it's sixlowpan interface, so communication doesn't work.
With this patch, RIOT considers all configured prefixes for the best match.