Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2002 17:27:32 +0400
From:      Nikolai Saoukh <bsd#nms@otdel-1.org>
To:        freebsd-net@FreeBSD.ORG
Subject:   For those who had problems with MPD server and win clients
Message-ID:  <20021018132732.GA27692@otdel1.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021018132732.GA27692>