After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721420 - MTU from DHCP/PPP/VPN configs not being respected
MTU from DHCP/PPP/VPN configs not being respected
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-01-03 18:46 UTC by Dan Williams
Modified: 2014-04-22 09:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Williams 2014-01-03 18:46:26 UTC
The MTU from various IP configuration methods isn't carried through to the final IP config that gets committed for a link.  The MTU will get set correctly on the DHCP/PPP/VPN generated NMIP4Config but when merging all the configurations in ip4_config_merge_and_apply(), nm_ip4_config_merge() doesn't merge the MTU like it does for the MSS.

What should probably happen here is:

1) nm_ip4_config_merge() should merge the MTU from 'src' if src's MTU is non-zero.

2) nm_ip4_config_subtract() should set 'dst' MTU to zero if dst's MTU equals src's MTU

3) testcases should be added to ensure that merge and subtract operations do the right thing with the MTU for single and multiple merges
Comment 1 Jiri Klimes 2014-04-17 09:27:07 UTC
The code is ready for a review in jk/bgo721420-mtu branch.
Comment 2 Dan Williams 2014-04-17 16:13:48 UTC
+	/* add MSS, MTU to configs to test them */
+	nm_ip4_config_set_mss (cfg2, expected_mss2);
+	nm_ip4_config_set_mtu (cfg2, expected_mtu2);
+	nm_ip4_config_set_mtu (cfg3, expected_mss3);
+	nm_ip4_config_set_mtu (cfg3, expected_mtu3);

Should the third call here be set_mss()?  It doesn't effect the final result because cfg1 already has an MSS set to the MSS in cfg3 gets ignored, but should probably get fixed.

Rest looks good!
Comment 3 Jiri Klimes 2014-04-22 09:05:11 UTC
(In reply to comment #2)
> +    /* add MSS, MTU to configs to test them */
> +    nm_ip4_config_set_mss (cfg2, expected_mss2);
> +    nm_ip4_config_set_mtu (cfg2, expected_mtu2);
> +    nm_ip4_config_set_mtu (cfg3, expected_mss3);
> +    nm_ip4_config_set_mtu (cfg3, expected_mtu3);
> 
> Should the third call here be set_mss()?  It doesn't effect the final result
> because cfg1 already has an MSS set to the MSS in cfg3 gets ignored, but should
> probably get fixed.
> 
Of course, it should. Fixed.

Commit in master:
0757e33 core: fix MTU handling while merging/subtracting IP configs (bgo #721420)