Commit d888f396 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by David S. Miller

net-ipv4: remove 2 always zero parameters from ipv4_update_pmtu()

(the parameters in question are mark and flow_flags)
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent da58a931
...@@ -201,7 +201,7 @@ static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, ...@@ -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, 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_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, void ipv4_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark,
u8 protocol, int flow_flags); u8 protocol, int flow_flags);
......
...@@ -461,7 +461,7 @@ static int ah4_err(struct sk_buff *skb, u32 info) ...@@ -461,7 +461,7 @@ static int ah4_err(struct sk_buff *skb, u32 info)
return 0; return 0;
if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 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 else
ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0); ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0);
xfrm_state_put(x); xfrm_state_put(x);
......
...@@ -820,7 +820,7 @@ static int esp4_err(struct sk_buff *skb, u32 info) ...@@ -820,7 +820,7 @@ static int esp4_err(struct sk_buff *skb, u32 info)
return 0; return 0;
if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 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 else
ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0); ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0);
xfrm_state_put(x); xfrm_state_put(x);
......
...@@ -1098,7 +1098,7 @@ void icmp_err(struct sk_buff *skb, u32 info) ...@@ -1098,7 +1098,7 @@ void icmp_err(struct sk_buff *skb, u32 info)
} }
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) 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) else if (type == ICMP_REDIRECT)
ipv4_redirect(skb, net, 0, 0, IPPROTO_ICMP, 0); ipv4_redirect(skb, net, 0, 0, IPPROTO_ICMP, 0);
} }
......
...@@ -239,7 +239,7 @@ static void gre_err(struct sk_buff *skb, u32 info) ...@@ -239,7 +239,7 @@ static void gre_err(struct sk_buff *skb, u32 info)
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
ipv4_update_pmtu(skb, dev_net(skb->dev), info, ipv4_update_pmtu(skb, dev_net(skb->dev), info,
skb->dev->ifindex, 0, IPPROTO_GRE, 0); skb->dev->ifindex, IPPROTO_GRE);
return; return;
} }
if (type == ICMP_REDIRECT) { if (type == ICMP_REDIRECT) {
......
...@@ -318,7 +318,7 @@ static int vti4_err(struct sk_buff *skb, u32 info) ...@@ -318,7 +318,7 @@ static int vti4_err(struct sk_buff *skb, u32 info)
return 0; return 0;
if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 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 else
ipv4_redirect(skb, net, 0, 0, protocol, 0); ipv4_redirect(skb, net, 0, 0, protocol, 0);
xfrm_state_put(x); xfrm_state_put(x);
......
...@@ -48,7 +48,7 @@ static int ipcomp4_err(struct sk_buff *skb, u32 info) ...@@ -48,7 +48,7 @@ static int ipcomp4_err(struct sk_buff *skb, u32 info)
return 0; return 0;
if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 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 else
ipv4_redirect(skb, net, 0, 0, IPPROTO_COMP, 0); ipv4_redirect(skb, net, 0, 0, IPPROTO_COMP, 0);
xfrm_state_put(x); xfrm_state_put(x);
......
...@@ -175,8 +175,7 @@ static int ipip_err(struct sk_buff *skb, u32 info) ...@@ -175,8 +175,7 @@ static int ipip_err(struct sk_buff *skb, u32 info)
} }
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
ipv4_update_pmtu(skb, net, info, t->parms.link, 0, ipv4_update_pmtu(skb, net, info, t->parms.link, iph->protocol);
iph->protocol, 0);
goto out; goto out;
} }
......
...@@ -1040,17 +1040,15 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, ...@@ -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, 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; const struct iphdr *iph = (const struct iphdr *) skb->data;
struct flowi4 fl4; struct flowi4 fl4;
struct rtable *rt; struct rtable *rt;
u32 mark = IP4_REPLY_MARK(net, skb->mark);
if (!mark)
mark = IP4_REPLY_MARK(net, skb->mark);
__build_flow_key(net, &fl4, NULL, iph, oif, __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); rt = __ip_route_output_key(net, &fl4);
if (!IS_ERR(rt)) { if (!IS_ERR(rt)) {
__ip_rt_update_pmtu(rt, &fl4, mtu); __ip_rt_update_pmtu(rt, &fl4, mtu);
......
...@@ -534,7 +534,7 @@ static int ipip6_err(struct sk_buff *skb, u32 info) ...@@ -534,7 +534,7 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
ipv4_update_pmtu(skb, dev_net(skb->dev), info, ipv4_update_pmtu(skb, dev_net(skb->dev), info,
t->parms.link, 0, iph->protocol, 0); t->parms.link, iph->protocol);
err = 0; err = 0;
goto out; goto out;
} }
......
...@@ -1686,8 +1686,7 @@ ip_vs_in_icmp(struct netns_ipvs *ipvs, struct sk_buff *skb, int *related, ...@@ -1686,8 +1686,7 @@ ip_vs_in_icmp(struct netns_ipvs *ipvs, struct sk_buff *skb, int *related,
skb_reset_network_header(skb); skb_reset_network_header(skb);
IP_VS_DBG(12, "ICMP for IPIP %pI4->%pI4: mtu=%u\n", IP_VS_DBG(12, "ICMP for IPIP %pI4->%pI4: mtu=%u\n",
&ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, mtu); &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, mtu);
ipv4_update_pmtu(skb, ipvs->net, ipv4_update_pmtu(skb, ipvs->net, mtu, 0, 0);
mtu, 0, 0, 0, 0);
/* Client uses PMTUD? */ /* Client uses PMTUD? */
if (!(frag_off & htons(IP_DF))) if (!(frag_off & htons(IP_DF)))
goto ignore_ipip; goto ignore_ipip;
......
...@@ -469,7 +469,7 @@ static int xfrmi4_err(struct sk_buff *skb, u32 info) ...@@ -469,7 +469,7 @@ static int xfrmi4_err(struct sk_buff *skb, u32 info)
} }
if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 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 else
ipv4_redirect(skb, net, 0, 0, protocol, 0); ipv4_redirect(skb, net, 0, 0, protocol, 0);
xfrm_state_put(x); xfrm_state_put(x);
......
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