svn commit: r256556 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Tue Oct 15 20:21:28 UTC 2013
Author: tuexen
Date: Tue Oct 15 20:21:27 2013
New Revision: 256556
URL: http://svnweb.freebsd.org/changeset/base/256556
Log:
Remove a buggy comparision when setting manually the path MTU.
After fixing, the comparision would have become redundant.
Thanks to Andrew Galante for reporting the issue.
MFC after: 3 days
Modified:
head/sys/netinet/sctp_constants.h
head/sys/netinet/sctp_usrreq.c
Modified: head/sys/netinet/sctp_constants.h
==============================================================================
--- head/sys/netinet/sctp_constants.h Tue Oct 15 18:59:32 2013 (r256555)
+++ head/sys/netinet/sctp_constants.h Tue Oct 15 20:21:27 2013 (r256556)
@@ -726,7 +726,6 @@ __FBSDID("$FreeBSD$");
/* small chunk store for looking at chunk_list in auth */
#define SCTP_SMALL_CHUNK_STORE 260
-#define SCTP_DEFAULT_MINSEGMENT 512 /* MTU size ... if no mtu disc */
#define SCTP_HOW_MANY_SECRETS 2 /* how many secrets I keep */
#define SCTP_NUMBER_OF_SECRETS 8 /* or 8 * 4 = 32 octets */
Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c Tue Oct 15 18:59:32 2013 (r256555)
+++ head/sys/netinet/sctp_usrreq.c Tue Oct 15 20:21:27 2013 (r256556)
@@ -4796,11 +4796,9 @@ sctp_setopt(struct socket *so, int optna
SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10);
}
net->dest_state |= SCTP_ADDR_NO_PMTUD;
- if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
- net->mtu = paddrp->spp_pathmtu + ovh;
- if (net->mtu < stcb->asoc.smallest_mtu) {
- sctp_pathmtu_adjustment(stcb, net->mtu);
- }
+ net->mtu = paddrp->spp_pathmtu + ovh;
+ if (net->mtu < stcb->asoc.smallest_mtu) {
+ sctp_pathmtu_adjustment(stcb, net->mtu);
}
}
if (paddrp->spp_flags & SPP_PMTUD_ENABLE) {
@@ -4920,11 +4918,9 @@ sctp_setopt(struct socket *so, int optna
SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10);
}
net->dest_state |= SCTP_ADDR_NO_PMTUD;
- if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
- net->mtu = paddrp->spp_pathmtu + ovh;
- if (net->mtu < stcb->asoc.smallest_mtu) {
- sctp_pathmtu_adjustment(stcb, net->mtu);
- }
+ net->mtu = paddrp->spp_pathmtu + ovh;
+ if (net->mtu < stcb->asoc.smallest_mtu) {
+ sctp_pathmtu_adjustment(stcb, net->mtu);
}
}
sctp_stcb_feature_on(inp, stcb, SCTP_PCB_FLAGS_DO_NOT_PMTUD);
More information about the svn-src-all
mailing list