Skip to content
  • Thomas Haller's avatar
    all: add support for "scope" attribute for IPv4 routes · b9f1beb0
    Thomas Haller authored
    - systemd-networkd and initscripts both support it.
    
    - it seems suggested to configure routes with scope "link" on AWS.
    
    - the scope is only supported for IPv4 routes. Kernel ignores the
      attribute for IPv6 routes.
    
    - we don't support the aliases like "link" or "global". Instead
      only the numeric value is supported. This is different from
      systemd-networkd, which accepts names like "global" and "link",
      but no numerical values. I think restricting ourself only to
      the aliases unnecessarily limits what is possible on netlink.
      The alternative would be to allow aliases and numbers both,
      but that causes multiple ways to define something and has
      thus downsides. So, only numeric values.
    
    - when setting rtm_scope to RT_SCOPE_NOWHERE (0, the default), kernel
      will coerce that to RT_SCOPE_LINK. This ambiguity of nowhere vs. link
      is a problem, but we don't do anything about it.
    
    - The other problem is, that when deleting a route with scope RT_SCOPE_NOWHERE,
      this acts as a wild care and removes the first route that matches (given the
      other route attributes). That means, NetworkManager has no meaningful
      way to delete a route with scope zero, there is always the danger that
      we might delete the wrong route. But this is nothing new to this
      patch. The problem existed already previously, except that
      NetworkManager could only add routes with scope nowhere (i.e. link).
    b9f1beb0
To find the state of this project's repository at the time of any of these versions, check out the tags.