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/ipv6: Check for overflow #20771

Merged
merged 2 commits into from
Jul 4, 2024
Merged

gnrc/ipv6: Check for overflow #20771

merged 2 commits into from
Jul 4, 2024

Conversation

xnumad
Copy link
Contributor

@xnumad xnumad commented Jul 3, 2024

Contribution description

Avoid overflows when subtracting current time from point in time that is assumed to be in the future, which however sometimes is not the case. For the changed lines of this PR, such an overflow has been encountered. There may still be more cases.

Testing procedure

Have a 6LN in a state where it has a deprecated prefix (i.e. preferred lifetime = 0) in its prefix list.

  • Observe "nib prefix" printing an overflown value for the preferred lifetime, when it should print 0.
  • If the 6LN is a 6LR or 6LBR, it sends a Router Advertisement with a Prefix Information Option with an overflown value for the preferred lifetime, when it should be 0.

@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System labels Jul 3, 2024
Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the overflow check and handling looks sensible. I'm not an expert on gnrc though.

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 4, 2024
@benpicco benpicco requested a review from fabian18 July 4, 2024 09:41
@riot-ci
Copy link

riot-ci commented Jul 4, 2024

Murdock results

✔️ PASSED

81a1e99 gnrc/ipv6: fix: Overflow in sent packet

Success Failures Total Runtime
10178 0 10178 17m:05s

Artifacts

@benpicco benpicco added this pull request to the merge queue Jul 4, 2024
Merged via the queue into RIOT-OS:master with commit b55efe2 Jul 4, 2024
27 checks passed
@mguetschow mguetschow added this to the Release 2024.07 milestone Jul 5, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants