dhcpv6: change dhcpv6 message type check in relay
authorPaul Donald <[email protected]>
Fri, 3 Oct 2025 12:59:55 +0000 (14:59 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Sun, 19 Oct 2025 17:33:20 +0000 (19:33 +0200)
commit7e78caac4eae5dfabc5f2128cac64d37512b0d81
treefb1d956b87adf01665fd096523a9838364a8383d
parent288abd9c40461a00d6a52b40153fbf13c423bc1f
dhcpv6: change dhcpv6 message type check in relay

When compiled, the switch instruction jump table O(1) is more efficient
than multiple logical comparisons in the if block (4-5 checks).

Signed-off-by: Paul Donald <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/279
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/dhcpv6.c