diff options
| author | Michael Biebl <biebl@debian.org> | 2024-02-13 22:23:40 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-02-13 22:23:40 +0100 |
| commit | 6681f77b757bbc42ce5c8868ee9142b7ebc8c059 (patch) | |
| tree | f713e759b7c255ebeea83351f05dd466fd31422f /src/core/dhcp | |
| parent | 70e18d99b8e3e77bb37e218d7ac582130156f8ef (diff) | |
New upstream version 1.45.91 upstream/1.45.91
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]; |