Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Maciej Żenczykowski and committed by
David S. Miller
1042caa7 d888f396

+14 -15
+1 -2
include/net/route.h
··· 203 203 void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, int oif, 204 204 u8 protocol); 205 205 void ipv4_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, u32 mtu); 206 - void ipv4_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark, 207 - u8 protocol, int flow_flags); 206 + void ipv4_redirect(struct sk_buff *skb, struct net *net, int oif, u8 protocol); 208 207 void ipv4_sk_redirect(struct sk_buff *skb, struct sock *sk); 209 208 void ip_rt_send_redirect(struct sk_buff *skb); 210 209
+1 -1
net/ipv4/ah4.c
··· 463 463 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 464 464 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_AH); 465 465 else 466 - ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0); 466 + ipv4_redirect(skb, net, 0, IPPROTO_AH); 467 467 xfrm_state_put(x); 468 468 469 469 return 0;
+1 -1
net/ipv4/esp4.c
··· 822 822 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 823 823 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_ESP); 824 824 else 825 - ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0); 825 + ipv4_redirect(skb, net, 0, IPPROTO_ESP); 826 826 xfrm_state_put(x); 827 827 828 828 return 0;
+1 -1
net/ipv4/icmp.c
··· 1100 1100 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) 1101 1101 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_ICMP); 1102 1102 else if (type == ICMP_REDIRECT) 1103 - ipv4_redirect(skb, net, 0, 0, IPPROTO_ICMP, 0); 1103 + ipv4_redirect(skb, net, 0, IPPROTO_ICMP); 1104 1104 } 1105 1105 1106 1106 /*
+2 -2
net/ipv4/ip_gre.c
··· 243 243 return; 244 244 } 245 245 if (type == ICMP_REDIRECT) { 246 - ipv4_redirect(skb, dev_net(skb->dev), skb->dev->ifindex, 0, 247 - IPPROTO_GRE, 0); 246 + ipv4_redirect(skb, dev_net(skb->dev), skb->dev->ifindex, 247 + IPPROTO_GRE); 248 248 return; 249 249 } 250 250
+1 -1
net/ipv4/ip_vti.c
··· 320 320 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 321 321 ipv4_update_pmtu(skb, net, info, 0, protocol); 322 322 else 323 - ipv4_redirect(skb, net, 0, 0, protocol, 0); 323 + ipv4_redirect(skb, net, 0, protocol); 324 324 xfrm_state_put(x); 325 325 326 326 return 0;
+1 -1
net/ipv4/ipcomp.c
··· 50 50 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 51 51 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_COMP); 52 52 else 53 - ipv4_redirect(skb, net, 0, 0, IPPROTO_COMP, 0); 53 + ipv4_redirect(skb, net, 0, IPPROTO_COMP); 54 54 xfrm_state_put(x); 55 55 56 56 return 0;
+1 -1
net/ipv4/ipip.c
··· 180 180 } 181 181 182 182 if (type == ICMP_REDIRECT) { 183 - ipv4_redirect(skb, net, t->parms.link, 0, iph->protocol, 0); 183 + ipv4_redirect(skb, net, t->parms.link, iph->protocol); 184 184 goto out; 185 185 } 186 186
+2 -2
net/ipv4/route.c
··· 1130 1130 EXPORT_SYMBOL_GPL(ipv4_sk_update_pmtu); 1131 1131 1132 1132 void ipv4_redirect(struct sk_buff *skb, struct net *net, 1133 - int oif, u32 mark, u8 protocol, int flow_flags) 1133 + int oif, u8 protocol) 1134 1134 { 1135 1135 const struct iphdr *iph = (const struct iphdr *) skb->data; 1136 1136 struct flowi4 fl4; 1137 1137 struct rtable *rt; 1138 1138 1139 1139 __build_flow_key(net, &fl4, NULL, iph, oif, 1140 - RT_TOS(iph->tos), protocol, mark, flow_flags); 1140 + RT_TOS(iph->tos), protocol, 0, 0); 1141 1141 rt = __ip_route_output_key(net, &fl4); 1142 1142 if (!IS_ERR(rt)) { 1143 1143 __ip_do_redirect(rt, skb, &fl4, false);
+2 -2
net/ipv6/sit.c
··· 539 539 goto out; 540 540 } 541 541 if (type == ICMP_REDIRECT) { 542 - ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0, 543 - iph->protocol, 0); 542 + ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 543 + iph->protocol); 544 544 err = 0; 545 545 goto out; 546 546 }
+1 -1
net/xfrm/xfrm_interface.c
··· 471 471 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 472 472 ipv4_update_pmtu(skb, net, info, 0, protocol); 473 473 else 474 - ipv4_redirect(skb, net, 0, 0, protocol, 0); 474 + ipv4_redirect(skb, net, 0, protocol); 475 475 xfrm_state_put(x); 476 476 477 477 return 0;