[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <609cfeac-5056-1668-46ca-e083aa6b06b5@gmail.com>
Date: Fri, 25 Sep 2020 21:05:10 -0600
From: David Ahern <dsahern@...il.com>
To: Qingtao Cao <qingtao.cao.au@...il.com>, netdev@...r.kernel.org,
davem@...emloft.net, kuba@...nel.org, kuznet@....inr.ac.ru,
yoshfuji@...ux-ipv6.org, corbet@....net
Cc: Qingtao Cao <qingtao.cao@...i.com>,
David Leonard <david.leonard@...i.com>
Subject: Re: [PATCH 1/1] Network: support default route metric per interface
On 9/25/20 5:11 PM, Qingtao Cao wrote:
> From: Qingtao Cao <qingtao.cao@...i.com>
>
> Add /proc/sys/net/ipv[4|6]/conf/<device>/def_rt_metric sysfs attribute
> file for each network interface so that userspace programs can specify
> different default route metrics for each interface, which will also be
> applied by the kernel when new routes are automatically created for
> relevant interfaces, when userspace programs may have not specified
> metrics via relevant netlink messages for example.
>
> Signed-off-by: Qingtao Cao <qingtao.cao@...i.com>
> Signed-off-by: David Leonard <david.leonard@...i.com>
> ---
> Documentation/networking/ip-sysctl.rst | 8 +++++
> include/linux/inetdevice.h | 4 +++
> include/linux/ipv6.h | 3 ++
> include/net/ip6_route.h | 15 ++++++++
> include/uapi/linux/ip.h | 1 +
> include/uapi/linux/ipv6.h | 1 +
> net/ipv4/Kconfig | 13 +++++++
> net/ipv4/devinet.c | 3 ++
> net/ipv4/fib_frontend.c | 27 ++++++++++++++
> net/ipv6/addrconf.c | 30 ++++++++++++++--
> net/ipv6/route.c | 50 ++++++++++++++++++++++++--
> 11 files changed, 150 insertions(+), 5 deletions(-)
uh, no.
The metric can be specified for prefix routes via IFA_RT_PRIORITY. There
is no reason for bloating the code and adding another sys knob for this.
Fix your network manager to set the priority when the address is created.
Powered by blists - more mailing lists