net-ipv4: remove 2 always zero parameters from ipv4_update_pmtu()
authorMaciej Żenczykowski <maze@google.com>
Wed, 26 Sep 2018 03:56:26 +0000 (20:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Sep 2018 03:30:55 +0000 (20:30 -0700)
(the parameters in question are mark and flow_flags)

Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 files changed:
include/net/route.h
net/ipv4/ah4.c
net/ipv4/esp4.c
net/ipv4/icmp.c
net/ipv4/ip_gre.c
net/ipv4/ip_vti.c
net/ipv4/ipcomp.c
net/ipv4/ipip.c
net/ipv4/route.c
net/ipv6/sit.c
net/netfilter/ipvs/ip_vs_core.c
net/xfrm/xfrm_interface.c

index bb53cdba38dc28a3a4fb0d90cbf8927fb2ba8b49..73c605bdd6d81ae1b94474376a020e059b66365e 100644 (file)
@@ -201,7 +201,7 @@ static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src,
 }
 
 void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, int oif,
-                     u32 mark, u8 protocol, int flow_flags);
+                     u8 protocol);
 void ipv4_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, u32 mtu);
 void ipv4_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark,
                   u8 protocol, int flow_flags);
index 4dd95cdd80703113fc2c74f8dadf9295a0a39501..8811fe30282a18e42e7554d270693f98fe93bb49 100644 (file)
@@ -461,7 +461,7 @@ static int ah4_err(struct sk_buff *skb, u32 info)
                return 0;
 
        if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
-               ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_AH, 0);
+               ipv4_update_pmtu(skb, net, info, 0, IPPROTO_AH);
        else
                ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0);
        xfrm_state_put(x);
index 97689012b357b9fd826f3093def4df9a475d2274..2d0274441923c343cb3f5fa71c2d1b3e70139a03 100644 (file)
@@ -820,7 +820,7 @@ static int esp4_err(struct sk_buff *skb, u32 info)
                return 0;
 
        if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
-               ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ESP, 0);
+               ipv4_update_pmtu(skb, net, info, 0, IPPROTO_ESP);
        else
                ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0);
        xfrm_state_put(x);
index 695979b7ef6d08c2056384d90c9671efd7ae90dd..8013b37b598f184c7f572a8ab560e9c06a0a9f06 100644 (file)
@@ -1098,7 +1098,7 @@ void icmp_err(struct sk_buff *skb, u32 info)
        }
 
        if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED)
-               ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ICMP, 0);
+               ipv4_update_pmtu(skb, net, info, 0, IPPROTO_ICMP);
        else if (type == ICMP_REDIRECT)
                ipv4_redirect(skb, net, 0, 0, IPPROTO_ICMP, 0);
 }
index c3385a84f8ff0538d4ed80da83e4fa21ba2f5d3e..83b80fafd8f29140762d196a6efcb2f3861cc260 100644 (file)
@@ -239,7 +239,7 @@ static void gre_err(struct sk_buff *skb, u32 info)
 
        if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
                ipv4_update_pmtu(skb, dev_net(skb->dev), info,
-                                skb->dev->ifindex, 0, IPPROTO_GRE, 0);
+                                skb->dev->ifindex, IPPROTO_GRE);
                return;
        }
        if (type == ICMP_REDIRECT) {
index f38cb21d773d3f776e2800a4d3f772101befa9fa..1b5571cb328200ae6f8f9c66774b37e9398feb6b 100644 (file)
@@ -318,7 +318,7 @@ static int vti4_err(struct sk_buff *skb, u32 info)
                return 0;
 
        if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
-               ipv4_update_pmtu(skb, net, info, 0, 0, protocol, 0);
+               ipv4_update_pmtu(skb, net, info, 0, protocol);
        else
                ipv4_redirect(skb, net, 0, 0, protocol, 0);
        xfrm_state_put(x);
index d97f4f2787f5f85c5f073df5e5276daf03c4ba6a..04049d1330a29c16e8ae363613f3dac3dd31715d 100644 (file)
@@ -48,7 +48,7 @@ static int ipcomp4_err(struct sk_buff *skb, u32 info)
                return 0;
 
        if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
-               ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_COMP, 0);
+               ipv4_update_pmtu(skb, net, info, 0, IPPROTO_COMP);
        else
                ipv4_redirect(skb, net, 0, 0, IPPROTO_COMP, 0);
        xfrm_state_put(x);
index c891235b4966cc4994d81acf39070d27c3060f13..6ff008e5818d6373bbda68dc141262d12a8f2443 100644 (file)
@@ -175,8 +175,7 @@ static int ipip_err(struct sk_buff *skb, u32 info)
        }
 
        if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
-               ipv4_update_pmtu(skb, net, info, t->parms.link, 0,
-                                iph->protocol, 0);
+               ipv4_update_pmtu(skb, net, info, t->parms.link, iph->protocol);
                goto out;
        }
 
index b678466da451c994b7baec77f96c482afe62da4b..7bbe3fc80b90b6fecc13482bda838e9281ae16bc 100644 (file)
@@ -1040,17 +1040,15 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
 }
 
 void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu,
-                     int oif, u32 mark, u8 protocol, int flow_flags)
+                     int oif, u8 protocol)
 {
        const struct iphdr *iph = (const struct iphdr *) skb->data;
        struct flowi4 fl4;
        struct rtable *rt;
-
-       if (!mark)
-               mark = IP4_REPLY_MARK(net, skb->mark);
+       u32 mark = IP4_REPLY_MARK(net, skb->mark);
 
        __build_flow_key(net, &fl4, NULL, iph, oif,
-                        RT_TOS(iph->tos), protocol, mark, flow_flags);
+                        RT_TOS(iph->tos), protocol, mark, 0);
        rt = __ip_route_output_key(net, &fl4);
        if (!IS_ERR(rt)) {
                __ip_rt_update_pmtu(rt, &fl4, mtu);
index e9400ffa7875c7a81d139618dae53143d164a1e1..085c588ebfe08da6d4f0244a388a3f1f0eaa79d3 100644 (file)
@@ -534,7 +534,7 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
 
        if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
                ipv4_update_pmtu(skb, dev_net(skb->dev), info,
-                                t->parms.link, 0, iph->protocol, 0);
+                                t->parms.link, iph->protocol);
                err = 0;
                goto out;
        }
index 7ca926a03b81c19312b9f9185319539fbac8fb5a..fe9abf3cc10a0d6d81ebf0ad69c37de81d315759 100644 (file)
@@ -1686,8 +1686,7 @@ ip_vs_in_icmp(struct netns_ipvs *ipvs, struct sk_buff *skb, int *related,
                        skb_reset_network_header(skb);
                        IP_VS_DBG(12, "ICMP for IPIP %pI4->%pI4: mtu=%u\n",
                                &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, mtu);
-                       ipv4_update_pmtu(skb, ipvs->net,
-                                        mtu, 0, 0, 0, 0);
+                       ipv4_update_pmtu(skb, ipvs->net, mtu, 0, 0);
                        /* Client uses PMTUD? */
                        if (!(frag_off & htons(IP_DF)))
                                goto ignore_ipip;
index 31acc6f33d98929ec2be31b0aec0469b4d5551fb..16bc5ecb7869beeaf79157284656e25441f602dc 100644 (file)
@@ -469,7 +469,7 @@ static int xfrmi4_err(struct sk_buff *skb, u32 info)
        }
 
        if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
-               ipv4_update_pmtu(skb, net, info, 0, 0, protocol, 0);
+               ipv4_update_pmtu(skb, net, info, 0, protocol);
        else
                ipv4_redirect(skb, net, 0, 0, protocol, 0);
        xfrm_state_put(x);