mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
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>
This commit is contained in:
parent
d26d4b194e
commit
767a221753
5 changed files with 43 additions and 49 deletions
|
|
@ -420,8 +420,8 @@ 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);
|
||||
struct dst_metrics *ip_fib_metrics_init(struct net *net, struct nlattr *fc_mx,
|
||||
int fc_mx_len);
|
||||
|
||||
u32 ip_idents_reserve(u32 hash, int segs);
|
||||
void __ip_select_ident(struct net *net, struct iphdr *iph, int segs);
|
||||
|
|
|
|||
Loading…
Reference in a new issue