drivers/slipdev: report NETOPT_ADDRESS to simulate l2 address#16531
drivers/slipdev: report NETOPT_ADDRESS to simulate l2 address#16531miri64 merged 2 commits intoRIOT-OS:masterfrom
Conversation
|
Why do you need an L2 address for an end-to-end link? |
|
And why has it to be an EUI-64? |
|
Well GNRC needs it for all those |
But a link layer not having a link-layer address is a valid case. In that case the interface does not have an EUI-64. You can just use something like |
|
If you need an address for your connection over UART/USB why not use |
|
I added this because the DHCPv6 client was complaining about the lack of IID on the downstream interface. I also think some things (router solicitation?) would not work properly if the interface had no link-local address.
This was to connect multiple boards together using SLIP. Each board has two SLIP interfaces. |
Then the code need to be fixed, not the standard... DHCPv6 does not require an IID, only our implementation.
Still don't understand why you can't use Ethos for that, if you are going non-standard anyway... |
Ethos only supports a single interface and I don't need the Ethernet header overhead. |
Then invent your own link-layer protocol. We don't need the address overhead for SLIP either ;-). |
miri64
left a comment
There was a problem hiding this comment.
This is not in line with the SLIP standard and thus might lead to confusion when using with a SLIP demultiplexer not maintained by us (and I am not even sure how the Linux kernel reacts to a TUN interface suddenly having addresses). I rather would prefer an optional extension of SLIP.
|
The TUN interface does not have an address - the address is never transmitted over the wire. |
Still, can this be optional, please? I think we can prevent a lot of confusion in the future when doing so. The non-standard |
|
Ok, I hide it behind |
89ec6e2 to
8a28dc2
Compare
How about |
Still needs testing if everything still works with and without slipdev_l2addr.
A lot of things break if `GNRC_NETIF_FLAGS_HAS_L2ADDR` is not set. In order to handle router advertisements and auto-configureation, generate a faux l2 address based on the netdev ID.
9d84263 to
c1eead9
Compare
|
Since this is almost done do you want it for this release or should we push it until later? |
|
Tested with With
|
miri64
left a comment
There was a problem hiding this comment.
Let's give Murdock a final spin, as the last one was a few weeks ago. Other than that: ACK.

Contribution description
A lot of things break if
GNRC_NETIF_FLAGS_HAS_L2ADDRis not set (failed asserts, no IPv6 IID).In order to handle router advertisements and auto-configuration, generate a faux l2 address based on the netdev ID.
Testing procedure
In combination with #16530 SLIP can now be used as a downstream interface for board to board communication:
I ran this on
same54-xprowith examples/gnrc_networking with the following modules added:The SLIP interface now has a hardware address, which gives it a link-local address and the possibility to get a prefix via DHCPv6:
The node on the other side also gets a link-local and a global address:
Issues/PRs references