Date: Thu, 6 Apr 2006 15:20:12 GMT From: Vladimir Ivanov <wawa@yandex-team.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/95417: ng_fec doesn't allow jumbo packets Message-ID: <200604061520.k36FKClq028091@www.freebsd.org> Resent-Message-ID: <200604061530.k36FUCga024310@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 95417 >Category: kern >Synopsis: ng_fec doesn't allow jumbo packets >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 06 15:30:11 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Vladimir Ivanov >Release: RELENG_5 >Organization: Yandex LLC >Environment: FreeBSD multiped.yandex.net 5.5-PRERELEASE FreeBSD 5.5-PRERELEASE #0: Tue Apr 4 11:56:54 MSD 2006 root@multiped.yandex.net:/usr/obj/usr/src/sys/MULTIPED-CORE i386 >Description: FEC (Etherchannel) interface doesn't allowed to use more than 1500 bytes MTU size. The problem caused by bug in ng_fec.c They use ether_ioctl to process SIOCSIFMTU ioctl call. The patch allows to change MTU size according (and in sync) with bundled interfaces' capabilities. >How-To-Repeat: ifconfig fec0 mtu 1501 >Fix: multiped:~$ cat ng_fec.c.patch --- ng_fec.c.orig Mon Aug 29 20:31:51 2005 +++ ng_fec.c Wed Apr 5 20:36:18 2006 @@ -697,9 +697,29 @@ ng_fec_ioctl(struct ifnet *ifp, u_long c /* These two are mostly handled at a higher layer */ case SIOCSIFADDR: case SIOCGIFADDR: - case SIOCSIFMTU: error = ether_ioctl(ifp, command, data); break; + case SIOCSIFMTU: + if ( (ifr->ifr_mtu < NG_FEC_MTU_MIN ) || (ifr->ifr_mtu > NG_FEC_MTU_MAX) ) { + error = EINVAL; + } else { + struct ng_fec_portlist *p; + struct ifnet *bifp; + TAILQ_FOREACH(p, &b->ng_fec_ports, fec_list) { + bifp = p->fec_if; + if ((bifp->if_ioctl)(bifp, SIOCSIFMTU, data)) { + error = EINVAL; + break; + } + + } + if (!error) { + ifp->if_mtu = ifr->ifr_mtu; + ng_fec_init(priv); + } + } + break; + /* Set flags */ case SIOCSIFFLAGS: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604061520.k36FKClq028091>