Skip to content
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

gnrc_static: don't parse address as prefix #19313

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Feb 24, 2023

Contribution description

To parse the static upstream address we should use ipv6_addr_from_str(), not ipv6_prefix_from_str() - otherwise the address will only be considered valid if it comes with a prefix length.

Testing procedure

Run make -C examples/gnrc_border_router PREFIX_CONF=static all term

master

Upstream interface has no pre-configured address

Iface  5  HWaddr: 76:8F:E6:D7:42:6D 
          L2-PDU:1500  MTU:1500  HL:64  RTR  
          Source address length: 6
          Link type: wired
          inet6 addr: fe80::748f:e6ff:fed7:426d  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ffd7:426d
          
Iface  6  HWaddr: 56:FE  Channel: 26  NID: 0x23  PHY: O-QPSK 
          Long HWaddr: AE:0F:4D:73:F7:54:56:FE 
           State: IDLE 
          ACK_REQ  L2-PDU:102  MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::ac0f:4d73:f754:56fe  scope: link  VAL
          inet6 addr: 2001:db8::ac0f:4d73:f754:56fe  scope: global  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff54:56fe

this PR

upstream interface has pre-configured address

Iface  5  HWaddr: 76:8F:E6:D7:42:6D 
          L2-PDU:1500  MTU:1280  HL:64  RTR  
          Source address length: 6
          Link type: wired
          inet6 addr: fe80::748f:e6ff:fed7:426d  scope: link  VAL
 >>>      inet6 addr: 2001:db8:1::1  scope: global  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ffd7:426d
          inet6 group: ff02::1:ff00:1
          
Iface  6  HWaddr: 25:EF  Channel: 26  NID: 0x23  PHY: O-QPSK 
          Long HWaddr: AE:BB:DE:DD:00:85:A5:EF 
           State: IDLE 
          ACK_REQ  L2-PDU:102  MTU:1280  HL:64  RTR  
          RTR_ADV  6LO  IPHC  
          Source address length: 8
          Link type: wireless
          inet6 addr: fe80::acbb:dedd:85:a5ef  scope: link  VAL
          inet6 addr: 2001:db8::acbb:dedd:85:a5ef  scope: global  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ff85:a5ef

Issues/PRs references

@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System labels Feb 24, 2023
@benpicco benpicco added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 24, 2023
@benpicco benpicco requested review from maribu and fabian18 February 24, 2023 15:01
@benpicco benpicco force-pushed the gnrc_ipv6_static_addr-fix branch from 5368f62 to 4e64245 Compare February 24, 2023 15:03
@riot-ci
Copy link

riot-ci commented Feb 24, 2023

Murdock results

✔️ PASSED

4e64245 gnrc_static: don't parse address as prefix

Success Failures Total Runtime
6865 0 6865 09m:10s

Artifacts

@benpicco
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Feb 24, 2023

Build succeeded:

@bors bors bot merged commit 9d1d4bb into RIOT-OS:master Feb 24, 2023
@benpicco benpicco deleted the gnrc_ipv6_static_addr-fix branch February 24, 2023 19:28
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.04 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants