-
Notifications
You must be signed in to change notification settings - Fork 149
DHCP6: Improve which priority DHCP replies are sent to on RENEW #715
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -925,8 +925,7 @@ ipv6_findaddrmatch(const struct ipv6_addr *addr, const struct in6_addr *match, | |||||||||||||
| if ((addr->flags & (IPV6_AF_ADDED | IPV6_AF_DADCOMPLETED)) == | ||||||||||||||
| (IPV6_AF_ADDED | IPV6_AF_DADCOMPLETED)) | ||||||||||||||
| return 1; | ||||||||||||||
| } else if (addr->prefix_vltime && | ||||||||||||||
| IN6_ARE_ADDR_EQUAL(&addr->addr, match) && | ||||||||||||||
| } else if (IN6_ARE_ADDR_EQUAL(&addr->addr, match) && | ||||||||||||||
| (!flags || addr->flags & flags)) | ||||||||||||||
| return 1; | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -971,11 +970,7 @@ ipv6_doaddr(struct ipv6_addr *ia, struct timespec *now) | |||||||||||||
| ipv6_deleteaddr(ia); | ||||||||||||||
| eloop_q_timeout_delete(ia->iface->ctx->eloop, ELOOP_QUEUE_ALL, | ||||||||||||||
| NULL, ia); | ||||||||||||||
| if (ia->flags & IPV6_AF_REQUEST) { | ||||||||||||||
| ia->flags &= ~IPV6_AF_ADDED; | ||||||||||||||
| return 0; | ||||||||||||||
| } | ||||||||||||||
| return -1; | ||||||||||||||
| return ia->flags & IPV6_AF_REQUEST ? 0 : -1; | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win Clear When Keep the request entry by returning Proposed fix if (ia->flags & IPV6_AF_REQUEST) {
- return ia->flags & IPV6_AF_REQUEST ? 0 : -1;
+ ia->flags &= ~IPV6_AF_ADDED;
+ return 0;
}
+return -1;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| if (ia->flags & IPV6_AF_STALE || IN6_IS_ADDR_UNSPECIFIED(&ia->addr)) | ||||||||||||||
|
|
||||||||||||||
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: NetworkConfiguration/dhcpcd
Length of output: 50383
🏁 Script executed:
Repository: NetworkConfiguration/dhcpcd
Length of output: 18788
🏁 Script executed:
Repository: NetworkConfiguration/dhcpcd
Length of output: 16516
🏁 Script executed:
Repository: NetworkConfiguration/dhcpcd
Length of output: 12128
🏁 Script executed:
Repository: NetworkConfiguration/dhcpcd
Length of output: 12670
Exclude zero-lifetime entries from shared matching.
ipv6_freedrop_addrscan select an expired Router Advertisement entry throughipv6_findaddrand pass it toipv6_addaddr, which can re-add the expired address. Keep zero-lifetime matching in the DHCPv6-specific path.🤖 Prompt for AI Agents