From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 12:03:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B912C10656C7; Sun, 18 Jan 2009 12:03:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4B958FC0C; Sun, 18 Jan 2009 12:03:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IC3hS1072722; Sun, 18 Jan 2009 12:03:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IC3h1X072721; Sun, 18 Jan 2009 12:03:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901181203.n0IC3h1X072721@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jan 2009 12:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187387 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 12:03:47 -0000 Author: mav Date: Sun Jan 18 12:03:43 2009 New Revision: 187387 URL: http://svn.freebsd.org/changeset/base/187387 Log: 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 Modified: head/sys/netgraph/ng_ppp.c Modified: head/sys/netgraph/ng_ppp.c ============================================================================== --- head/sys/netgraph/ng_ppp.c Sun Jan 18 11:47:39 2009 (r187386) +++ head/sys/netgraph/ng_ppp.c Sun Jan 18 12:03:43 2009 (r187387) @@ -128,7 +128,6 @@ MALLOC_DEFINE(M_NETGRAPH_PPP, "netgraph_ #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, 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 s 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