Skip to content

Commit 75cf662

Browse files
lxindavem330
authored andcommitted
sctp: return true only for pathmtu update in sctp_transport_pl_toobig
sctp_transport_pl_toobig() supposes to return true only if there's pathmtu update, so that in sctp_icmp_frag_needed() it would call sctp_assoc_sync_pmtu() and sctp_retransmit(). This patch is to fix these return places in sctp_transport_pl_toobig(). Fixes: 8369640 ("sctp: do state transition when receiving an icmp TOOBIG packet") Signed-off-by: Xin Long <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cc4665c commit 75cf662

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

net/sctp/transport.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ static bool sctp_transport_pl_toobig(struct sctp_transport *t, u32 pmtu)
368368

369369
t->pl.pmtu = SCTP_BASE_PLPMTU;
370370
t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t);
371+
return true;
371372
}
372373
} else if (t->pl.state == SCTP_PL_SEARCH) {
373374
if (pmtu >= SCTP_BASE_PLPMTU && pmtu < t->pl.pmtu) {
@@ -378,11 +379,10 @@ static bool sctp_transport_pl_toobig(struct sctp_transport *t, u32 pmtu)
378379
t->pl.probe_high = 0;
379380
t->pl.pmtu = SCTP_BASE_PLPMTU;
380381
t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t);
382+
return true;
381383
} else if (pmtu > t->pl.pmtu && pmtu < t->pl.probe_size) {
382384
t->pl.probe_size = pmtu;
383385
t->pl.probe_count = 0;
384-
385-
return false;
386386
}
387387
} else if (t->pl.state == SCTP_PL_COMPLETE) {
388388
if (pmtu >= SCTP_BASE_PLPMTU && pmtu < t->pl.pmtu) {
@@ -393,10 +393,11 @@ static bool sctp_transport_pl_toobig(struct sctp_transport *t, u32 pmtu)
393393
t->pl.probe_high = 0;
394394
t->pl.pmtu = SCTP_BASE_PLPMTU;
395395
t->pathmtu = t->pl.pmtu + sctp_transport_pl_hlen(t);
396+
return true;
396397
}
397398
}
398399

399-
return true;
400+
return false;
400401
}
401402

402403
bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu)

0 commit comments

Comments
 (0)