Skip to content

dhcpv6-ia: IA case refactor#360

Merged
openwrt-bot merged 1 commit intoopenwrt:masterfrom
systemcrash:ia_switches
Dec 22, 2025
Merged

dhcpv6-ia: IA case refactor#360
openwrt-bot merged 1 commit intoopenwrt:masterfrom
systemcrash:ia_switches

Conversation

@systemcrash
Copy link
Contributor

The semantics and logic are preserved, and hopefully readability is improved by breaking up some of those monster if conditions.

@Alphix @Noltari

@systemcrash
Copy link
Contributor Author

So... I've been running this for a while now, although I'd feel better if others could pick and run this in production to verify also. I don't see any behaviour changes. The rebind case that was moved to the end is semantically identical, and those look the same in my captures.

@systemcrash systemcrash marked this pull request as ready for review December 19, 2025 13:08
@Noltari
Copy link
Member

Noltari commented Dec 22, 2025

@systemcrash should we squash both commits since the title/description are exactly the same?

@systemcrash
Copy link
Contributor Author

systemcrash commented Dec 22, 2025

Sure. Wanted to make review easier.

Noltari pushed a commit to systemcrash/odhcpd that referenced this pull request Dec 22, 2025
Rewrite core logic using switch cases for clarity and improved
performance. This also simplifies the DHCPV6_MSG_REBIND cases:

DHCPV6_MSG_REBIND and !a is parsed in the switch
DHCPV6_MSG_REBIND and a is now parsed after the switch (5 lines)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
openwrt#360
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Rewrite core logic using switch cases for clarity and improved
performance. This also simplifies the DHCPV6_MSG_REBIND cases:

DHCPV6_MSG_REBIND and !a is parsed in the switch
DHCPV6_MSG_REBIND and a is now parsed after the switch (5 lines)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
openwrt#360
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
@openwrt-bot openwrt-bot merged commit 9857adb into openwrt:master Dec 22, 2025
9 checks passed
@Noltari
Copy link
Member

Noltari commented Dec 22, 2025

Merged, thanks @systemcrash!

@systemcrash systemcrash deleted the ia_switches branch December 22, 2025 17:34
Noltari pushed a commit to Noltari/odhcpd that referenced this pull request Jan 25, 2026
Rewrite core logic using switch cases for clarity and improved
performance. This also simplifies the DHCPV6_MSG_REBIND cases:

DHCPV6_MSG_REBIND and !a is parsed in the switch
DHCPV6_MSG_REBIND and a is now parsed after the switch (5 lines)

(cherry picked from commit 9857adb)
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
openwrt#360
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
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.

3 participants