summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ah4.c2
-rw-r--r--net/ipv4/esp4.c2
-rw-r--r--net/ipv4/icmp.c2
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv4/ip_vti.c2
-rw-r--r--net/ipv4/ipcomp.c2
-rw-r--r--net/ipv4/ipip.c3
-rw-r--r--net/ipv4/route.c8
-rw-r--r--net/ipv6/sit.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_core.c3
-rw-r--r--net/xfrm/xfrm_interface.c2
11 files changed, 13 insertions, 17 deletions
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index 4dd95cdd8070..8811fe30282a 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -461,7 +461,7 @@ static int ah4_err(struct sk_buff *skb, u32 info)
461 return 0; 461 return 0;
462 462
463 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 463 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
464 ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_AH, 0); 464 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_AH);
465 else 465 else
466 ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0); 466 ipv4_redirect(skb, net, 0, 0, IPPROTO_AH, 0);
467 xfrm_state_put(x); 467 xfrm_state_put(x);
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 97689012b357..2d0274441923 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -820,7 +820,7 @@ static int esp4_err(struct sk_buff *skb, u32 info)
820 return 0; 820 return 0;
821 821
822 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 822 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
823 ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ESP, 0); 823 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_ESP);
824 else 824 else
825 ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0); 825 ipv4_redirect(skb, net, 0, 0, IPPROTO_ESP, 0);
826 xfrm_state_put(x); 826 xfrm_state_put(x);
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 695979b7ef6d..8013b37b598f 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -1098,7 +1098,7 @@ void icmp_err(struct sk_buff *skb, u32 info)
1098 } 1098 }
1099 1099
1100 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) 1100 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED)
1101 ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_ICMP, 0); 1101 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_ICMP);
1102 else if (type == ICMP_REDIRECT) 1102 else if (type == ICMP_REDIRECT)
1103 ipv4_redirect(skb, net, 0, 0, IPPROTO_ICMP, 0); 1103 ipv4_redirect(skb, net, 0, 0, IPPROTO_ICMP, 0);
1104} 1104}
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index c3385a84f8ff..83b80fafd8f2 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -239,7 +239,7 @@ static void gre_err(struct sk_buff *skb, u32 info)
239 239
240 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { 240 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
241 ipv4_update_pmtu(skb, dev_net(skb->dev), info, 241 ipv4_update_pmtu(skb, dev_net(skb->dev), info,
242 skb->dev->ifindex, 0, IPPROTO_GRE, 0); 242 skb->dev->ifindex, IPPROTO_GRE);
243 return; 243 return;
244 } 244 }
245 if (type == ICMP_REDIRECT) { 245 if (type == ICMP_REDIRECT) {
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index f38cb21d773d..1b5571cb3282 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -318,7 +318,7 @@ static int vti4_err(struct sk_buff *skb, u32 info)
318 return 0; 318 return 0;
319 319
320 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 320 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
321 ipv4_update_pmtu(skb, net, info, 0, 0, protocol, 0); 321 ipv4_update_pmtu(skb, net, info, 0, protocol);
322 else 322 else
323 ipv4_redirect(skb, net, 0, 0, protocol, 0); 323 ipv4_redirect(skb, net, 0, 0, protocol, 0);
324 xfrm_state_put(x); 324 xfrm_state_put(x);
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index d97f4f2787f5..04049d1330a2 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -48,7 +48,7 @@ static int ipcomp4_err(struct sk_buff *skb, u32 info)
48 return 0; 48 return 0;
49 49
50 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 50 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
51 ipv4_update_pmtu(skb, net, info, 0, 0, IPPROTO_COMP, 0); 51 ipv4_update_pmtu(skb, net, info, 0, IPPROTO_COMP);
52 else 52 else
53 ipv4_redirect(skb, net, 0, 0, IPPROTO_COMP, 0); 53 ipv4_redirect(skb, net, 0, 0, IPPROTO_COMP, 0);
54 xfrm_state_put(x); 54 xfrm_state_put(x);
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index c891235b4966..6ff008e5818d 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -175,8 +175,7 @@ static int ipip_err(struct sk_buff *skb, u32 info)
175 } 175 }
176 176
177 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { 177 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
178 ipv4_update_pmtu(skb, net, info, t->parms.link, 0, 178 ipv4_update_pmtu(skb, net, info, t->parms.link, iph->protocol);
179 iph->protocol, 0);
180 goto out; 179 goto out;
181 } 180 }
182 181
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index b678466da451..7bbe3fc80b90 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1040,17 +1040,15 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
1040} 1040}
1041 1041
1042void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, 1042void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu,
1043 int oif, u32 mark, u8 protocol, int flow_flags) 1043 int oif, u8 protocol)
1044{ 1044{
1045 const struct iphdr *iph = (const struct iphdr *) skb->data; 1045 const struct iphdr *iph = (const struct iphdr *) skb->data;
1046 struct flowi4 fl4; 1046 struct flowi4 fl4;
1047 struct rtable *rt; 1047 struct rtable *rt;
1048 1048 u32 mark = IP4_REPLY_MARK(net, skb->mark);
1049 if (!mark)
1050 mark = IP4_REPLY_MARK(net, skb->mark);
1051 1049
1052 __build_flow_key(net, &fl4, NULL, iph, oif, 1050 __build_flow_key(net, &fl4, NULL, iph, oif,
1053 RT_TOS(iph->tos), protocol, mark, flow_flags); 1051 RT_TOS(iph->tos), protocol, mark, 0);
1054 rt = __ip_route_output_key(net, &fl4); 1052 rt = __ip_route_output_key(net, &fl4);
1055 if (!IS_ERR(rt)) { 1053 if (!IS_ERR(rt)) {
1056 __ip_rt_update_pmtu(rt, &fl4, mtu); 1054 __ip_rt_update_pmtu(rt, &fl4, mtu);
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index e9400ffa7875..085c588ebfe0 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -534,7 +534,7 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
534 534
535 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { 535 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
536 ipv4_update_pmtu(skb, dev_net(skb->dev), info, 536 ipv4_update_pmtu(skb, dev_net(skb->dev), info,
537 t->parms.link, 0, iph->protocol, 0); 537 t->parms.link, iph->protocol);
538 err = 0; 538 err = 0;
539 goto out; 539 goto out;
540 } 540 }
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 7ca926a03b81..fe9abf3cc10a 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1686,8 +1686,7 @@ ip_vs_in_icmp(struct netns_ipvs *ipvs, struct sk_buff *skb, int *related,
1686 skb_reset_network_header(skb); 1686 skb_reset_network_header(skb);
1687 IP_VS_DBG(12, "ICMP for IPIP %pI4->%pI4: mtu=%u\n", 1687 IP_VS_DBG(12, "ICMP for IPIP %pI4->%pI4: mtu=%u\n",
1688 &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, mtu); 1688 &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, mtu);
1689 ipv4_update_pmtu(skb, ipvs->net, 1689 ipv4_update_pmtu(skb, ipvs->net, mtu, 0, 0);
1690 mtu, 0, 0, 0, 0);
1691 /* Client uses PMTUD? */ 1690 /* Client uses PMTUD? */
1692 if (!(frag_off & htons(IP_DF))) 1691 if (!(frag_off & htons(IP_DF)))
1693 goto ignore_ipip; 1692 goto ignore_ipip;
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index 31acc6f33d98..16bc5ecb7869 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -469,7 +469,7 @@ static int xfrmi4_err(struct sk_buff *skb, u32 info)
469 } 469 }
470 470
471 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH) 471 if (icmp_hdr(skb)->type == ICMP_DEST_UNREACH)
472 ipv4_update_pmtu(skb, net, info, 0, 0, protocol, 0); 472 ipv4_update_pmtu(skb, net, info, 0, protocol);
473 else 473 else
474 ipv4_redirect(skb, net, 0, 0, protocol, 0); 474 ipv4_redirect(skb, net, 0, 0, protocol, 0);
475 xfrm_state_put(x); 475 xfrm_state_put(x);