diff options
Diffstat (limited to 'src/core/dhcp')
| -rw-r--r-- | src/core/dhcp/nm-dhcp-client.h | 7 | ||||
| -rw-r--r-- | src/core/dhcp/nm-dhcp-dhclient.c | 5 | ||||
| -rw-r--r-- | src/core/dhcp/nm-dhcp-nettools.c | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/core/dhcp/nm-dhcp-client.h b/src/core/dhcp/nm-dhcp-client.h index 4dd2c4fd..2b262f76 100644 --- a/src/core/dhcp/nm-dhcp-client.h +++ b/src/core/dhcp/nm-dhcp-client.h @@ -158,6 +158,13 @@ typedef struct { * is disabled. */ guint acd_timeout_msec; + /* The DSCP value to use */ + guint8 dscp; + + /* Whether the DSCP value is explicitly set (or it is the default + * one) */ + bool dscp_explicit : 1; + /* Set BOOTP broadcast flag in request packets, so that servers * will always broadcast replies. */ bool request_broadcast : 1; diff --git a/src/core/dhcp/nm-dhcp-dhclient.c b/src/core/dhcp/nm-dhcp-dhclient.c index 2a3af10a..043c2264 100644 --- a/src/core/dhcp/nm-dhcp-dhclient.c +++ b/src/core/dhcp/nm-dhcp-dhclient.c @@ -457,6 +457,11 @@ dhclient_start(NMDhcpClient *client, g_ptr_array_add(argv, (gpointer) priv->conf_file); } + if (client_config->v4.dscp_explicit) { + _LOGW("dhclient does not support specifying a custom DSCP value; the TOS field will be set " + "to LOWDELAY (0x10)."); + } + /* Usually the system bus address is well-known; but if it's supposed * to be something else, we need to push it to dhclient, since dhclient * sanitizes the environment it gives the action scripts. diff --git a/src/core/dhcp/nm-dhcp-nettools.c b/src/core/dhcp/nm-dhcp-nettools.c index fc468d4c..ce1e9a45 100644 --- a/src/core/dhcp/nm-dhcp-nettools.c +++ b/src/core/dhcp/nm-dhcp-nettools.c @@ -1388,6 +1388,8 @@ ip4_start(NMDhcpClient *client, GError **error) } } + n_dhcp4_client_probe_config_set_dscp(config, client_config->v4.dscp); + if (client_config->hostname) { if (client_config->use_fqdn) { uint8_t buffer[255]; |