Index: head/net/mpd5/Makefile =================================================================== --- head/net/mpd5/Makefile (revision 476337) +++ head/net/mpd5/Makefile (revision 476338) @@ -1,50 +1,50 @@ # Created by: Archie Cobbs # $FreeBSD$ PORTNAME= mpd DISTVERSION= 5.8 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION} PKGNAMESUFFIX= 5 DIST_SUBDIR= mpd5 MAINTAINER= eugen@FreeBSD.org COMMENT= Multi-link PPP daemon based on netgraph(4) LICENSE= BSD3CLAUSE BROKEN_SSL= openssl-devel OPTIONS_DEFINE= NG_IPACCT NG_IPACCT_DESC= Use ng_ipacct kernel module from port HAS_CONFIGURE= YES CONFIGURE_WRKSRC= "${WRKSRC}/src" USES= ssl .include MAKE_ARGS+= OSVERSION=${OSVERSION} .if ${PORT_OPTIONS:MNG_IPACCT} BUILD_DEPENDS+= ${LOCALBASE}/include/netgraph/ng_ipacct.h:net-mgmt/ng_ipacct .if exists(${KMODDIR}/ng_ipacct.ko) RUN_DEPENDS+= ${KMODDIR}/ng_ipacct.ko:net-mgmt/ng_ipacct .else RUN_DEPENDS+= /boot/modules/ng_ipacct.ko:net-mgmt/ng_ipacct .endif .endif USE_RC_SUBR= mpd5 CONFSUF= conf secret script DOCSDIR= ${PREFIX}/share/doc/mpd5 PORTDOCS= README mpd* PLIST_FILES= ${CONFSUF:S/^/etc\/mpd5\/mpd./:S/$/.sample/} sbin/mpd5 .if !defined(WITHOUT_MAN) PLIST_FILES+= man/man8/mpd5.8.gz .endif .include Index: head/net/mpd5/files/patch-mtu =================================================================== --- head/net/mpd5/files/patch-mtu (revision 476337) +++ head/net/mpd5/files/patch-mtu (nonexistent) @@ -1,64 +0,0 @@ -Index: src/ccp.c -=================================================================== ---- src/ccp.c (revision 2245) -+++ src/ccp.c (working copy) -@@ -938,6 +938,7 @@ CcpDecodeConfig(Fsm fp, FsmOption list, - CCP_PEER_REJ(ccp, index); - break; - -+ case MODE_ACK: - case MODE_NAK: - case MODE_NOP: - (*ct->DecodeConfig)(fp, opt, mode); -Index: src/ecp.c -=================================================================== ---- src/ecp.c (revision 2245) -+++ src/ecp.c (working copy) -@@ -793,6 +793,7 @@ EcpDecodeConfig(Fsm fp, FsmOption list, - ECP_PEER_REJ(ecp, index); - break; - -+ case MODE_ACK: - case MODE_NOP: - (*et->DecodeConfig)(fp, opt, mode); - break; -Index: src/fsm.c -=================================================================== ---- src/fsm.c (revision 2245) -+++ src/fsm.c (working copy) -@@ -664,7 +664,7 @@ FsmRecvConfigAck(Fsm fp, FsmHeader lhp, - /* XXX We should verify the contents are equal to our last sent config-req */ - - /* Decode packet */ -- FsmDecodeBuffer(fp, MBDATA(bp), MBLEN(bp), MODE_NOP); -+ FsmDecodeBuffer(fp, MBDATA(bp), MBLEN(bp), MODE_ACK); - - /* Do whatever */ - switch (fp->state) { -Index: src/fsm.h -=================================================================== ---- src/fsm.h (revision 2245) -+++ src/fsm.h (working copy) -@@ -43,6 +43,7 @@ - #define MODE_NAK 1 - #define MODE_REJ 2 - #define MODE_NOP 3 -+ #define MODE_ACK 4 /* pseudo mode for LCP negotiations */ - - /* Codes */ - #define CODE_VENDOR 0 -Index: src/lcp.c -=================================================================== ---- src/lcp.c (revision 2245) -+++ src/lcp.c (working copy) -@@ -843,6 +843,10 @@ LcpDecodeConfig(Fsm fp, FsmOption list, - mru = ntohs(mru); - Log(LG_LCP, ("[%s] %s %d", l->name, oi->name, mru)); - switch (mode) { -+ case MODE_ACK: -+ if (mru == lcp->want_mru) -+ lcp->peer_mru = mru; -+ break; - case MODE_REQ: - if (mru < LCP_MIN_MRU) { - mru = htons(LCP_MIN_MRU); Property changes on: head/net/mpd5/files/patch-mtu ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/mpd5/files/patch-mtu-override =================================================================== --- head/net/mpd5/files/patch-mtu-override (nonexistent) +++ head/net/mpd5/files/patch-mtu-override (revision 476338) @@ -0,0 +1,107 @@ +Index: src/iface.h +=================================================================== +--- src/iface.h (revision 2246) ++++ src/iface.h (working copy) +@@ -107,6 +107,7 @@ + u_char traffic[IFACE_IDLE_SPLIT]; /* Mark any traffic */ + u_short mtu; /* Interface MTU */ + u_short max_mtu; /* Configured maximum MTU */ ++ u_short mtu_override; /* Configured MTU override */ + struct optinfo options; /* Configuration options */ + u_int idle_timeout; /* Idle timeout */ + u_int session_timeout; /* Session timeout */ +Index: src/iface.c +=================================================================== +--- src/iface.c (revision 2246) ++++ src/iface.c (working copy) +@@ -162,7 +162,7 @@ + IfaceSetCommand, NULL, 2, (void *) SET_ADDRS }, + { "route {dest}[/{width}]", "Add IP route", + IfaceSetCommand, NULL, 2, (void *) SET_ROUTE }, +- { "mtu {size}", "Set max allowed interface MTU", ++ { "mtu {size} [override]", "Set max allowed or override interface MTU", + IfaceSetCommand, NULL, 2, (void *) SET_MTU }, + { "name [{name}]", "Set interface name", + IfaceSetCommand, NULL, 2, (void *) SET_NAME }, +@@ -289,6 +289,7 @@ IfaceInit(Bund b) + /* Default configuration */ + iface->mtu = NG_IFACE_MTU_DEFAULT; + iface->max_mtu = NG_IFACE_MTU_DEFAULT; ++ iface->mtu_override = 0; + #ifdef SIOCSIFDESCR + iface->ifdescr = NULL; + iface->conf.ifdescr = NULL; +@@ -1606,15 +1607,30 @@ IfaceSetCommand(Context ctx, int ac, cha + case SET_MTU: + { + int max_mtu; ++ int override; + + /* Check */ +- if (ac != 1) ++ if (ac < 1 || ac > 2) + return(-1); + + max_mtu = atoi(av[0]); ++ override = 0; ++ ++ if (ac == 2 && av[1][0]) { ++ if (strcmp(av[1], "override") == 0) ++ override = 1; ++ else ++ Error("Invalid keyword %s", av[1]); ++ } ++ + if (max_mtu < IFACE_MIN_MTU || max_mtu > IFACE_MAX_MTU) +- Error("Invalid interface mtu %d", max_mtu); +- iface->max_mtu = max_mtu; ++ if (!override || max_mtu != 0) ++ Error("Invalid interface mtu %d", max_mtu); ++ ++ if (max_mtu != 0) ++ iface->max_mtu = max_mtu; ++ if (override) ++ iface->mtu_override = max_mtu; + } + break; + +@@ -1743,6 +1759,7 @@ IfaceStat(Context ctx, int ac, char *av[ + Printf("\tGroup : %s\r\n", iface->conf.ifgroup); + #endif + Printf("\tMaximum MTU : %d bytes\r\n", iface->max_mtu); ++ Printf("\tMTU override : %d bytes\r\n", iface->mtu_override); + Printf("\tIdle timeout : %d seconds\r\n", iface->idle_timeout); + Printf("\tSession timeout : %d seconds\r\n", iface->session_timeout); + if (!u_rangeempty(&iface->conf.self_addr)) { +@@ -1873,14 +1890,18 @@ IfaceSetMTU(Bund b, int mtu) + return; + } + +- if ((b->params.mtu > 0) && (mtu > b->params.mtu)) { ++ if (!iface->mtu_override && (b->params.mtu > 0) && (mtu > b->params.mtu)) { + mtu = b->params.mtu; + Log(LG_IFACE2, ("[%s] IFACE: forcing MTU of auth backend: %d bytes", + b->name, mtu)); + } + +- /* Limit MTU to configured maximum */ +- if (mtu > iface->max_mtu) ++ /* Limit MTU to configured maximum/override */ ++ if (iface->mtu_override) { ++ mtu = iface->mtu_override; ++ Log(LG_IFACE2, ("[%s] IFACE: forcing MTU override: %d bytes", ++ b->name, mtu)); ++ } else if (mtu > iface->max_mtu) + mtu = iface->max_mtu; + + /* Set MTU on interface */ +@@ -3061,6 +3082,9 @@ IfaceSetupMSS(Bund b, uint16_t maxMSS) + memset(&tcpmsscfg, 0, sizeof(tcpmsscfg)); + tcpmsscfg.maxMSS = maxMSS; + ++ Log(LG_IFACE2, ("[%s] IFACE: Configuring ng_tcpmss %s %u", ++ b->name, path, (unsigned)tcpmsscfg.maxMSS)); ++ + snprintf(tcpmsscfg.inHook, sizeof(tcpmsscfg.inHook), "in"); + snprintf(tcpmsscfg.outHook, sizeof(tcpmsscfg.outHook), "out"); + if (NgSendMsg(gLinksCsock, path, NGM_TCPMSS_COOKIE, NGM_TCPMSS_CONFIG, Property changes on: head/net/mpd5/files/patch-mtu-override ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property