Commit 0bbeafd0 authored by Satoru SATOH's avatar Satoru SATOH Committed by David S. Miller

ip: Make use of the inline function dst_metric_locked()

Signed-off-by: default avatarSatoru SATOH <satoru.satoh@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1e0ba006
...@@ -210,7 +210,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) ...@@ -210,7 +210,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
{ {
return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO || return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO ||
(inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT && (inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT &&
!(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU)))); !(dst_metric_locked(dst, RTAX_MTU))));
} }
extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more);
......
...@@ -1613,7 +1613,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag) ...@@ -1613,7 +1613,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
sizeof(rt->u.dst.metrics)); sizeof(rt->u.dst.metrics));
if (fi->fib_mtu == 0) { if (fi->fib_mtu == 0) {
rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu; rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu;
if (rt->u.dst.metrics[RTAX_LOCK-1] & (1 << RTAX_MTU) && if (dst_metric_locked(&rt->u.dst, RTAX_MTU) &&
rt->rt_gateway != rt->rt_dst && rt->rt_gateway != rt->rt_dst &&
rt->u.dst.dev->mtu > 576) rt->u.dst.dev->mtu > 576)
rt->u.dst.metrics[RTAX_MTU-1] = 576; rt->u.dst.metrics[RTAX_MTU-1] = 576;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment