Bug 1848241

Summary: The `NM.IPConfig.get_routes()` returns non-exist route to ff00::/8
Product: Red Hat Enterprise Linux 8 Reporter: Gris Ge <fge>
Component: NetworkManagerAssignee: sushil kulkarni <sukulkar>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.3CC: acardace, atragler, bgalvani, lrintel, rkhan, sukulkar, thaller, till
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-18 06:11:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1738136, 1738838    

Description Gris Ge 2020-06-18 04:23:04 UTC
Description of problem:

The `ff00::/8` route is shown by `NM.IPConfig.get_routes()`, but it does not
actually exists in kernel (ip route output).

Version-Release number of selected component (if applicable):
NetworkManager-1.27.0-26090.56b15ca0b6.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. sudo nmcli c add type dummy ifname dummy1 \
    connection.id dummy1 \
    ipv4.method disabled \
    ipv6.method static ipv6.address 2001:db8:b::/64

2. ./nm_route_query.py
3. ip -6 route show dev dummy1

Actual results:

The `./nm_route_query.py` output contains:

ff00::/8

While ip route output does not.


Expected results:

ff00::/8 not included in `NM.IPConfig.get_routes()`

Additional info:

Full command line outputs:

[fge@el8 ~]$ sudo nmcli c add type dummy ifname dummy1 \
>     connection.id dummy1 \
>     ipv4.method disabled \
>     ipv6.method static ipv6.address 2001:db8:b::/64
Connection 'dummy1' (a408cf03-0c79-444b-a910-31ff6a7d5891) successfully added.
[fge@el8 ~]$ ip -6 route show dev dummy1
2000::/64 proto kernel metric 550 pref medium
fe80::/64 proto kernel metric 550 pref medium
[fge@el8 ~]$ rpm -q NetworkManager
NetworkManager-1.27.0-26090.56b15ca0b6.el8.x86_64
[fge@el8 ~]$ ./nm_route_query.py
ff00::/8  dummy1/a408cf03-0c79-444b-a910-31ff6a7d5891
2001:db8:b::/64  dummy1/a408cf03-0c79-444b-a910-31ff6a7d5891
fe80::/64  dummy1/a408cf03-0c79-444b-a910-31ff6a7d5891

Comment 1 Beniamino Galvani 2020-06-18 05:02:09 UTC
Route ff00::/8 is in a table different from 'main'. To show all routes for dummy1 use:

  ip -6 route show dev dummy1 table all

To obtain the table from the NMIPRoute object use 'route.get_attribute("table")', which returns a uint32 gvariant or None.

Comment 2 Gris Ge 2020-06-18 06:11:57 UTC
Oops. My fault. Not a bug.