device: fix setting minimal MTU to 1280 for IPv6

Fixes: 665e398022
(cherry picked from commit ec66135a40)
This commit is contained in:
Thomas Haller 2017-01-24 16:28:04 +01:00
parent e56d308ba5
commit 105d8a2447

View file

@ -6669,8 +6669,9 @@ _commit_mtu (NMDevice *self, const NMIP4Config *config)
NMSettingIPConfig *s_ip6;
s_ip6 = (NMSettingIPConfig *) nm_device_get_applied_setting (self, NM_TYPE_SETTING_IP6_CONFIG);
if (s_ip6 && nm_streq0 (nm_setting_ip_config_get_method (s_ip6),
NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
if ( s_ip6
&& !NM_IN_STRSET (nm_setting_ip_config_get_method (s_ip6),
NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
/* the interface has IPv6 enabled. The MTU with IPv6 cannot be smaller
* then 1280.
*