From owner-freebsd-net Fri Oct 18 6:27:55 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2C4037B401 for ; Fri, 18 Oct 2002 06:27:53 -0700 (PDT) Received: from otdel-1.org (draculina.otdel-1.org [195.230.89.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B15E43E7B for ; Fri, 18 Oct 2002 06:27:51 -0700 (PDT) (envelope-from bsd#nms@otdel-1.org) Received: by otdel-1.org (CommuniGate Pro PIPE 4.0b9) with PIPE id 2220061; Fri, 18 Oct 2002 17:27:47 +0400 Date: Fri, 18 Oct 2002 17:27:32 +0400 From: Nikolai Saoukh To: freebsd-net@FreeBSD.ORG Subject: For those who had problems with MPD server and win clients Message-ID: <20021018132732.GA27692@otdel1.org> Mail-Followup-To: freebsd-net@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-Mailer: CommuniGate Pro CLI mailer Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org IMHO, there is a combination of two bugs. 1) MPD (3.9, at least) calculates and sets mtu (bund.c/BundUpdateParams()) at wrong time -- when one of MIN() args is still zero. ioctl with bizzare mtu value rejected, thus leaving the default (1500), which in turn is above MRU requested from win client (1400 for multilink). [at the same time on other end of connection] 2) MS clients has setting 'Negotiate multi-link for single link connections'. Even when this option is negotiated, ms client does not understand partial MP (RFC1990) fragments. When both (begin, end) flags set, then everything is fine, as long as everything fits MRU. Would anyone review and test this patches? (bund.c patches a kind of nitpicking -- enabled is not negotiated :-)) --- bund.c.orig Tue Oct 8 13:40:15 2002 +++ bund.c Fri Oct 18 17:17:23 2002 @@ -548,22 +548,20 @@ mtu = NG_IFACE_MTU_DEFAULT; /* Reset to default settings */ break; case 1: - if (!Enabled(&bund->conf.options, BUND_CONF_MULTILINK)) { - mtu = MIN(bund->links[the_link]->lcp.peer_mru, - bund->links[the_link]->phys->type->mtu); - break; - } - /* FALLTHROUGH */ + mtu = bund->links[the_link]->lcp.peer_mru; + break; default: /* We fragment everything, use bundle MRRU */ mtu = bund->mp.peer_mrru; break; } - /* Subtract to make room for various frame-bloating protocols */ - if (Enabled(&bund->conf.options, BUND_CONF_COMPRESSION)) - mtu = CcpSubtractBloat(mtu); - if (Enabled(&bund->conf.options, BUND_CONF_ENCRYPTION)) - mtu = EcpSubtractBloat(mtu); + if (bm->n_up > 0) { + /* Subtract to make room for various frame-bloating protocols */ + if (bund->ccp.xmit != NULL) + mtu = CcpSubtractBloat(mtu); + if (bund->ecp.xmit != NULL) + mtu = EcpSubtractBloat(mtu); + } /* Update interface MTU */ if (mtu > BUND_MAX_MTU) --- iface.c.orig Tue Oct 8 14:28:09 2002 +++ iface.c Sat Oct 12 11:54:36 2002 @@ -346,6 +346,8 @@ /* Sanity */ assert(!iface->ip_up); + BundUpdateParams(); + /* Set addresses and bring interface up */ snprintf(hisaddr, sizeof(hisaddr), "%s", inet_ntoa(iface->peer_addr)); ExecCmd(LG_IFACE, "%s %s %s %s netmask 0xffffffff %slink0", To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message