From owner-freebsd-net@FreeBSD.ORG Tue Jun 2 04:58:17 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BD81106564A for ; Tue, 2 Jun 2009 04:58:17 +0000 (UTC) (envelope-from cmb@pfsense.org) Received: from mail.pfsense.org (mail.pfsense.org [69.64.6.29]) by mx1.freebsd.org (Postfix) with ESMTP id DFB6E8FC1B for ; Tue, 2 Jun 2009 04:58:16 +0000 (UTC) (envelope-from cmb@pfsense.org) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.pfsense.org (Postfix) with ESMTP id 307012363E for ; Mon, 1 Jun 2009 23:58:16 -0500 (EST) X-Virus-Scanned: amavisd-new at mail.pfsense.org Received: from mail.pfsense.org ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hYtCipq8qVjQ for ; Mon, 1 Jun 2009 23:58:15 -0500 (EST) Received: from [10.0.64.15] (96-28-38-25.dhcp.insightbb.com [96.28.38.25]) by mail.pfsense.org (Postfix) with ESMTP id 130B123D58 for ; Mon, 1 Jun 2009 23:58:15 -0500 (EST) Message-ID: <4A24B166.7020000@pfsense.org> Date: Tue, 02 Jun 2009 00:58:14 -0400 From: Chris Buechler User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <4A249A57.1070900@pfsense.org> In-Reply-To: <4A249A57.1070900@pfsense.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ath(4) randomly changes MTU to 2290 after explicitly set to 1500 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2009 04:58:17 -0000 Chris Buechler wrote: > In FreeBSD 7.1 using this patch: > http://people.freebsd.org/~sam/ath_hal-releng7.patch > > and 7.2 with stock ath(4) (the above does not cleanly apply to 7.2), > there are numerous pfsense users seeing problems with ath when > bridging. This did not occur in 7.0. Upon investigation of a few > systems, though we explicitly configure the interface with MTU 1500 > twice (once when bringing up the ath interface, and again when setting > up the bridge interface), somehow it ends up switching MTU to 2290 > when we never configure it as such. This breaks bridging to an > Ethernet interface because if_bridge requires the MTU to be the same > on both interfaces. > > None of the commands we're running to setup ath or the bridge will > replicate it, no matter what I do to the interface it stays to 1500 > unless it sits there for a while ("a while" might be hours or days). > There isn't anything that runs in the background to touch interfaces, > a completely idle untouched box will change its configuration. It is > setup fine and works initially, but given time, it'll switch to 2290 > and stop working. > > example bridge setup commands: > > /sbin/ifconfig bridge0 destroy > /sbin/ifconfig bridge0 create > /sbin/ifconfig ath0 mtu 1500 > /sbin/ifconfig vr1 mtu 1500 > /sbin/ifconfig ath0 up > /sbin/ifconfig vr1 up > /sbin/ifconfig bridge0 addm ath0 addm vr1 up > > example ath setup commands: > > /sbin/ifconfig ath0 down > /sbin/ifconfig ath0 mode '11g' > /sbin/ifconfig ath0 channel any > /sbin/ifconfig ath0 -mediaopt turbo > /sbin/ifconfig ath0 ssid 'cmb' > /sbin/ifconfig ath0 -hidessid > /sbin/ifconfig ath0 -mediaopt adhoc > /sbin/ifconfig ath0 protmode 'off' > /sbin/ifconfig ath0 -pureg > /sbin/ifconfig ath0 apbridge > /sbin/ifconfig ath0 -wme > /sbin/ifconfig ath0 authmode open wepmode off > /sbin/ifconfig ath0 txpower '99' > /sbin/ifconfig ath0 mediaopt hostap > /sbin/ifconfig ath0 mtu 1500 > /sbin/ifconfig ath0 up > /usr/sbin/hostapd -B /var/etc/hostapd_ath0.conf > > $ dmesg|grep ath > ath0: mem 0xe00c0000-0xe00cffff irq 9 at device 12.0 on > pci0 > ath0: [ITHREAD] > ath0: WARNING: using obsoleted if_watchdog interface > ath0: Ethernet address: 00:0b:6b:84:3d:7c > ath0: mac 5.9 phy 4.3 radio 3.6 > ath0: promiscuous mode enabled > > another that can replicate it is: > ath0: mem 0x80000000-0x8000ffff irq 12 at device 13.0 > on pci0 > > $ sysctl -a hw.ath > hw.ath.txbuf: 200 > hw.ath.rxbuf: 40 > hw.ath.regdomain: 0 > hw.ath.countrycode: 0 > hw.ath.xchanmode: 1 > hw.ath.outdoor: 1 > hw.ath.calibrate: 30 > hw.ath.hal.swba_backoff: 0 > hw.ath.hal.sw_brt: 10 > hw.ath.hal.dma_brt: 2 A little more related info on two additional boxes I now have access to with similar problems. In this case, every time hostapd is started it sets the MTU to 2290. I'm not sure if hostapd is the only thing causing difficulties, as these two behave differently from the others where initially MTU is 1500 and it changes on its own at some point. I see no mention of MTU in hostapd.conf(5). The hostapd.conf being used follows: interface=ath0 driver=bsd logger_syslog=-1 logger_syslog_level=0 logger_stdout=-1 logger_stdout_level=0 dump_file=/tmp/hostapd_ath0.dump ctrl_interface=/var/run/hostapd ctrl_interface_group=wheel ssid=fw2 debug= auth_algs=1 wpa=2 wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP wpa_group_rekey=60 wpa_gmk_rekey=3600 wpa_strict_rekey= wpa_passphrase=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ieee8021x=