]> git.baikalelectronics.ru Git - kernel.git/commit
net: common metrics init helper for FIB entries
authorDavid Ahern <dsahern@gmail.com>
Fri, 5 Oct 2018 03:07:51 +0000 (20:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 04:54:03 +0000 (21:54 -0700)
commit61a7e8dba136a684e0e44f54cf0ef0d9b5f8c62e
tree345d862ce8fe8019b15deb0c591dc7760b3d554c
parent3ac2ec6a55a7e0771622e76c8a5fab492395d93e
net: common metrics init helper for FIB entries

Consolidate initialization of ipv4 and ipv6 metrics when fib entries
are created into a single helper, ip_fib_metrics_init, that handles
the call to ip_metrics_convert.

If no metrics are defined for the fib entry, then the metrics is set
to dst_default_metrics.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/fib_semantics.c
net/ipv4/metrics.c
net/ipv6/ip6_fib.c
net/ipv6/route.c