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)
commit767a2217533fed696af0d06bee7746d34c4e00aa
tree345d862ce8fe8019b15deb0c591dc7760b3d554c
parentd26d4b194e582c6f2070cc5f7f74a72124ad41ef
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