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 761631 - Incorrect interpretation of default route
Incorrect interpretation of default route
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.0.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-06 12:50 UTC by Pisarev Alexander
Modified: 2016-02-11 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pisarev Alexander 2016-02-06 12:50:31 UTC
Network Manager interpretation default in route config as 0.0.0.0/32, but this mean 0.0.0.0/0.

# cat /etc/sysconfig/network-scripts/route-enp0s5
169.254.0.1 dev enp0s5 scope link
default via 169.254.0.1

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         169.254.0.1     255.255.255.255 UGH   100    0        0 enp0s5
10.94.0.0       0.0.0.0         255.255.0.0     U     100    0        0 enp0s5
169.254.0.1     0.0.0.0         255.255.255.255 UH    100    0        0 enp0s5
192.168.124.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

If add /0 to route:

# cat /etc/sysconfig/network-scripts/route-enp0s5
169.254.0.1 dev enp0s5 scope link
default/0 via 169.254.0.1

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         169.254.0.1     0.0.0.0         UG    0      0        0 enp0s5
10.94.0.0       0.0.0.0         255.255.0.0     U     0      0        0 enp0s5
link-local      0.0.0.0         255.255.0.0     U     1002   0        0 enp0s5
169.254.0.1     0.0.0.0         255.255.255.255 UH    0      0        0 enp0s5
192.168.124.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

Problem must be in ifcfg-rh plugin, cause it use 32 mask as default in any case.
Comment 1 Thomas Haller 2016-02-11 13:31:39 UTC
yes, there was a bug here. Thanks for reporting!!

Fixed by: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=3fd414442e18d92491da53a20ec3b069076f01e0



But note, that NM does not allow you to specify the default route like a normal route. The default route is controlled via ipv4.never-default (DEFROUTE) and ipv4.gateway (GATEWAY)  -- see `man nm-settings-ifcfg-rh`.