Bug 88508

Summary: RFE: systemd-network: please make route’s scope configurable
Product: systemd Reporter: Michael Stapelberg <michael+freedesktop>
Component: generalAssignee: Tom Gundersen <teg>
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Michael Stapelberg 2015-01-16 19:27:58 UTC
in networkd-route.c:route_new_static(), you currently set

        route->scope = RT_SCOPE_UNIVERSE;

Which sets up the following route:

localhost core # ip -4 route show
192.168.23.23 dev eth0 

…with this configuration:

    [Route]
    Destination=192.168.23.23/32

However, for my network setup, I need a route that is scoped to the link:

localhost core # ip -4 route delete 192.168.23.23 dev eth0
localhost core # ip -4 route add 192.168.23.23 dev eth0
localhost core # ip -4 route show
192.168.23.23 dev eth0  scope link 

…otherwise, I cannot set 192.168.23.23 as my default gateway.

Therefore, may I ask you to follow ip(8) in behavior, or make the route scope configurable please?

See http://michael.stapelberg.de/Artikel/kvm_best_practices_2012/ for the environment this is running in.

Thanks!
Comment 1 Tom Gundersen 2015-02-09 16:28:50 UTC
Made the scope configurable. Would be open to having a more clever default.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.