From: David Härdeman Date: Fri, 17 Oct 2025 11:43:17 +0000 (+0200) Subject: dhcpv4: replace ToS precedence X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=c10784ece29c13f91517ef016b1b9d281dd4a2a7;p=project%2Fodhcpd.git dhcpv4: replace ToS precedence 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 Link: https://github.com/openwrt/odhcpd/pull/318 Signed-off-by: Álvaro Fernández Rojas --- diff --git a/src/dhcpv4.c b/src/dhcpv4.c index 9ab7869..3f41188 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -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");