-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gnrc_netif_lorawan: add support for LINK_UP/_DOWN events #18699
gnrc_netif_lorawan: add support for LINK_UP/_DOWN events #18699
Conversation
3d2c2b6
to
ed4b21b
Compare
ed4b21b
to
175a152
Compare
Rebased and adopted for the change introduced in #18708 |
db7e1f5
to
4ac0740
Compare
4ac0740
to
4ac550c
Compare
Rebased to current master. No longer waiting for another PR. |
4ac550c
to
98f70f9
Compare
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.
examples/gnrc_border_router
still works on esp32-wroom-32
2022-10-11 22:52:47,163 # Iface 9 HWaddr: 3C:71:BF:9E:13:FD Channel: 6
2022-10-11 22:52:47,166 # L2-PDU:249 MTU:1280 HL:64 RTR
2022-10-11 22:52:47,170 # 6LO Source address length: 6
2022-10-11 22:52:47,172 # Link type: wireless
2022-10-11 22:52:47,178 # inet6 addr: fe80::3e71:bfff:fe9e:13fd scope: link VAL
2022-10-11 22:52:47,181 # inet6 group: ff02::2
2022-10-11 22:52:47,184 # inet6 group: ff02::1
2022-10-11 22:52:47,187 # inet6 group: ff02::1:ff9e:13fd
2022-10-11 22:52:47,188 #
2022-10-11 22:52:47,193 # Iface 10 HWaddr: 3C:71:BF:9E:13:FC Channel: 0 Link: down
2022-10-11 22:52:47,197 # L2-PDU:1500 MTU:1500 HL:64 RTR
2022-10-11 22:52:47,200 # Source address length: 6
2022-10-11 22:52:47,203 # Link type: wireless
2022-10-11 22:52:47,206 # inet6 group: ff02::2
2022-10-11 22:52:47,208 # inet6 group: ff02::1
2022-10-11 22:52:47,209 #
2022-10-11 22:52:49,254 # WiFi connected to ssid beersperminute, channel 1
2022-10-11 22:54:40,175 # > ifconfig
2022-10-11 22:54:40,179 # Iface 9 HWaddr: 3C:71:BF:9E:13:FD Channel: 1
2022-10-11 22:54:40,183 # L2-PDU:249 MTU:1280 HL:64 RTR
2022-10-11 22:54:40,187 # RTR_ADV 6LO Source address length: 6
2022-10-11 22:54:40,190 # Link type: wireless
2022-10-11 22:54:40,196 # inet6 addr: fe80::3e71:bfff:fe9e:13fd scope: link VAL
2022-10-11 22:54:40,203 # inet6 addr: 2001:9e8:1436:e5fc:3e71:bfff:fe9e:13fd scope: global VAL
2022-10-11 22:54:40,205 # inet6 group: ff02::2
2022-10-11 22:54:40,208 # inet6 group: ff02::1
2022-10-11 22:54:40,212 # inet6 group: ff02::1:ff9e:13fd
2022-10-11 22:54:40,213 #
2022-10-11 22:54:40,218 # Iface 10 HWaddr: 3C:71:BF:9E:13:FC Channel: 1 Link: up
2022-10-11 22:54:40,222 # L2-PDU:1500 MTU:1492 HL:255 RTR
2022-10-11 22:54:40,225 # Source address length: 6
2022-10-11 22:54:40,228 # Link type: wireless
2022-10-11 22:54:40,233 # inet6 addr: fe80::3e71:bfff:fe9e:13fc scope: link VAL
2022-10-11 22:54:40,240 # inet6 addr: 2001:9e8:1436:e500:3e71:bfff:fe9e:13fc scope: global VAL
2022-10-11 22:54:40,243 # inet6 group: ff02::2
2022-10-11 22:54:40,246 # inet6 group: ff02::1
2022-10-11 22:54:40,249 # inet6 group: ff02::1:ff9e:13fc
Please squash
I see the WG SSID did not change in the past 10 years :D |
789b878
to
5f504ad
Compare
Iface 9 is not WiFi, I assume? |
(because it says "wireless") |
Iface 9 is |
Murdock results✔️ PASSED 7f146b6 tests/gnrc_ipv6_nib: up interface on initial initialization
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
Mh, the test expects the address to be configured. Wasn't there some way to wait for the up event? |
Ah, since it is only a mock interface, I can just call |
The test needs to call |
Since SLAAC now happens on the up event, the tests needs to ensure, that `gnrc_ipv6_nib_iface_up()` is called before assuming SLAAC happened. For the mock interface, this is done by gnrc_ipv6_nib_iface_up().
Contribution description
This prepares for SCHC support with LoRaWAN, by adding UP/DOWN events to
gnrc_netif_lorawan
. Since with LoRaWAN there is only a hardware address (and thus an IID) after the device joined the network (which is the UP event), auto-configuration of link-local addresses needs to be done on UP. Since the hardware address (and the IID for that matter, see https://datatracker.ietf.org/doc/html/rfc9011#section-5.3) might change on the next connect, the link-local address needs to be removed on down.Testing procedure
Sadly, there is no IPv6 support for LoRaWAN yet, so only a compile test must suffice for now. However, I need this for SCHC and IPv6 support (i.e. SCHC) for LoRaWAN is needed to test this, so this is somewhat of a hen-and-egg problem...
Issues/PRs references
In preparation for #18700.
Requires
#18708(merged).