summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ppp.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-01-18 12:03:43 +0000
committermav <mav@FreeBSD.org>2009-01-18 12:03:43 +0000
commitfacc5c0f6107fdae26bbc72af0cfdf5d8d8eb321 (patch)
treec873c72d5cf7b864b564e8539a256d2360d16c1a /sys/netgraph/ng_ppp.c
parent61329c22c2e4437413c72b285a4c539856731a69 (diff)
downloadFreeBSD-src-facc5c0f6107fdae26bbc72af0cfdf5d8d8eb321.zip
FreeBSD-src-facc5c0f6107fdae26bbc72af0cfdf5d8d8eb321.tar.gz
Remove strict limitation on minimal multilink MRRU. RFC claims that MRRU
of 1500 must be supported, but allows smaller values to be negotiated. Enforce specified MRRU for outgoing frames. MFC after: 2 weeks
Diffstat (limited to 'sys/netgraph/ng_ppp.c')
-rw-r--r--sys/netgraph/ng_ppp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index ec5d62b..b2b0cb0 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -128,7 +128,6 @@ MALLOC_DEFINE(M_NETGRAPH_PPP, "netgraph_ppp", "netgraph ppp node");
#define PROT_VJUNCOMP 0x002f
/* Multilink PPP definitions */
-#define MP_MIN_MRRU 1500 /* per RFC 1990 */
#define MP_INITIAL_SEQ 0 /* per RFC 1990 */
#define MP_MIN_LINK_MRU 32
@@ -1985,6 +1984,12 @@ ng_ppp_mp_xmit(node_p node, item_p item, uint16_t proto)
priv->activeLinks[0], plen));
}
+ /* Check peer's MRRU for this bundle. */
+ if (plen > priv->conf.mrru) {
+ NG_FREE_ITEM(item);
+ return (EMSGSIZE);
+ }
+
/* Extract mbuf. */
NGI_GET_M(item, m);
@@ -2540,10 +2545,6 @@ ng_ppp_config_valid(node_p node, const struct ng_ppp_node_conf *newConf)
return (0);
}
- /* Check bundle parameters */
- if (newConf->bund.enableMultilink && newConf->bund.mrru < MP_MIN_MRRU)
- return (0);
-
/* Disallow changes to multi-link configuration while MP is active */
if (priv->numActiveLinks > 0 && newNumLinksActive > 0) {
if (!priv->conf.enableMultilink
OpenPOWER on IntegriCloud