net-ipv4: remove 2 always zero parameters from ipv4_redirect()
(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>
This commit is contained in:
parent
d888f39666
commit
1042caa79e
|
@ -203,8 +203,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,
|
||||||
u8 protocol);
|
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, u8 protocol);
|
||||||
u8 protocol, int flow_flags);
|
|
||||||
void ipv4_sk_redirect(struct sk_buff *skb, struct sock *sk);
|
void ipv4_sk_redirect(struct sk_buff *skb, struct sock *sk);
|
||||||
void ip_rt_send_redirect(struct sk_buff *skb);
|
void ip_rt_send_redirect(struct sk_buff *skb);
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,7 @@ static int ah4_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, IPPROTO_AH);
|
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, IPPROTO_AH);
|
||||||
xfrm_state_put(x);
|
xfrm_state_put(x);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -822,7 +822,7 @@ static int esp4_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, IPPROTO_ESP);
|
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, IPPROTO_ESP);
|
||||||
xfrm_state_put(x);
|
xfrm_state_put(x);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1100,7 +1100,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, IPPROTO_ICMP);
|
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, IPPROTO_ICMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -243,8 +243,8 @@ static void gre_err(struct sk_buff *skb, u32 info)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type == ICMP_REDIRECT) {
|
if (type == ICMP_REDIRECT) {
|
||||||
ipv4_redirect(skb, dev_net(skb->dev), skb->dev->ifindex, 0,
|
ipv4_redirect(skb, dev_net(skb->dev), skb->dev->ifindex,
|
||||||
IPPROTO_GRE, 0);
|
IPPROTO_GRE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -320,7 +320,7 @@ static int vti4_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, protocol);
|
ipv4_update_pmtu(skb, net, info, 0, protocol);
|
||||||
else
|
else
|
||||||
ipv4_redirect(skb, net, 0, 0, protocol, 0);
|
ipv4_redirect(skb, net, 0, protocol);
|
||||||
xfrm_state_put(x);
|
xfrm_state_put(x);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -50,7 +50,7 @@ static int ipcomp4_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, IPPROTO_COMP);
|
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, IPPROTO_COMP);
|
||||||
xfrm_state_put(x);
|
xfrm_state_put(x);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -180,7 +180,7 @@ static int ipip_err(struct sk_buff *skb, u32 info)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == ICMP_REDIRECT) {
|
if (type == ICMP_REDIRECT) {
|
||||||
ipv4_redirect(skb, net, t->parms.link, 0, iph->protocol, 0);
|
ipv4_redirect(skb, net, t->parms.link, iph->protocol);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1130,14 +1130,14 @@ out:
|
||||||
EXPORT_SYMBOL_GPL(ipv4_sk_update_pmtu);
|
EXPORT_SYMBOL_GPL(ipv4_sk_update_pmtu);
|
||||||
|
|
||||||
void ipv4_redirect(struct sk_buff *skb, struct net *net,
|
void ipv4_redirect(struct sk_buff *skb, struct net *net,
|
||||||
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;
|
||||||
|
|
||||||
__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, 0, 0);
|
||||||
rt = __ip_route_output_key(net, &fl4);
|
rt = __ip_route_output_key(net, &fl4);
|
||||||
if (!IS_ERR(rt)) {
|
if (!IS_ERR(rt)) {
|
||||||
__ip_do_redirect(rt, skb, &fl4, false);
|
__ip_do_redirect(rt, skb, &fl4, false);
|
||||||
|
|
|
@ -539,8 +539,8 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (type == ICMP_REDIRECT) {
|
if (type == ICMP_REDIRECT) {
|
||||||
ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0,
|
ipv4_redirect(skb, dev_net(skb->dev), t->parms.link,
|
||||||
iph->protocol, 0);
|
iph->protocol);
|
||||||
err = 0;
|
err = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,7 +471,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, protocol);
|
ipv4_update_pmtu(skb, net, info, 0, protocol);
|
||||||
else
|
else
|
||||||
ipv4_redirect(skb, net, 0, 0, protocol, 0);
|
ipv4_redirect(skb, net, 0, protocol);
|
||||||
xfrm_state_put(x);
|
xfrm_state_put(x);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue