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

update lease when device moves to different network #777

Merged
merged 4 commits into from
Nov 20, 2023

Conversation

BeryJu
Copy link
Owner

@BeryJu BeryJu commented Nov 19, 2023

closes #762

Previously, when a device moved to a different network while keeping the same identifier, it would get the same lease it did before, even if that lease was not in the new scope the device is now in.

This adds a check to ensure that before a lease is returned, it must be in the same scope that would be picked for a new device. If that isn't the case, the lease is updated to use the new scope, and gets a new address assigned. All other options of the lease are kept as they were, including expiry and reservation status

Copy link

netlify bot commented Nov 19, 2023

Deploy Preview for beryju-gravity canceled.

Name Link
🔨 Latest commit 96d84bf
🔍 Latest deploy log https://app.netlify.com/sites/beryju-gravity/deploys/655aaacf33d6ec0008ed399b

Copy link

codecov bot commented Nov 19, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (1201df8) 58.89% compared to head (96d84bf) 57.64%.
Report is 3 commits behind head on main.

Files Patch % Lines
pkg/roles/dhcp/leases.go 64.86% 9 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #777      +/-   ##
==========================================
- Coverage   58.89%   57.64%   -1.26%     
==========================================
  Files         106       89      -17     
  Lines        5873     4571    -1302     
==========================================
- Hits         3459     2635     -824     
+ Misses       2082     1665     -417     
+ Partials      332      271      -61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BeryJu BeryJu merged commit c3ac6d2 into main Nov 20, 2023
10 of 12 checks passed
@BeryJu BeryJu deleted the fix-scope-changing-device branch November 20, 2023 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DHCP client roaming across scopes doesn't work correctly
1 participant