Replies: 11 comments 1 reply
-
It would be best that you try this specific feature in |
Beta Was this translation helpful? Give feedback.
-
I briefly checked the code and it seems that the issue will still be present on the current main. To be honest I've got a bit confused about how this
Because of this, I think we should stick to the current approach to determine LL address length, but perhaps introduce a fallback mechanism - if there's no LL address on a packet (as in the case of a dummy L2), get the LL address length from the interface, as it used to be done before. @jukkar @alexanderwachter Any opinion on this? |
Beta Was this translation helpful? Give feedback.
-
I am not sure what is the actual issue here. For TUN devices (that do not have L2), the link layer address is not used and for example IPv6 NAs are not needed for anything. For those kind of device, only IP routing can be used. |
Beta Was this translation helpful? Give feedback.
-
Without diving too much into it, I can say the following: Our dummy SLIP interfaces do have a MAC address as shown by the "net iface" shell command. See https://elixir.bootlin.com/zephyr/latest/source/drivers/net/slip.c#L421 (we changed the random generation bit to have reproducible and fixed MAC addresses, but that doesn't matter):
When all is fine, these are actually resolved correctly using the ND protocol. ICMPv6 and TCP traffic is able to work just fine. With the change from debc8d6, I can see that the neighbor table gets incoherent on our Zephyr router. I also have occasional In both examples that follow, I am routing packets between EE:C1:78:A8:7B:60 (Zephyr dev #1) and DC:A6:32:00:61:A4 (Linux RPi). We effectively have the following architecture:
Here is the neighbor table on Zephyr dev #4 (router) when things are fine (without debc8d6):
Here is an example of the neighbor table when things go south (with debc8d6):
In the second example, |
Beta Was this translation helpful? Give feedback.
-
You seem to have enabled TAP interface in Linux (as I see Ethernet mentioned in the description). If this is really the case, then you also need to enable |
Beta Was this translation helpful? Give feedback.
-
I now wonder, if you rely on LL adressing in your router device, why using |
Beta Was this translation helpful? Give feedback.
-
@zkrx could you please respond to the comments by @jukkar and @rlubos? |
Beta Was this translation helpful? Give feedback.
-
Hey, of course. I am still investigating this on my end, hence the delay. To clarify my situation a bit, our "router" has a standard ethernet interface (hence "TAP") connected to a Linux device on one end, and multiple SLIP interfaces ("TUN") on the other. The Linux device estabilishes TCP connections with our SLIP devices through our zephyr router. I tried playing with Keeping As a side note, in case @rlubos ' workaround is not implemented, I now wonder if NDP frames should even be forwarded to non-TAP interfaces at all. Perhaps no device from those non-TAP interfaces should even appear in the neighbor table. This would then be clear that NDP is not supported for TAP=n. Thank you all for your answers so far. |
Beta Was this translation helpful? Give feedback.
-
My say here is that we should disable ND for non-TAP slip interfaces. I'm currently working on a feature which would allow to do that on per-interface basis, instead of disabling ND globally with Kconfig.
That's another reason the design seems to be flawed for non-TAP interfaces. The purpose of Anyway, I see that there is some fallback mechanism implemented when there is no entry in the routing table - the IPv6 stack will scan over all available interfaces to see if there's a prefix match, and if so, it'd forward the packet into that interface. Perhaps that's the way to go here. |
Beta Was this translation helpful? Give feedback.
-
Given that this does not seem to be an issue in the codebase itself, but rather an "abuse" of the implementation that stopped working, I am converting this issue to a Discussion. The conversation can continue there all the same. |
Beta Was this translation helpful? Give feedback.
-
So I had a look at the code in question [1]. My understanding, based on your message and my own testing, is that this fallback code will not be hit without disabling NDP. Which I cannot afford to do for all interfaces.
If my above understanding is right, then this would be a good solution for us since I could disable NDP for our SLIP interfaces only and let it fallback on a prefix match. Would you have any kind of ETA? Or a ticket/discussion that I could subscribe to? [1] https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/net/ip/net_if.c#L2407 |
Beta Was this translation helpful? Give feedback.
-
We have been running Zephyr 1.14 on our custom boards for a long time. We have a somewhat exotic setup using CONFIG_NET_ROUTING=y on a device that has an ethernet interface on one side and several SLIP interfaces (each SLIP iface using CONFIG_SLIP_TAP=n) on the other. All our devices use IPv6. We are slowly catching up with latest Zephyr versions. We have now reached 2.4 and we noticed that our networking broke. A first inquiry showed that the neighbor table on our Zephyr router is wrong/incomplete on 2.4.
I could pinpoint the issue to the following commit:
debc8d6
Which was part of the following PR:
#16201
Since CONFIG_SLIP_TAP=n doesn't send MAC addresses on the wire,
net_pkt_lladdr_src(pkt)->len
will be 0 for these incoming NA packets, andnbr_lladdr.len
will be assigned the value of 0. This means that the neighbor table will be incomplete/incorrect.Therefore, I believe that the above commit broke ICMPv6 Neighbor Discovery for interfaces with CONFIG_SLIP_TAP=n. This problem is potentially made apparent by the fact that we also use CONFIG_NET_ROUTING=y. I guess that packets have trouble getting routed to the right interface if the neighbor table is incorrect.
Reverting that commit solves our problem. I think that this issue is still present on latest Zephyr since the offending line is still there, but I cannot test it since we are still too far behind.
Beta Was this translation helpful? Give feedback.
All reactions