dhcpv4: replace ToS precedence
authorDavid Härdeman <[email protected]>
Fri, 17 Oct 2025 11:43:17 +0000 (13:43 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Sun, 23 Nov 2025 19:05:03 +0000 (20:05 +0100)
The IPTOS_PREC_* values are deprecated since RFC2474 §4.2.2.1 (Dec 1998)
replaced them with class selector codepoints.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/318
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/dhcpv4.c

index 9ab78695ad3798ad1817cd1b954fd6f785adaf84..3f41188be575ecb4bd397a976a70a40b90913131 100644 (file)
@@ -1488,7 +1488,7 @@ int dhcpv4_setup_interface(struct interface *iface, bool enable)
                goto out;
        }
 
-       val = IPTOS_PREC_INTERNETCONTROL;
+       val = IPTOS_CLASS_CS6;
        if (setsockopt(iface->dhcpv4_event.uloop.fd, IPPROTO_IP, IP_TOS, &val,
                       sizeof(val)) < 0) {
                error("setsockopt(IP_TOS): %m");