net: common metrics init helper for dst_entry
authorDavid Ahern <dsahern@gmail.com>
Fri, 5 Oct 2018 03:07:53 +0000 (20:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 04:54:19 +0000 (21:54 -0700)
commite1255ed4b6dafd9966c99cde5105891cc1ac70df
treea8118d6d76a79bc59220ce115663b9567365ce1a
parentcc5f0eb2164f9aa11fe631f8d905192e0233e262
net: common metrics init helper for dst_entry

ipv4 and ipv6 both use refcounted metrics if FIB entries have metrics set.
Move the common initialization code to a helper and use for both protocols.

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