summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2024-02-05 10:36:05 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2024-02-06 14:24:40 +0100
commitd8b33e2a97cdc3187cda7a776ae3a91f615d40cb (patch)
treea4abeeb799de7282c485bb76697174d08fc7f1dd
parentd920b48a5fa6fcb71b2df307fe7255328add19fc (diff)
n-dhcp4: change the default DSCP value to 0bg/dhcp-dscp
Section 4.9 of RFC 4594 specifies that DHCP should use the standard (CS0 = 0) service class. Section 3.2 says that class CS6 is for "transmitting packets between network devices (routers) that require control (routing) information to be exchanged between nodes", listing "OSPF, BGP, ISIS, RIP" as examples of such traffic. Furthermore, it says that: User traffic is not allowed to use this service class. By user traffic, we mean packet flows that originate from user-controlled end points that are connected to the network. Indeed, we got reports of some Cisco switches dropping DHCP packets because of the CS6 marking. For these reasons, change the default value to the recommended one, CS0.
-rw-r--r--src/n-dhcp4/src/n-dhcp4-c-probe.c2
-rw-r--r--src/n-dhcp4/src/n-dhcp4-private.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/n-dhcp4/src/n-dhcp4-c-probe.c b/src/n-dhcp4/src/n-dhcp4-c-probe.c
index b7fe1c4f38..a5b38bcd3d 100644
--- a/src/n-dhcp4/src/n-dhcp4-c-probe.c
+++ b/src/n-dhcp4/src/n-dhcp4-c-probe.c
@@ -198,7 +198,7 @@ _c_public_ void n_dhcp4_client_probe_config_set_init_reboot(NDhcp4ClientProbeCon
*
* This sets the DSCP property of the configuration object, which specifies
* the DSCP value to set in the first six bits of the DS field in the IPv4
- * header. If this function is not called, the DSCP will be set to CS6.
+ * header. If this function is not called, the DSCP will be set to CS0.
*/
_c_public_ void n_dhcp4_client_probe_config_set_dscp(NDhcp4ClientProbeConfig *config, uint8_t dscp) {
config->dscp = dscp & 0x3F;
diff --git a/src/n-dhcp4/src/n-dhcp4-private.h b/src/n-dhcp4/src/n-dhcp4-private.h
index 4bbb03d482..40404001a8 100644
--- a/src/n-dhcp4/src/n-dhcp4-private.h
+++ b/src/n-dhcp4/src/n-dhcp4-private.h
@@ -35,7 +35,7 @@ typedef struct NDhcp4LogQueue NDhcp4LogQueue;
#define N_DHCP4_NETWORK_CLIENT_PORT (68)
#define N_DHCP4_MESSAGE_MAGIC ((uint32_t)(0x63825363))
#define N_DHCP4_MESSAGE_FLAG_BROADCAST (htons(0x8000))
-#define N_DHCP4_DSCP_DEFAULT (IPTOS_CLASS_CS6 >> 2)
+#define N_DHCP4_DSCP_DEFAULT (IPTOS_CLASS_CS0 >> 2)
enum {
N_DHCP4_OP_BOOTREQUEST = 1,