Skip to contentSkip to conversation

sctp: Drop ICMP packet too big message with MTU larger than

PATCH New Wei Yongjun 1 participant 1 message Aug 27, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sctp: Drop ICMP packet too big message with MTU larger than

If ICMP packet too big message is received with MTU larger than current PMTU, SCTP will still accept this ICMPv6 message and sync the PMTU of assoc with the wrong MTU.

Endpoing A Endpoint B
(ESTABLISHED) (ESTABLISHED)
ICMP --------->
(packet too big)
sync PMTU

This patch fixed the problem by drop that ICMP message.

---
 net/sctp/input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sctp/input.c +1 -1
index a49fa80..bf612d9 100644
@@ -369,7 +369,7 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
 void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
 			   struct sctp_transport *t, __u32 pmtu)
 {
-	if (!t || (t->pathmtu = pmtu))
+	if (!t || (t->pathmtu <= pmtu))
 		return;
 
 	if (sock_owned_by_user(sk)) {
Signature · 1 line
1.5.3.8