summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ac1077)
raw | patch | inline | side by side (parent: 0ac1077)
author | Stefano Brivio <sbrivio@redhat.com> | |
Fri, 12 Oct 2018 21:53:58 +0000 (23:53 +0200) | ||
committer | David S. Miller <davem@davemloft.net> | |
Thu, 18 Oct 2018 04:51:13 +0000 (21:51 -0700) |
Commit f15ca723c1eb ("net: don't call update_pmtu unconditionally") avoids
that we try updating PMTU for a non-existent destination, but didn't clean
up cases where the check was already explicit. Drop those redundant checks.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
that we try updating PMTU for a non-existent destination, but didn't clean
up cases where the check was already explicit. Drop those redundant checks.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c | patch | blob | history | |
drivers/net/vxlan.c | patch | blob | history |
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 6acb6b5718b94c1050fdbef60a4a556e27c2275e..61c4bfbeb41c043ef0a0f24ce242c960eaa03db1 100644 (file)
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
if (IS_ERR(rt))
return PTR_ERR(rt);
- if (skb_dst(skb)) {
- int mtu = dst_mtu(&rt->dst) - GENEVE_IPV4_HLEN -
- info->options_len;
-
- skb_dst_update_pmtu(skb, mtu);
- }
+ skb_dst_update_pmtu(skb, dst_mtu(&rt->dst) -
+ GENEVE_IPV4_HLEN - info->options_len);
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
if (geneve->collect_md) {
if (IS_ERR(dst))
return PTR_ERR(dst);
- if (skb_dst(skb)) {
- int mtu = dst_mtu(dst) - GENEVE_IPV6_HLEN - info->options_len;
-
- skb_dst_update_pmtu(skb, mtu);
- }
+ skb_dst_update_pmtu(skb, dst_mtu(dst) -
+ GENEVE_IPV6_HLEN - info->options_len);
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
if (geneve->collect_md) {
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 2b8da2b7e721e33f0683efa61e50ceac68d256e7..22e0ce592e07468599feb4f867e865de7aa7409c 100644 (file)
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
}
ndst = &rt->dst;
- if (skb_dst(skb)) {
- int mtu = dst_mtu(ndst) - VXLAN_HEADROOM;
-
- skb_dst_update_pmtu(skb, mtu);
- }
+ skb_dst_update_pmtu(skb, dst_mtu(ndst) - VXLAN_HEADROOM);
tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
goto out_unlock;
}
- if (skb_dst(skb)) {
- int mtu = dst_mtu(ndst) - VXLAN6_HEADROOM;
-
- skb_dst_update_pmtu(skb, mtu);
- }
+ skb_dst_update_pmtu(skb, dst_mtu(ndst) - VXLAN6_HEADROOM);
tos = ip_tunnel_ecn_encap(tos, old_iph, skb);
ttl = ttl ? : ip6_dst_hoplimit(ndst);