diff options
author | Thomas Haller <thaller@redhat.com> | 2017-10-03 11:30:35 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-10-09 22:06:25 +0200 |
commit | 9003dae6cdc12fc4860d35b91d5799b1bf8d5638 (patch) | |
tree | 7c545600cebfd75f1f1f0d1a0ab829705cc3de51 /src/nm-ip4-config.c | |
parent | 2e146148702615f31209f6ccc07ca02663eddb7b (diff) | |
download | NetworkManager-9003dae6cdc12fc4860d35b91d5799b1bf8d5638.tar.gz |
core: don't track route MSS in ip-config
The MSS is only set for VPN connections (by merging it in the respective
NMIP4Config/NMIP6Config).
It is also only used when setting the MSS of the default route.
Don't track that property in NMIP4Config/NMIP6Config, instead, set the
mss of the route directly in nm_vpn_connection_ip4_config_get() and
nm_vpn_connection_ip6_config_get().
There is a potential change in behavior here: NMDevice also consisdered
the MSS for the default route, but that would only be set if the MSS
gets merged from an vpn-ip-config. Which at most is the case for
iterface-less VPN types (libreswan). But even in that case, it doesn't
seem right to me to use the VPN's MSS for the device's default-route.
Diffstat (limited to 'src/nm-ip4-config.c')
-rw-r--r-- | src/nm-ip4-config.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c index fe32358081..101b3b0fbc 100644 --- a/src/nm-ip4-config.c +++ b/src/nm-ip4-config.c @@ -291,7 +291,6 @@ typedef struct { bool metered:1; bool has_gateway:1; guint32 gateway; - guint32 mss; guint32 mtu; int ifindex; NMIPConfigSource mtu_source; @@ -1141,10 +1140,6 @@ nm_ip4_config_merge (NMIP4Config *dst, const NMIP4Config *src, NMIPConfigMergeFl nm_ip4_config_add_dns_option (dst, nm_ip4_config_get_dns_option (src, i)); } - /* MSS */ - if (nm_ip4_config_get_mss (src)) - nm_ip4_config_set_mss (dst, nm_ip4_config_get_mss (src)); - /* MTU */ if ( src_priv->mtu_source > dst_priv->mtu_source || ( src_priv->mtu_source == dst_priv->mtu_source @@ -1372,10 +1367,6 @@ nm_ip4_config_subtract (NMIP4Config *dst, const NMIP4Config *src) nm_ip4_config_del_dns_option (dst, idx); } - /* MSS */ - if (nm_ip4_config_get_mss (src) == nm_ip4_config_get_mss (dst)) - nm_ip4_config_set_mss (dst, 0); - /* MTU */ if ( nm_ip4_config_get_mtu (src) == nm_ip4_config_get_mtu (dst) && nm_ip4_config_get_mtu_source (src) == nm_ip4_config_get_mtu_source (dst)) @@ -1733,12 +1724,6 @@ nm_ip4_config_replace (NMIP4Config *dst, const NMIP4Config *src, gboolean *relev has_minor_changes = TRUE; } - /* mss */ - if (src_priv->mss != dst_priv->mss) { - nm_ip4_config_set_mss (dst, src_priv->mss); - has_minor_changes = TRUE; - } - /* nis */ num = nm_ip4_config_get_num_nis_servers (src); are_equal = num == nm_ip4_config_get_num_nis_servers (dst); @@ -1863,7 +1848,6 @@ nm_ip4_config_dump (const NMIP4Config *self, const char *detail) g_message (" dnspri: %d", nm_ip4_config_get_dns_priority (self)); - g_message (" mss: %"G_GUINT32_FORMAT, nm_ip4_config_get_mss (self)); g_message (" mtu: %"G_GUINT32_FORMAT" (source: %d)", nm_ip4_config_get_mtu (self), (int) nm_ip4_config_get_mtu_source (self)); /* NIS */ @@ -2518,24 +2502,6 @@ nm_ip4_config_get_dns_priority (const NMIP4Config *self) /*****************************************************************************/ void -nm_ip4_config_set_mss (NMIP4Config *self, guint32 mss) -{ - NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (self); - - priv->mss = mss; -} - -guint32 -nm_ip4_config_get_mss (const NMIP4Config *self) -{ - const NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (self); - - return priv->mss; -} - -/*****************************************************************************/ - -void nm_ip4_config_reset_nis_servers (NMIP4Config *self) { NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (self); |