diff options
author | David Ahern <dsahern@gmail.com> | 2018-04-18 03:33:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-18 06:41:15 +0300 |
commit | a919525ad832d2bb1388b2303832a2307b30aeff (patch) | |
tree | c07aebe1fb80d8cc52d93efe877e7db7ca5fe13c /include/net/ip.h | |
parent | a2d481b326c98b6b67eea8a378c858d57ca5ff3d (diff) | |
download | linux-a919525ad832d2bb1388b2303832a2307b30aeff.tar.xz |
net: Move fib_convert_metrics to metrics file
Move logic of fib_convert_metrics into ip_metrics_convert. This allows
the code that converts netlink attributes into metrics struct to be
re-used in a later patch by IPv6.
This is mostly a code move with the following changes to variable names:
- fi->fib_net becomes net
- fc_mx and fc_mx_len are passed as inputs pulled from fib_config
- metrics array is passed as an input from fi->fib_metrics->metrics
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index ecffd843e7b8..dc4a2d6e58a5 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -396,6 +396,9 @@ static inline unsigned int ip_skb_dst_mtu(struct sock *sk, return min(READ_ONCE(skb_dst(skb)->dev->mtu), IP_MAX_MTU); } +int ip_metrics_convert(struct net *net, struct nlattr *fc_mx, int fc_mx_len, + u32 *metrics); + u32 ip_idents_reserve(u32 hash, int segs); void __ip_select_ident(struct net *net, struct iphdr *iph, int segs); |