Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1520011
| From | Vicente Jimenez Aguilar <googuy@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] icmp: Restore resistence to abnormal messages |
| Date | 2016-11-11 21:30 +0100 |
| Message-ID | <sCqCu-I7-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Restore network resistance to abnormal ICMP fragmentation needed messages
with next hop MTU equal to (or exceeding) dropped packet size
Fixes: 46517008e116 ("ipv4: Kill ip_rt_frag_needed().")
Signed-off-by: Vicente Jimenez Aguilar <googuy@gmail.com>
---
net/ipv4/icmp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 38abe70..4c90d76 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -773,6 +773,7 @@ static bool icmp_tag_validation(int proto)
static bool icmp_unreach(struct sk_buff *skb)
{
const struct iphdr *iph;
+ unsigned short old_mtu;
struct icmphdr *icmph;
struct net *net;
u32 info = 0;
@@ -819,6 +820,12 @@ static bool icmp_unreach(struct sk_buff *skb)
/* fall through */
case 0:
info = ntohs(icmph->un.frag.mtu);
+ /* Handle weird case where next hop MTU is
+ * equal to or exceeding dropped packet size
+ */
+ old_mtu = ntohs(iph->tot_len);
+ if (info >= old_mtu)
+ info = old_mtu - 2;
}
break;
case ICMP_SR_FAILED:
--
2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] icmp: Restore resistence to abnormal messages Vicente Jimenez Aguilar <googuy@gmail.com> - 2016-11-11 21:30 +0100
Re: [PATCH] icmp: Restore resistence to abnormal messages David Miller <davem@davemloft.net> - 2016-11-14 19:40 +0100
Re: [PATCH] icmp: Restore resistence to abnormal messages David Miller <davem@redhat.com> - 2016-11-15 18:00 +0100
Re: [PATCH] icmp: Restore resistence to abnormal messages Florian Westphal <fw@strlen.de> - 2016-11-15 18:40 +0100
Re: [PATCH] icmp: Restore resistence to abnormal messages Vicente Jiménez <googuy@gmail.com> - 2016-11-15 20:40 +0100
Re: [PATCH] icmp: Restore resistence to abnormal messages Florian Westphal <fw@strlen.de> - 2016-11-16 02:20 +0100
Re: [PATCH] icmp: Restore resistence to abnormal messages Vicente Jiménez <googuy@gmail.com> - 2016-11-17 02:20 +0100
csiph-web