Fix an issue with MTU calculation if an ICMP messaeg is received

for an SCTP/UDP packet.

MFC after:	1 week
This commit is contained in:
Michael Tuexen 2017-04-26 20:21:05 +00:00
parent 4f4acb65e8
commit d274bcc661
2 changed files with 6 additions and 6 deletions

View File

@ -220,11 +220,11 @@ sctp_notify(struct sctp_inpcb *inp,
timer_stopped = 0;
}
/* Update the path MTU. */
if (net->port) {
next_mtu -= sizeof(struct udphdr);
}
if (net->mtu > next_mtu) {
net->mtu = next_mtu;
if (net->port) {
net->mtu -= sizeof(struct udphdr);
}
}
/* Update the association MTU */
if (stcb->asoc.smallest_mtu > next_mtu) {

View File

@ -237,11 +237,11 @@ sctp6_notify(struct sctp_inpcb *inp,
timer_stopped = 0;
}
/* Update the path MTU. */
if (net->port) {
next_mtu -= sizeof(struct udphdr);
}
if (net->mtu > next_mtu) {
net->mtu = next_mtu;
if (net->port) {
net->mtu -= sizeof(struct udphdr);
}
}
/* Update the association MTU */
if (stcb->asoc.smallest_mtu > next_mtu) {