From owner-freebsd-net@FreeBSD.ORG Sun Dec 5 01:15:07 2010 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 C0FE61065673 for ; Sun, 5 Dec 2010 01:15:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4778FC1A for ; Sun, 5 Dec 2010 01:15:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 55F1A41C70C; Sun, 5 Dec 2010 02:15:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id X00nIvGhlwQa; Sun, 5 Dec 2010 02:15:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id E9C0941C705; Sun, 5 Dec 2010 02:15:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 8FDBE4448F3; Sun, 5 Dec 2010 01:10:58 +0000 (UTC) Date: Sun, 5 Dec 2010 01:10:58 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: rozhuk.im@gmail.com In-Reply-To: <4cfab87d.8a1ce30a.0d50.ffffa507@mx.google.com> Message-ID: <20101205010959.P6126@maildrop.int.zabbadoz.net> References: <4cfab87d.8a1ce30a.0d50.ffffa507@mx.google.com> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org Subject: Re: ip_fastfwd - statistic 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: Sun, 05 Dec 2010 01:15:07 -0000 On Sun, 5 Dec 2010, rozhuk.im@gmail.com wrote: Hi, > More correct statistic update in ip_fastfwd > ip_input not affected > > Please, add patch to source. Committed with r216192: http://svn.freebsd.org/changeset/base/216192 /bz -- Bjoern A. Zeeb Welcome a new stage of life. Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html From owner-freebsd-net@FreeBSD.ORG Sun Dec 5 05:39:47 2010 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 872F2106566C for ; Sun, 5 Dec 2010 05:39:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 182008FC14 for ; Sun, 5 Dec 2010 05:39:46 +0000 (UTC) Received: by wyf19 with SMTP id 19so11057606wyf.13 for ; Sat, 04 Dec 2010 21:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=QtCMpnkPqK9xz+1+RyvxVRrGXtqDvuQiWEyL/IEMxHA=; b=SdVthWKnJs1ZJsIPf6mbCq2gJMsdlctumYKtqdxf6QFhy4UUReopeFju4YRlhRAP67 9NVKKyAggiHW+BGQlVTyhDlqkGf2SRhdNauJF1N6tX45bM6GslY4sVuTnK5YLGbrNTjS NtedTVT8mclWsXyS6af0/QYYPNRk7Iw0NGyuw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=IYnKUaKGTvaes/+NbvZgX5KfI2lgOH4JSZrPr8arD5J+QMjuMWRGAseUNYy18NzMvF Mm3X3GgQdp9U4fpHOQF7sToh74F497NUSz8ikX49Ax7m3vNiFSplNAAMfFDArpmLN1V+ WvRLjvBlpaGM6NtiGaSzpXlFhR2TAZY422Npg= MIME-Version: 1.0 Received: by 10.216.142.131 with SMTP id i3mr1180684wej.5.1291527585866; Sat, 04 Dec 2010 21:39:45 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.65.210 with HTTP; Sat, 4 Dec 2010 21:39:45 -0800 (PST) In-Reply-To: References: <201012021530.oB2FUEh1034901@freefall.freebsd.org> Date: Sun, 5 Dec 2010 13:39:45 +0800 X-Google-Sender-Auth: u7v_2XZCirTs4M8xIliSAoOamVQ Message-ID: From: Adrian Chadd To: =?KOI8-R?B?6M/S1dbJyiDzxdLHxcog4NLYxdfJ3g==?= Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org Subject: Re: kern/124753: [ieee80211] net80211 discards power-save queue packets early 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: Sun, 05 Dec 2010 05:39:47 -0000 I've done a bit of digging with this in private, would you (and others having this problem) please re-test with this patch: [adrian@pcbsd-3114]/data/freebsd/git/adrianchadd-freebsd/sys/net80211(48)% git diff . diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_power.c index aad82ba..a9d8eff 100644 --- a/sys/net80211/ieee80211_power.c +++ b/sys/net80211/ieee80211_power.c @@ -393,7 +393,7 @@ ieee80211_pwrsave(struct ieee80211_node *ni, struct mbuf *m) IEEE80211_PSQ_UNLOCK(psq); IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, - "save frame with age %d, %u now queued", age, qlen); + "save frame with age %d, %u now queued (intval=%d, bintval=%d)", age, qlen, ni->ni_intval, ic->ic_bintval); if (qlen == 1 && vap->iv_set_tim != NULL) vap->iv_set_tim(ni, 1); I'd like to see exactly what's going on there; age=0 looks very wrong. Adrian From owner-freebsd-net@FreeBSD.ORG Sun Dec 5 06:32:48 2010 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 582881065670 for ; Sun, 5 Dec 2010 06:32:48 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id DC6C08FC1C for ; Sun, 5 Dec 2010 06:32:47 +0000 (UTC) Received: by wwf26 with SMTP id 26so6716948wwf.31 for ; Sat, 04 Dec 2010 22:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=hW4G3U4sgFL2tbG0soLtXFpMmEuxZ8jhoH6Ie+gGEOk=; b=U9/Mmb/Q3GPhM+yYzWl+c1uWPV7Vk97MXaTBQhKjNMFBzBG2GkgEMrbGvwZXkx0RfR TJAb9VIUe1C4lYfsYKG3lPZHI62wl6LC6YtW1VRoiGQ6j77XqUnVDGVv5oP7lR9v3u4x TL+8KjchW4+kJdl/n0GktbDfX/3Wzg/Le8eBQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=lNQmdhcrJl0kIBI3cWSZNOv/SJw8FpdloVnZ9Rrxwl2k/VHwgnRFdQyE5JgLWqNalV oNHbznAosXYqFo+EbnFc8k1cSkd0eKOVOt+pe2Xvgj8Kcidhvnwrb2erETyy6UV3Tkz+ 8QGAvI1ZAi+JBiSDafAjfXfN2OUsGd8hjjCj4= MIME-Version: 1.0 Received: by 10.216.191.210 with SMTP id g60mr3614762wen.5.1291530766844; Sat, 04 Dec 2010 22:32:46 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.65.210 with HTTP; Sat, 4 Dec 2010 22:32:46 -0800 (PST) In-Reply-To: References: <201012021530.oB2FUEh1034901@freefall.freebsd.org> Date: Sun, 5 Dec 2010 14:32:46 +0800 X-Google-Sender-Auth: ojhfpIwxpcBqDYatPRl75Qp8f8c Message-ID: From: Adrian Chadd To: =?KOI8-R?B?6M/S1dbJyiDzxdLHxcog4NLYxdfJ3g==?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: kern/124753: [ieee80211] net80211 discards power-save queue packets early 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: Sun, 05 Dec 2010 06:32:48 -0000 Right, the problem here is: * the listen interval advertised by the device is "1". The math here is: age =3D IEEE80211_TU_TO_MS((ni->ni_intval * ic->ic_bintval) << 2) /= 1000; * the default beacon interval is 100 TU's. * (1 * 100) << 2 =3D=3D 400 TU's * It then is converted up to milliseconds - * 1024 / 1000, so just for arguments sake say "400" * then that's divided by 1000 to get age in seconds - which results in 0 * thus the packets are immediately discarded in the next call to ieee80211_node_psq_age() Does this always happen? From what I can tell, the code path to actually calling ieee80211_node_psq_age() goes via the callout ieee80211_node_timeout(), which is called every IEEE80211_INACT_WAIT seconds (15). Unless something else is calling ieee80211_node_timeout() more frequently. Can you add some debugging into ieee80211_node_timeout() and find out how often it's actually being called? If the above is actually happening, it should only be being called every 15 seconds and thus the chances of it occuring just as you have some age=3D0 frames on the ps queue should be pretty low. I think it's worthwhile fixing what "age" is, but I guess that'll have to come later. Thanks, Adrian 2010/12/5 Adrian Chadd : > I've done a bit of digging with this in private, would you (and others > having this problem) please re-test with this patch: > > [adrian@pcbsd-3114]/data/freebsd/git/adrianchadd-freebsd/sys/net80211(48)= % > git diff . > diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_powe= r.c > index aad82ba..a9d8eff 100644 > --- a/sys/net80211/ieee80211_power.c > +++ b/sys/net80211/ieee80211_power.c > @@ -393,7 +393,7 @@ ieee80211_pwrsave(struct ieee80211_node *ni, struct m= buf *m) > =A0 =A0 =A0 =A0IEEE80211_PSQ_UNLOCK(psq); > > =A0 =A0 =A0 =A0IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, > - =A0 =A0 =A0 =A0 =A0 "save frame with age %d, %u now queued", age, qlen)= ; > + =A0 =A0 =A0 =A0 =A0 "save frame with age %d, %u now queued (intval=3D%d= , > bintval=3D%d)", age, qlen, ni->ni_intval, ic->ic_bintval); > > =A0 =A0 =A0 =A0if (qlen =3D=3D 1 && vap->iv_set_tim !=3D NULL) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0vap->iv_set_tim(ni, 1); > > I'd like to see exactly what's going on there; age=3D0 looks very wrong. > > > > Adrian > From owner-freebsd-net@FreeBSD.ORG Sun Dec 5 13:20:10 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 254EC106564A for ; Sun, 5 Dec 2010 13:20:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EE3D08FC08 for ; Sun, 5 Dec 2010 13:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB5DK9fh036343 for ; Sun, 5 Dec 2010 13:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB5DK90N036342; Sun, 5 Dec 2010 13:20:09 GMT (envelope-from gnats) Date: Sun, 5 Dec 2010 13:20:09 GMT Message-Id: <201012051320.oB5DK90N036342@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: amd64/145654: amd64-curent memory leak in kernel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2010 13:20:10 -0000 The following reply was made to PR amd64/145654; it has been noted by GNATS. From: Andriy Gapon To: bug-followup@freebsd.org, samspeed@mail.ru Cc: Subject: Re: amd64/145654: amd64-curent memory leak in kernel Date: Sun, 05 Dec 2010 15:14:32 +0200 Is still reproducible? How much RAM do you have? What panic message is printed when this happens? This could be a KVA exhaustion or fragmentation issue related to ZFS. -- Andriy Gapon From owner-freebsd-net@FreeBSD.ORG Sun Dec 5 14:10:16 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7A4D10656E0 for ; Sun, 5 Dec 2010 14:10:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7B3578FC12 for ; Sun, 5 Dec 2010 14:10:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB5EAGP4091577 for ; Sun, 5 Dec 2010 14:10:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB5EAGQD091570; Sun, 5 Dec 2010 14:10:16 GMT (envelope-from gnats) Date: Sun, 5 Dec 2010 14:10:16 GMT Message-Id: <201012051410.oB5EAGQD091570@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: amd64/138688: [rum] possibly broken on 8 Beta 4 amd64: able to wpa authenticate + obtain dhclient address, no communication though. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2010 14:10:16 -0000 The following reply was made to PR amd64/138688; it has been noted by GNATS. From: Andriy Gapon To: bug-followup@freebsd.org, micahroark@gmail.com Cc: Subject: Re: amd64/138688: [rum] possibly broken on 8 Beta 4 amd64: able to wpa authenticate + obtain dhclient address, no communication though. Date: Sun, 05 Dec 2010 16:02:09 +0200 Is this still a problem? If yes, please try discussing it on net@ mailing list. -- Andriy Gapon From owner-freebsd-net@FreeBSD.ORG Sun Dec 5 18:06:05 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF34B1065670; Sun, 5 Dec 2010 18:06:05 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 85A828FC08; Sun, 5 Dec 2010 18:06:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB5I65Aa059350; Sun, 5 Dec 2010 18:06:05 GMT (envelope-from gavin@freefall.freebsd.org) Received: (from gavin@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB5I64Y1059344; Sun, 5 Dec 2010 18:06:04 GMT (envelope-from gavin) Date: Sun, 5 Dec 2010 18:06:04 GMT Message-Id: <201012051806.oB5I64Y1059344@freefall.freebsd.org> To: vince@unsane.co.uk, gavin@FreeBSD.org, freebsd-net@FreeBSD.org From: gavin@FreeBSD.org Cc: Subject: Re: kern/146517: [ath] [wlan] device timeouts for ath wlan device on recent stable. 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: Sun, 05 Dec 2010 18:06:05 -0000 Synopsis: [ath] [wlan] device timeouts for ath wlan device on recent stable. State-Changed-From-To: open->closed State-Changed-By: gavin State-Changed-When: Sun Dec 5 18:03:54 UTC 2010 State-Changed-Why: This was fixed in r209541/r209548 and was merged before 8.1 was released. http://www.freebsd.org/cgi/query-pr.cgi?pr=146517 From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 03:48:04 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B71E106566B; Mon, 6 Dec 2010 03:48:04 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E4F138FC0C; Mon, 6 Dec 2010 03:48:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB63m3vE076886; Mon, 6 Dec 2010 03:48:03 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB63m36u076882; Mon, 6 Dec 2010 03:48:03 GMT (envelope-from linimon) Date: Mon, 6 Dec 2010 03:48:03 GMT Message-Id: <201012060348.oB63m36u076882@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: bin/152716: hostapd(8) fails to authenticate after 2010-11-03 update 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: Mon, 06 Dec 2010 03:48:04 -0000 Old Synopsis: hostapd fails ti authenticate after 2010-11-03 update New Synopsis: hostapd(8) fails to authenticate after 2010-11-03 update Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Mon Dec 6 03:43:30 UTC 2010 Responsible-Changed-Why: Although this was an rpaulo MFC, he is not currently working on this code; so, assign it to -net. http://www.freebsd.org/cgi/query-pr.cgi?pr=152716 From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 06:41:15 2010 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 61F1B10656B2 for ; Mon, 6 Dec 2010 06:41:15 +0000 (UTC) (envelope-from TERRY@tmk.com) Received: from server.tmk.com (server.tmk.com [204.141.35.63]) by mx1.freebsd.org (Postfix) with ESMTP id 3F1F68FC0A for ; Mon, 6 Dec 2010 06:41:15 +0000 (UTC) Received: from tmk.com by tmk.com (PMDF V6.4 #37010) id <01NV2YQ11IR4000SKQ@tmk.com> for freebsd-net@freebsd.org; Mon, 06 Dec 2010 01:17:22 -0500 (EST) Date: Mon, 06 Dec 2010 01:11:48 -0500 (EST) From: Terry Kennedy To: freebsd-net@freebsd.org Message-id: <01NV2YXQ2LAC000SKQ@tmk.com> MIME-version: 1.0 Content-type: TEXT/PLAIN; CHARSET=us-ascii Subject: RE: EHOSTUNREACH returned for refused IPv6 connection 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: Mon, 06 Dec 2010 06:41:15 -0000 > Sorry, you're right: I forgot I don't have my tunnel setup so there's no > external IPv6 connectivity (I don't have an IPv6 network configured at > the moment at all). What confused me initially was the fact that ssh > displays the "No route to host" error instead of "Connection refused" > when both IPv4 and IPv6 addresses are available but only IPv4 works. I'm experiencing something which may be related. I posted a question in the FreeBSD Forums: http://forums.freebsd.org/showthread.php?t=19895 I don't get anything displayed at the application (ftp / telnet / etc.) level - it just hangs until the connection eventually times out. I do see unreachables getting into the FreeBSD box - it just seems like they don't make it down to the application level. The post I linked above has a more detailed description, as well as tcpdump output and so forth. System is 8-STABLE as of November 28th, but I see the same thing on a 6-STABLE from February 2010. Terry Kennedy http://www.tmk.com terry@tmk.com New York, NY USA From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 08:32:57 2010 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 5C7F41065670; Mon, 6 Dec 2010 08:32:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 963DF8FC16; Mon, 6 Dec 2010 08:32:56 +0000 (UTC) Received: by wwe15 with SMTP id 15so3546522wwe.1 for ; Mon, 06 Dec 2010 00:32:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=RvtEm+7LBpUIbwU5B2S9KRoo9hKFnwSyX3AKcNUW1zI=; b=s8IwkyrPRGvrA4e41Z4O/t4+tAwfiIiT3fqtr8x8nKLr3+InW3Ik/xasM9zFL6I6rn 60af7n4oU2JfFIfvrw9DDeSH3kW0ISBY7er5CTZJl8BW6FM68ty9oMftxRUKXDZEbUEA ZXp53NF/WyybgdONsOtwCvww31CUbkXRJMxO0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=K1R1NTKf1Uw26b+hsxTvehnbJxJVcEoVdd/eNQl11WMzocAI/rpfnhntkvzKkDsoll ORuoyUCjC/xn3eeNl1gnqsfsjcqhl20O1AzEA9D43mP1BQmDC7L8/O4Irk4P4JfkK+0H 7FB76oljGXt3msI011IypZHAH4/kbAmJun6Qo= MIME-Version: 1.0 Received: by 10.216.30.65 with SMTP id j43mr4621994wea.20.1291624375410; Mon, 06 Dec 2010 00:32:55 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.65.210 with HTTP; Mon, 6 Dec 2010 00:32:55 -0800 (PST) In-Reply-To: <201012060348.oB63m36u076882@freefall.freebsd.org> References: <201012060348.oB63m36u076882@freefall.freebsd.org> Date: Mon, 6 Dec 2010 16:32:55 +0800 X-Google-Sender-Auth: uSNeOQ97CyGphiFUnBVVxpBQ_s8 Message-ID: From: Adrian Chadd To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/152716: hostapd(8) fails to authenticate after 2010-11-03 update 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: Mon, 06 Dec 2010 08:32:57 -0000 I think either someone (likely Bernard or I - but I'm out of time atm :-) needs to fix the missing bits that Rui has identified need updating, or the whole update needs to be backed out for the time until someone's willing to step up and write the missing glue. Adrian On 6 December 2010 11:48, wrote: > Old Synopsis: hostapd fails ti authenticate after 2010-11-03 update > New Synopsis: hostapd(8) fails to authenticate after 2010-11-03 update > > Responsible-Changed-From-To: freebsd-bugs->freebsd-net > Responsible-Changed-By: linimon > Responsible-Changed-When: Mon Dec 6 03:43:30 UTC 2010 > Responsible-Changed-Why: > Although this was an rpaulo MFC, he is not currently working on this > code; so, assign it to -net. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=152716 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 10:57:48 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA1211065672; Mon, 6 Dec 2010 10:57:48 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8168FC15; Mon, 6 Dec 2010 10:57:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB6AvmnT055084; Mon, 6 Dec 2010 10:57:48 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB6Avmqk055080; Mon, 6 Dec 2010 10:57:48 GMT (envelope-from linimon) Date: Mon, 6 Dec 2010 10:57:48 GMT Message-Id: <201012061057.oB6Avmqk055080@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/152853: [em] tftpd (and likely other udp traffic) fails over em(4) unless rxcsum/txcsum disabled 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: Mon, 06 Dec 2010 10:57:48 -0000 Old Synopsis: tftpd (and likely other udp traffic) fails over em(4) unless rxcsum/txcsum disabled New Synopsis: [em] tftpd (and likely other udp traffic) fails over em(4) unless rxcsum/txcsum disabled Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Mon Dec 6 10:57:32 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=152853 From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 11:07:03 2010 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 73F1B10656E9 for ; Mon, 6 Dec 2010 11:07:03 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 606F28FC0A for ; Mon, 6 Dec 2010 11:07:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB6B73TP068304 for ; Mon, 6 Dec 2010 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB6B72xA068302 for freebsd-net@FreeBSD.org; Mon, 6 Dec 2010 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 6 Dec 2010 11:07:02 GMT Message-Id: <201012061107.oB6B72xA068302@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-net@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-net@FreeBSD.org 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: Mon, 06 Dec 2010 11:07:03 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/152853 net [em] tftpd (and likely other udp traffic) fails over e o bin/152716 net hostapd(8) fails to authenticate after 2010-11-03 upda o kern/152569 net [net]: Multiple ppp connections and routing table prob o kern/152411 net [re] network card works only on 1000M o kern/152360 net [dummynet] [panic] Crash related to dummynet. o kern/152235 net [arp] Permanent local ARP entries are not properly upd o kern/152141 net [vlan] encapsulate vlan in ng_ether before output to i o kern/151690 net network connectivity won't work until dhclient is run o kern/151681 net [nfs] NFS mount via IPv6 leads to hang on client with o kern/151593 net [igb] [panic] Kernel panic when bringing up igb networ o kern/150920 net [ixgbe][igb] Panic when packets are dropped with heade o bin/150642 net netstat(1) doesn't print anything for SCTP sockets o kern/150557 net [igb] igb0: Watchdog timeout -- resetting o kern/150251 net [patch] [ixgbe] Late cable insertion broken o kern/150249 net [ixgbe] Media type detection broken o kern/150247 net [patch] [ixgbe] Version in -current won't build on 7.x o bin/150224 net ppp(8) does not reassign static IP after kill -KILL co o kern/150052 net [wi] wi(4) driver does not work with wlan(4) driver fo f kern/149969 net [wlan] [ral] ralink rt2661 fails to maintain connectio o kern/149937 net [ipfilter] [patch] kernel panic in ipfilter IP fragmen o kern/149786 net [bwn] bwn on Dell Inspiron 1150: connections stall o kern/149643 net [rum] device not sending proper beacon frames in ap mo o kern/149609 net [panic] reboot after adding second default route o kern/149539 net [ath] atheros ar9287 is not supported by ath_hal o kern/149516 net [ath] ath(4) hostap with fake MAC/BSSID results in sta o kern/149373 net [realtek/atheros]: None of my network card working o kern/149307 net [ath] Doesn't work Atheros 9285 o kern/149306 net [alc] Doesn't work Atheros AR8131 PCIe Gigabit Etherne o kern/149117 net [inet] [patch] in_pcbbind: redundant test o kern/149086 net [multicast] Generic multicast join failure in 8.1 o kern/148322 net [ath] Triggering atheros wifi beacon misses in hostap o kern/148317 net [ath] FreeBSD 7.x hostap memory leak in net80211 or At o kern/148078 net [ath] wireless networking stops functioning o kern/147894 net [ipsec] IPv6-in-IPv4 does not work inside an ESP-only o kern/147862 net [wpi] Possible bug in the wpi driver. Network Manager o kern/147155 net [ip6] setfb not work with ipv6 o kern/146845 net [libc] close(2) returns error 54 (connection reset by o kern/146792 net [flowtable] flowcleaner 100% cpu's core load o kern/146759 net [cxgb] [patch] cxgb panic calling cxgb_set_lro() witho o kern/146719 net [pf] [panic] PF or dumynet kernel panic o kern/146534 net [icmp6] wrong source address in echo reply o kern/146427 net [mwl] Additional virtual access points don't work on m o kern/146426 net [mwl] 802.11n rates not possible on mwl o kern/146425 net [mwl] mwl dropping all packets during and after high u f kern/146394 net [vlan] IP source address for outgoing connections o bin/146377 net [ppp] [tun] Interface doesn't clear addresses when PPP o kern/146358 net [vlan] wrong destination MAC address o kern/146165 net [wlan] [panic] Setting bssid in adhoc mode causes pani o kern/146082 net [ng_l2tp] a false invaliant check was performed in ng_ o kern/146037 net [panic] mpd + CoA = kernel panic o bin/145934 net [patch] add count option to netstat(1) o kern/145826 net [ath] Unable to configure adhoc mode on ath0/wlan0 o kern/145825 net [panic] panic: soabort: so_count o kern/145777 net [wpi] Intel 3945ABG driver breaks the connection after o kern/145728 net [lagg] Stops working lagg between two servers. o amd64/145654 net amd64-curent memory leak in kernel o kern/144987 net [wpi] [panic] injecting packets with wlaninject using o kern/144882 net MacBookPro =>4.1 does not connect to BSD in hostap wit o kern/144874 net [if_bridge] [patch] if_bridge frees mbuf after pfil ho o conf/144700 net [rc.d] async dhclient breaks stuff for too many people o kern/144642 net [rum] [panic] Enabling rum interface causes panic o kern/144616 net [nat] [panic] ip_nat panic FreeBSD 7.2 o kern/144572 net [carp] CARP preemption mode traffic partially goes to f kern/144315 net [ipfw] [panic] freebsd 8-stable reboot after add ipfw o kern/143939 net [ipfw] [em] ipfw nat and em interface rxcsum problem o kern/143874 net [wpi] Wireless 3945ABG error. wpi0 could not allocate o kern/143868 net [ath] [patch] [request] allow Atheros watchdog timeout o kern/143846 net [gif] bringing gif3 tunnel down causes gif0 tunnel to s kern/143673 net [stf] [request] there should be a way to support multi s kern/143666 net [ip6] [request] PMTU black hole detection not implemen o kern/143622 net [pfil] [patch] unlock pfil lock while calling firewall o kern/143595 net [wpi] [panic] Creating virtual interface over wpi0 in o kern/143593 net [ipsec] When using IPSec, tcpdump doesn't show outgoin o kern/143591 net [ral] RT2561C-based DLink card (DWL-510) fails to work o kern/143208 net [ipsec] [gif] IPSec over gif interface not working o conf/143079 net hostapd(8) startup missing multi wlan functionality o kern/143074 net [wi]: wi driver triggers panic o kern/143034 net [panic] system reboots itself in tcp code [regression] o kern/142907 net [wpi] if_wpi unstable on ibm/lenovo x60 -- suspect fir o kern/142877 net [hang] network-related repeatable 8.0-STABLE hard hang o kern/142774 net Problem with outgoing connections on interface with mu o kern/142772 net [libc] lla_lookup: new lle malloc failed o kern/142018 net [iwi] [patch] Possibly wrong interpretation of beacon- o kern/141861 net [wi] data garbled with WEP and wi(4) with Prism 2.5 f kern/141741 net Etherlink III NIC won't work after upgrade to FBSD 8, o kern/141023 net [carp] CARP arp replays with wrong src mac o kern/140796 net [ath] [panic] privileged instruction fault o kern/140742 net rum(4) Two asus-WL167G adapters cannot talk to each ot o kern/140682 net [netgraph] [panic] random panic in netgraph o kern/140634 net [vlan] destroying if_lagg interface with if_vlan membe o kern/140619 net [ifnet] [patch] refine obsolete if_var.h comments desc o kern/140564 net [wpi] Problem with Intel(R) PRO/Wireless 3945ABG o kern/140346 net [wlan] High bandwidth use causes loss of wlan connecti o kern/140245 net [ath] [panic] Kernel panic during network activity on o kern/140142 net [ip6] [panic] FreeBSD 7.2-amd64 panic w/IPv6 o kern/140066 net [bwi] install report for 8.0 RC 2 (multiple problems) o kern/139565 net [ipfilter] ipfilter ioctl SIOCDELST broken o kern/139387 net [ipsec] Wrong lenth of PF_KEY messages in promiscuous o bin/139346 net [patch] arp(8) add option to remove static entries lis o kern/139268 net [if_bridge] [patch] allow if_bridge to forward just VL o kern/139204 net [arp] DHCP server replies rejected, ARP entry lost bef o kern/139117 net [lagg] + wlan boot timing (EBUSY) o kern/139079 net [wpi] Failure to attach wpi(4) o kern/139058 net [ipfilter] mbuf cluster leak on FreeBSD 7.2 o kern/138850 net [dummynet] dummynet doesn't work correctly on a bridge o kern/138782 net [panic] sbflush_internal: cc 0 || mb 0xffffff004127b00 o kern/138739 net [wpi] wpi(4) does not work very well under 8.0-BETA4 o amd64/138688 net [rum] possibly broken on 8 Beta 4 amd64: able to wpa a o kern/138678 net [lo] FreeBSD does not assign linklocal address to loop o kern/138620 net [lagg] [patch] lagg port bpf-writes blocked o kern/138427 net [wpi] [panic] Kernel panic after trying set monitor wl o kern/138407 net [gre] gre(4) interface does not come up after reboot o kern/138332 net [tun] [lor] ifconfig tun0 destroy causes LOR if_adata/ o kern/138266 net [panic] kernel panic when udp benchmark test used as r o kern/138177 net [ipfilter] FreeBSD crashing repeatedly in ip_nat.c:257 o kern/137881 net [netgraph] [panic] ng_pppoe fatal trap 12 o bin/137841 net [patch] wpa_supplicant(8) cannot verify SHA256 signed p kern/137776 net [rum] panic in rum(4) driver on 8.0-BETA2 o kern/137775 net [netgraph] [patch] Add XMIT_FAILOVER to ng_one2many o bin/137641 net ifconfig(8): various problems with "vlan_device.vlan_i o kern/137592 net [ath] panic - 7-STABLE (Aug 7, 2009 UTC) crashes on ne o bin/137484 net [patch] Integer overflow in wpa_supplicant(8) base64 e o kern/137392 net [ip] [panic] crash in ip_nat.c line 2577 o kern/137372 net [ral] FreeBSD doesn't support wireless interface from o kern/137089 net [lagg] lagg falsely triggers IPv6 duplicate address de o bin/136994 net [patch] ifconfig(8) print carp mac address o kern/136943 net [wpi] [lor] wpi0_com_lock / wpi0 o kern/136911 net [netgraph] [panic] system panic on kldload ng_bpf.ko t o kern/136836 net [ath] atheros card stops functioning after about 12 ho o bin/136661 net [patch] ndp(8) ignores -f option o kern/136618 net [pf][stf] panic on cloning interface without unit numb o kern/136426 net [panic] spawning several dhclients in parallel panics o kern/135502 net [periodic] Warning message raised by rtfree function i o kern/134931 net [route] Route messages sent to all socket listeners re o kern/134583 net [hang] Machine with jail freezes after random amount o o kern/134531 net [route] [panic] kernel crash related to routes/zebra o kern/134168 net [ral] ral driver problem on RT2525 2.4GHz transceiver o kern/134157 net [dummynet] dummynet loads cpu for 100% and make a syst o kern/133969 net [dummynet] [panic] Fatal trap 12: page fault while in o kern/133968 net [dummynet] [panic] dummynet kernel panic o kern/133736 net [udp] ip_id not protected ... o kern/133613 net [wpi] [panic] kernel panic in wpi(4) o kern/133595 net [panic] Kernel Panic at pcpu.h:195 o kern/133572 net [ppp] [hang] incoming PPTP connection hangs the system o kern/133490 net [bpf] [panic] 'kmem_map too small' panic on Dell r900 o kern/133235 net [netinet] [patch] Process SIOCDLIFADDR command incorre o kern/133218 net [carp] [hang] use of carp(4) causes system to freeze f kern/133213 net arp and sshd errors on 7.1-PRERELEASE o kern/133060 net [ipsec] [pfsync] [panic] Kernel panic with ipsec + pfs o kern/132889 net [ndis] [panic] NDIS kernel crash on load BCM4321 AGN d o kern/132885 net [wlan] 802.1x broken after SVN rev 189592 o conf/132851 net [patch] rc.conf(5): allow to setfib(1) for service run o kern/132734 net [ifmib] [panic] panic in net/if_mib.c o kern/132722 net [ath] Wifi ath0 associates fine with AP, but DHCP or I o kern/132705 net [libwrap] [patch] libwrap - infinite loop if hosts.all o kern/132672 net [ndis] [panic] ndis with rt2860.sys causes kernel pani o kern/132554 net [ipl] There is no ippool start script/ipfilter magic t o kern/132354 net [nat] Getting some packages to ipnat(8) causes crash o kern/132285 net [carp] alias gives incorrect hash in dmesg o kern/132277 net [crypto] [ipsec] poor performance using cryptodevice f o kern/132107 net [carp] carp(4) advskew setting ignored when carp IP us o kern/131781 net [ndis] ndis keeps dropping the link o kern/131776 net [wi] driver fails to init o kern/131753 net [altq] [panic] kernel panic in hfsc_dequeue o bin/131567 net [socket] [patch] Update for regression/sockets/unix_cm o kern/131549 net ifconfig(8) can't clear 'monitor' mode on the wireless o bin/131365 net route(8): route add changes interpretation of network f kern/130820 net [ndis] wpa_supplicant(8) returns 'no space on device' o kern/130628 net [nfs] NFS / rpc.lockd deadlock on 7.1-R o conf/130555 net [rc.d] [patch] No good way to set ipfilter variables a o kern/130525 net [ndis] [panic] 64 bit ar5008 ndisgen-erated driver cau o kern/130311 net [wlan_xauth] [panic] hostapd restart causing kernel pa o kern/130109 net [ipfw] Can not set fib for packets originated from loc f kern/130059 net [panic] Leaking 50k mbufs/hour f kern/129750 net [ath] Atheros AR5006 exits on "cannot map register spa f kern/129719 net [nfs] [panic] Panic during shutdown, tcp_ctloutput: in o kern/129517 net [ipsec] [panic] double fault / stack overflow o kern/129508 net [carp] [panic] Kernel panic with EtherIP (may be relat o kern/129219 net [ppp] Kernel panic when using kernel mode ppp o kern/129197 net [panic] 7.0 IP stack related panic o bin/128954 net ifconfig(8) deletes valid routes o kern/128917 net [wpi] [panic] if_wpi and wpa+tkip causing kernel panic o bin/128602 net [an] wpa_supplicant(8) crashes with an(4) o kern/128448 net [nfs] 6.4-RC1 Boot Fails if NFS Hostname cannot be res o conf/128334 net [request] use wpa_cli in the "WPA DHCP" situation o bin/128295 net [patch] ifconfig(8) does not print TOE4 or TOE6 capabi o bin/128001 net wpa_supplicant(8), wlan(4), and wi(4) issues o kern/127826 net [iwi] iwi0 driver has reduced performance and connecti o kern/127815 net [gif] [patch] if_gif does not set vlan attributes from o kern/127724 net [rtalloc] rtfree: 0xc5a8f870 has 1 refs f bin/127719 net [arp] arp: Segmentation fault (core dumped) f kern/127528 net [icmp]: icmp socket receives icmp replies not owned by o bin/127192 net routed(8) removes the secondary alias IP of interface f kern/127145 net [wi]: prism (wi) driver crash at bigger traffic o kern/127102 net [wpi] Intel 3945ABG low throughput o kern/127057 net [udp] Unable to send UDP packet via IPv6 socket to IPv o kern/127050 net [carp] ipv6 does not work on carp interfaces [regressi o kern/126945 net [carp] CARP interface destruction with ifconfig destro o kern/126895 net [patch] [ral] Add antenna selection (marked as TBD) o kern/126874 net [vlan]: Zebra problem if ifconfig vlanX destroy o kern/126714 net [carp] CARP interface renaming makes system no longer o kern/126695 net rtfree messages and network disruption upon use of if_ o kern/126475 net [ath] [panic] ath pcmcia card inevitably panics under o kern/126339 net [ipw] ipw driver drops the connection o kern/126214 net [ath] txpower problem with Atheros wifi card o kern/126075 net [inet] [patch] internet control accesses beyond end of o bin/125922 net [patch] Deadlock in arp(8) o kern/125920 net [arp] Kernel Routing Table loses Ethernet Link status o kern/125845 net [netinet] [patch] tcp_lro_rx() should make use of hard o kern/125816 net [carp] [if_bridge] carp stuck in init when using bridg o kern/125721 net [ath] Terrible throughput/high ping latency with Ubiqu o kern/125617 net [ath] [panic] ath(4) related panic f kern/125502 net [ral] ifconfig ral0 scan produces no output unless in o kern/125501 net [ath] atheros cardbus driver hangs f kern/125442 net [carp] [lagg] CARP combined with LAGG causes system pa f kern/125332 net [ath] [panic] crash under any non-tiny networking unde o kern/125258 net [socket] socket's SO_REUSEADDR option does not work o kern/125239 net [gre] kernel crash when using gre o kern/124767 net [iwi] Wireless connection using iwi0 driver (Intel 220 o kern/124341 net [ral] promiscuous mode for wireless device ral0 looses o kern/124225 net [ndis] [patch] ndis network driver sometimes loses net o kern/124160 net [libc] connect(2) function loops indefinitely o kern/124021 net [ip6] [panic] page fault in nd6_output() o kern/123968 net [rum] [panic] rum driver causes kernel panic with WPA. o kern/123892 net [tap] [patch] No buffer space available o kern/123890 net [ppp] [panic] crash & reboot on work with PPP low-spee o kern/123858 net [stf] [patch] stf not usable behind a NAT o kern/123796 net [ipf] FreeBSD 6.1+VPN+ipnat+ipf: port mapping does not o kern/123758 net [panic] panic while restarting net/freenet6 o bin/123633 net ifconfig(8) doesn't set inet and ether address in one o kern/123559 net [iwi] iwi periodically disassociates/associates [regre o bin/123465 net [ip6] route(8): route add -inet6 -interfac o kern/123463 net [ipsec] [panic] repeatable crash related to ipsec-tool o kern/123429 net [nfe] [hang] "ifconfig nfe up" causes a hard system lo o conf/123330 net [nsswitch.conf] Enabling samba wins in nsswitch.conf c o kern/123256 net [wpi] panic: blockable sleep lock with wpi(4) o kern/123160 net [ip] Panic and reboot at sysctl kern.polling.enable=0 f kern/123045 net [ng_mppc] ng_mppc_decompress - disabling node o kern/122989 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/122954 net [lagg] IPv6 EUI64 incorrectly chosen for lagg devices f kern/122780 net [lagg] tcpdump on lagg interface during high pps wedge o kern/122697 net [ath] Atheros card is not well supported o kern/122685 net It is not visible passing packets in tcpdump(1) o kern/122319 net [wi] imposible to enable ad-hoc demo mode with Orinoco o kern/122290 net [netgraph] [panic] Netgraph related "kmem_map too smal o kern/122033 net [ral] [lor] Lock order reversal in ral0 at bootup ieee o bin/121895 net [patch] rtsol(8)/rtsold(8) doesn't handle managed netw o kern/121872 net [wpi] driver fails to attach on a fujitsu-siemens s711 s kern/121774 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/121555 net [panic] Fatal trap 12: current process = 12 (swi1: net o kern/121443 net [gif] [lor] icmp6_input/nd6_lookup o kern/121437 net [vlan] Routing to layer-2 address does not work on VLA o bin/121359 net [patch] [security] ppp(8): fix local stack overflow in o kern/121257 net [tcp] TSO + natd -> slow outgoing tcp traffic o kern/121181 net [panic] Fatal trap 3: breakpoint instruction fault whi o kern/120966 net [rum] kernel panic with if_rum and WPA encryption p docs/120945 net [patch] ip6(4) man page lacks documentation for TCLASS o kern/120566 net [request]: ifconfig(8) make order of arguments more fr o kern/120304 net [netgraph] [patch] netgraph source assumes 32-bit time o kern/120266 net [udp] [panic] gnugk causes kernel panic when closing U o kern/120130 net [carp] [panic] carp causes kernel panics in any conste o bin/120060 net routed(8) deletes link-level routes in the presence of o kern/119945 net [rum] [panic] rum device in hostap mode, cause kernel o kern/119791 net [nfs] UDP NFS mount of aliased IP addresses from a Sol o kern/119617 net [nfs] nfs error on wpa network when reseting/shutdown f kern/119516 net [ip6] [panic] _mtx_lock_sleep: recursed on non-recursi o kern/119432 net [arp] route add -host -iface causes arp e o kern/119225 net [wi] 7.0-RC1 no carrier with Prism 2.5 wifi card [regr o kern/118727 net [netgraph] [patch] [request] add new ng_pf module s kern/117717 net [panic] Kernel panic with Bittorrent client. o kern/117448 net [carp] 6.2 kernel crash [regression] o kern/117423 net [vlan] Duplicate IP on different interfaces o bin/117339 net [patch] route(8): loading routing management commands o kern/117271 net [tap] OpenVPN TAP uses 99% CPU on releng_6 when if_tap o kern/116747 net [ndis] FreeBSD 7.0-CURRENT crash with Dell TrueMobile o bin/116643 net [patch] [request] fstat(1): add INET/INET6 socket deta o kern/116185 net [iwi] if_iwi driver leads system to reboot o kern/115239 net [ipnat] panic with 'kmem_map too small' using ipnat o kern/115019 net [netgraph] ng_ether upper hook packet flow stops on ad o kern/115002 net [wi] if_wi timeout. failed allocation (busy bit). ifco o kern/114915 net [patch] [pcn] pcn (sys/pci/if_pcn.c) ethernet driver f o kern/113432 net [ucom] WARNING: attempt to net_add_domain(netgraph) af o kern/112722 net [ipsec] [udp] IP v4 udp fragmented packet reject o kern/112686 net [patm] patm driver freezes System (FreeBSD 6.2-p4) i38 o bin/112557 net [patch] ppp(8) lock file should not use symlink name o kern/112528 net [nfs] NFS over TCP under load hangs with "impossible p o kern/111457 net [ral] ral(4) freeze o kern/109470 net [wi] Orinoco Classic Gold PC Card Can't Channel Hop o kern/109308 net [pppd] [panic] Multiple panics kernel ppp suspected [r o bin/108895 net pppd(8): PPPoE dead connections on 6.2 [regression] o kern/107944 net [wi] [patch] Forget to unlock mutex-locks f kern/107279 net [ath] [panic] ath_start: attempted use of a free mbuf! o conf/107035 net [patch] bridge(8): bridge interface given in rc.conf n o kern/106444 net [netgraph] [panic] Kernel Panic on Binding to an ip to o kern/106438 net [ipf] ipfilter: keep state does not seem to allow repl o kern/106316 net [dummynet] dummynet with multipass ipfw drops packets o kern/105945 net Address can disappear from network interface s kern/105943 net Network stack may modify read-only mbuf chain copies o bin/105925 net problems with ifconfig(8) and vlan(4) [regression] f kern/105348 net [ath] ath device stopps TX o kern/104851 net [inet6] [patch] On link routes not configured when usi o kern/104751 net [netgraph] kernel panic, when getting info about my tr o kern/103191 net Unpredictable reboot o kern/103135 net [ipsec] ipsec with ipfw divert (not NAT) encodes a pac o kern/102540 net [netgraph] [patch] supporting vlan(4) by ng_fec(4) o conf/102502 net [netgraph] [patch] ifconfig name does't rename netgrap o kern/102035 net [plip] plip networking disables parallel port printing o kern/101948 net [ipf] [panic] Kernel Panic Trap No 12 Page Fault - cau o kern/100709 net [libc] getaddrinfo(3) should return TTL info o kern/100519 net [netisr] suggestion to fix suboptimal network polling o kern/98978 net [ipf] [patch] ipfilter drops OOW packets under 6.1-Rel o kern/98597 net [inet6] Bug in FreeBSD 6.1 IPv6 link-local DAD procedu o bin/98218 net wpa_supplicant(8) blacklist not working o kern/97306 net [netgraph] NG_L2TP locks after connection with failed o conf/97014 net [gif] gifconfig_gif? in rc.conf does not recognize IPv f kern/96268 net [socket] TCP socket performance drops by 3000% if pack o kern/95519 net [ral] ral0 could not map mbuf o kern/95288 net [pppd] [tty] [panic] if_ppp panic in sys/kern/tty_subr o kern/95277 net [netinet] [patch] IP Encapsulation mask_match() return o kern/95267 net packet drops periodically appear f kern/93886 net [ath] Atheros/D-Link DWL-G650 long delay to associate f kern/93378 net [tcp] Slow data transfer in Postfix and Cyrus IMAP (wo o kern/93019 net [ppp] ppp and tunX problems: no traffic after restarti o kern/92880 net [libc] [patch] almost rewritten inet_network(3) functi s kern/92279 net [dc] Core faults everytime I reboot, possible NIC issu o kern/91859 net [ndis] if_ndis does not work with Asus WL-138 s kern/91777 net [ipf] [patch] wrong behaviour with skip rule inside an o kern/91364 net [ral] [wep] WF-511 RT2500 Card PCI and WEP o kern/91311 net [aue] aue interface hanging s kern/90086 net [hang] 5.4p8 on supermicro P8SCT hangs during boot if o kern/87521 net [ipf] [panic] using ipfilter "auth" keyword leads to k o kern/87421 net [netgraph] [panic]: ng_ether + ng_eiface + if_bridge s kern/86920 net [ndis] ifconfig: SIOCS80211: Invalid argument [regress o kern/86871 net [tcp] [patch] allocation logic for PCBs in TIME_WAIT s o kern/86427 net [lor] Deadlock with FASTIPSEC and nat o kern/86103 net [ipf] Illegal NAT Traversal in IPFilter o kern/85780 net 'panic: bogus refcnt 0' in routing/ipv6 o bin/85445 net ifconfig(8): deprecated keyword to ifconfig inoperativ p kern/85320 net [gre] [patch] possible depletion of kernel stack in ip o bin/82975 net route change does not parse classfull network as given o kern/82881 net [netgraph] [panic] ng_fec(4) causes kernel panic after o bin/82185 net [patch] ndp(8) can delete the incorrect entry o kern/81095 net IPsec connection stops working if associated network i o kern/79895 net [ipf] 5.4-RC2 breaks ipfilter NAT when using netgraph o bin/79228 net [patch] extend arp(8) to be able to create blackhole r o kern/78968 net FreeBSD freezes on mbufs exhaustion (network interface o kern/78090 net [ipf] ipf filtering on bridged packets doesn't work if o kern/77341 net [ip6] problems with IPV6 implementation o kern/77273 net [ipf] ipfilter breaks ipv6 statefull filtering on 5.3 s kern/77195 net [ipf] [patch] ipfilter ioctl SIOCGNATL does not match o kern/75873 net Usability problem with non-RFC-compliant IP spoof prot s kern/75407 net [an] an(4): no carrier after short time a kern/71474 net [route] route lookup does not skip interfaces marked d o kern/71469 net default route to internet magically disappears with mu o kern/70904 net [ipf] ipfilter ipnat problem with h323 proxy support o kern/66225 net [netgraph] [patch] extend ng_eiface(4) control message o kern/65616 net IPSEC can't detunnel GRE packets after real ESP encryp s kern/60293 net [patch] FreeBSD arp poison patch a kern/56233 net IPsec tunnel (ESP) over IPv6: MTU computation is wrong o kern/54383 net [nfs] [patch] NFS root configurations without dynamic s bin/41647 net ifconfig(8) doesn't accept lladdr along with inet addr s kern/39937 net ipstealth issue a kern/38554 net [patch] changing interface ipaddress doesn't seem to w o kern/34665 net [ipf] [hang] ipfilter rcmd proxy "hangs". o kern/31647 net [libc] socket calls can return undocumented EINVAL o kern/30186 net [libc] getaddrinfo(3) does not handle incorrect servna o kern/27474 net [ipf] [ppp] Interactive use of user PPP and ipfilter c o conf/23063 net [arp] [patch] for static ARP tables in rc.network 368 problems total. From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 11:48:43 2010 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 8098B1065672 for ; Mon, 6 Dec 2010 11:48:43 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [62.231.161.221]) by mx1.freebsd.org (Postfix) with ESMTP id C37168FC19 for ; Mon, 6 Dec 2010 11:48:42 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.4/8.14.4) with ESMTP id oB6Bmam8048631; Mon, 6 Dec 2010 17:48:36 +0600 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <4CFCCD94.60100@rdtc.ru> Date: Mon, 06 Dec 2010 17:48:36 +0600 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.1.10) Gecko/20100712 Thunderbird/3.0.5 MIME-Version: 1.0 To: Jack Vogel References: <201011270946271408828@yahoo.com.cn> <20101128081617.GA90332@zibbi.meraka.csir.co.za> <4CF73A2C.7000802@rdtc.ru> <4CF89EE7.8020807@rdtc.ru> <4CF93A77.30804@rdtc.ru> <4CF9470F.4020709@sentex.net> <4CF947D4.10504@rdtc.ru> <4CFA0435.7020100@rdtc.ru> In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: bzeeb-lists@lists.zabbadoz.net, freebsd-net , Jack Vogel , Mike Tancsa Subject: [patch] Bring link down when interface goes down 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: Mon, 06 Dec 2010 11:48:43 -0000 On 04.12.2010 15:08, Jack Vogel wrote: > This isn't some simple 'go change this line or parameter', > there were some problematic issues that my Linux coworkers > faced, I have to go look into it before I even decide... > > so...patience friend. For igb(4) the change seems pretty short. At least, it works for my 82576-based dual-port copper card. --- if_igb.h.orig 2010-12-06 12:27:54.000000000 +0600 +++ if_igb.h 2010-12-06 12:29:47.000000000 +0600 @@ -450,6 +450,8 @@ #endif void *stats; + /* Bring link down when interface goes down */ + int down_disables_link; }; /* ****************************************************************************** --- if_igb.c.orig 2010-11-30 11:14:42.000000000 +0600 +++ if_igb.c 2010-12-06 12:37:10.000000000 +0600 @@ -432,6 +432,13 @@ OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, &igb_enable_aim, 1, "Interrupt Moderation"); + adapter->down_disables_link = 0; + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "down_disables_link", CTLTYPE_INT|CTLFLAG_RW, + &adapter->down_disables_link, adapter->down_disables_link, + "Bring link down when interface goes down"); + callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); /* Determine hardware and mac info */ @@ -2070,6 +2077,13 @@ e1000_led_off(&adapter->hw); e1000_cleanup_led(&adapter->hw); + + if(adapter->down_disables_link) { + e1000_power_down_phy(&adapter->hw); + igb_handle_link(adapter, 0); + /* Reset the phy next time init gets called */ + adapter->hw.phy.reset_disable = FALSE; + } } However, similar patch applied to em(4) does not work for my on-board 82574L-based cards: e1000_power_down_phy() thanslates to e1000_power_down_phy_copper_82571() that does nothing because mac->ops.check_mng_mode(hw) returns true value and, therefore, e1000_power_down_phy_copper(hw) is not even called. Still trying to find a way... Eugene Grosbein From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 03:26:09 2010 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 1CE721065674 for ; Mon, 6 Dec 2010 03:26:09 +0000 (UTC) (envelope-from beezarliu@yahoo.com.cn) Received: from nm25.bullet.mail.ac4.yahoo.com (nm25.bullet.mail.ac4.yahoo.com [98.139.52.222]) by mx1.freebsd.org (Postfix) with SMTP id A01A58FC08 for ; Mon, 6 Dec 2010 03:26:08 +0000 (UTC) Received: from [98.139.52.192] by nm25.bullet.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 03:13:14 -0000 Received: from [74.6.228.34] by tm5.bullet.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 03:13:14 -0000 Received: from [127.0.0.1] by smtp103.mail.ac4.yahoo.com with NNFMP; 06 Dec 2010 03:13:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.cn; s=s1024; t=1291605194; bh=HjwaxPcvynIvzbyviyF5MDT4u4Wg9/UYYwWNf927RbE=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Cc:References:Subject:Message-ID:X-mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=UAiQAgj216tp2kwK8oRNv5Rm6oUKLcavcLXUchbZIsY2JnBuiVj9xbgS8/H3TSBy0d6kJwy4SmCtjwQW+KlpIpyv8kwYuDVJ5hXmzda6THZJgVi+P571GiFhAL2k0UqtO1jxyHBmuKP0kFKYCh7lcwAz1ySPIRFu0Atbf8QKsqc= X-Yahoo-Newman-Id: 61144.82693.bm@smtp103.mail.ac4.yahoo.com Received: from china (beezarliu@180.168.37.66 with login) by smtp103.mail.ac4.yahoo.com with SMTP; 05 Dec 2010 19:13:13 -0800 PST X-Yahoo-SMTP: YP5UPy2swBBHZGZlvbmOrntlD3fotw-- X-YMail-OSG: 4wvM7RwVM1mJEP2pG4sbJ4rPRXAeARNvZ5v3ZUAhBfKaoiX i2ujO07GwhaSr2E.OHQEFoj5fi5UAIrjVVFmmE1MNKVkTOJ1xk3R9ENJP_7Q brT29UGYN4kKgwjH_nfqxpGx2Ilfd9sKr1X7f_n8ro4thXsmMOiKomozs5UG T47af5_Duy9gTnNgC_hnrDmQmO3KyfkMnQx0KZDQk0ey6d8nrBci.tBzjDV6 ZsjXiXJOVbAy_Zu2bo9t_gBYA.fQpH7A9jb3Pr55K4IawDNTEOQ_tS0A- X-Yahoo-Newman-Property: ymail-3 Date: Mon, 6 Dec 2010 11:13:09 +0800 From: "beezarliu" To: "Eugene Grosbein" , "Jack Vogel" References: , , , , <201011270946271408828@yahoo.com.cn>, , , , <20101128081617.GA90332@zibbi.meraka.csir.co.za>, , <4CF73A2C.7000802@rdtc.ru>, <4CF89EE7.8020807@rdtc.ru>, , <4CF93A77.30804@rdtc.ru>, <4CF9470F.4020709@sentex.net>, <4CF947D4.10504@rdtc.ru>, , <4CFA0435.7020100@rdtc.ru>, , <4CFA06BB.6050504@rdtc.ru> Message-ID: <201012061113068287085@yahoo.com.cn> X-mailer: Foxmail 6, 10, 201, 20 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 06 Dec 2010 11:59:32 +0000 Cc: freebsd-net , Mike Tancsa Subject: Re: Re: Problem with igb(4) updated to version 2.0.7 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: Mon, 06 Dec 2010 03:26:09 -0000 +1 On 2010-12-04 17:16:53, Eugene Grosbein wrote: >On 04.12.2010 15:08, Jack Vogel wrote: >> This isn't some simple 'go change this line or parameter', >> there were some problematic issues that my Linux coworkers >> faced, I have to go look into it before I even decide... >> >> so...patience friend. > >I should said it more precise: I will patch the driver myself >and test it. That's sad but I have not much time to wait. >Just asking, what direction should I take in my attempts :-) >_______________________________________________ >freebsd-net@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-net >To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" __________________________________________________ ¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä? http://cn.mail.yahoo.com From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 16:15:07 2010 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 7AC7A1065670 for ; Mon, 6 Dec 2010 16:15:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 06EF68FC13 for ; Mon, 6 Dec 2010 16:15:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 0E1F241C6B4; Mon, 6 Dec 2010 17:15:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id ou4C5xW-Vigb; Mon, 6 Dec 2010 17:15:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 7C71F41C6A3; Mon, 6 Dec 2010 17:15:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 909514448F3; Mon, 6 Dec 2010 16:11:43 +0000 (UTC) Date: Mon, 6 Dec 2010 16:11:43 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Terry Kennedy In-Reply-To: <01NV2YXQ2LAC000SKQ@tmk.com> Message-ID: <20101206160722.O6126@maildrop.int.zabbadoz.net> References: <01NV2YXQ2LAC000SKQ@tmk.com> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org Subject: RE: EHOSTUNREACH returned for refused IPv6 connection 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: Mon, 06 Dec 2010 16:15:07 -0000 On Mon, 6 Dec 2010, Terry Kennedy wrote: Hi, >> Sorry, you're right: I forgot I don't have my tunnel setup so there's no >> external IPv6 connectivity (I don't have an IPv6 network configured at >> the moment at all). What confused me initially was the fact that ssh >> displays the "No route to host" error instead of "Connection refused" >> when both IPv4 and IPv6 addresses are available but only IPv4 works. > > I'm experiencing something which may be related. I posted a question in > the FreeBSD Forums: http://forums.freebsd.org/showthread.php?t=19895 > > I don't get anything displayed at the application (ftp / telnet / etc.) > level - it just hangs until the connection eventually times out. I do see > unreachables getting into the FreeBSD box - it just seems like they don't > make it down to the application level. The post I linked above has a more > detailed description, as well as tcpdump output and so forth. > > System is 8-STABLE as of November 28th, but I see the same thing on a > 6-STABLE from February 2010. What happens if you do: route add -inet6 -host 2001:4f8:0:2::e -prefixlen 128 ::1 -reject route add -inet6 -host 2001:6c8:2:600::132 -prefixlen 128 ::1 -reject and try again with ftp? Which is the test case I did here locally. Obviously I should try on my gateway rather than on the same machine but as you cannot I'd start with this test. /bz -- Bjoern A. Zeeb Welcome a new stage of life. Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 16:20:14 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 110B6106566B for ; Mon, 6 Dec 2010 16:20:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F3C578FC15 for ; Mon, 6 Dec 2010 16:20:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB6GKDFM094153 for ; Mon, 6 Dec 2010 16:20:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB6GKD3r094152; Mon, 6 Dec 2010 16:20:13 GMT (envelope-from gnats) Date: Mon, 6 Dec 2010 16:20:13 GMT Message-Id: <201012061620.oB6GKD3r094152@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: amd64/145654: amd64-curent memory leak in kernel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2010 16:20:14 -0000 The following reply was made to PR amd64/145654; it has been noted by GNATS. From: Andriy Gapon To: Andrey Smagin , bug-followup@freebsd.org Cc: Subject: Re: amd64/145654: amd64-curent memory leak in kernel Date: Mon, 06 Dec 2010 18:16:30 +0200 on 05/12/2010 22:47 Andrey Smagin said the following: >> Is still reproducible? >> How much RAM do you have? What panic message is printed when this happens? >> This could be a KVA exhaustion or fragmentation issue related to ZFS. > > I have 4G of RAM, panic messages about malloc memory for network subsystem. > After opening PR was some commit helped decrease memory usage under heavy > load. I use last night CURRENT right now. Next loader.conf now avoiding this problem: > > vfs.zfs.arc_max="300M" - larger size increase performance but also increase possibility of panic So you can still reproduce the panic with CURRENT? Can you get panic message and stack trace? > vfs.zfs.vdev.cache.size="16M" > vfs.zfs.cache_flush_disable="0" > vfs.zfs.prefetch_disable="0" > > vfs.zfs.zfetch.array_rd_sz="4M" > vfs.zfs.zfetch.block_cap="256" > vfs.zfs.zfetch.min_sec_reap="2" > vfs.zfs.zfetch.max_streams="16" > > vm.kmem_size="4G" > > IMHO gigantic problem is - ZFS use "wired" memory instead "inactive" as UFS. That's the way ZFS is. -- Andriy Gapon From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 17:54:47 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFFA6106566B; Mon, 6 Dec 2010 17:54:47 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C61998FC1E; Mon, 6 Dec 2010 17:54:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB6HslMC095941; Mon, 6 Dec 2010 17:54:47 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB6Hsl4u095937; Mon, 6 Dec 2010 17:54:47 GMT (envelope-from linimon) Date: Mon, 6 Dec 2010 17:54:47 GMT Message-Id: <201012061754.oB6Hsl4u095937@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/152828: [em] poor performance on 8.1, 8.2-PRE 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: Mon, 06 Dec 2010 17:54:48 -0000 Synopsis: [em] poor performance on 8.1, 8.2-PRE Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Mon Dec 6 17:54:38 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=152828 From owner-freebsd-net@FreeBSD.ORG Mon Dec 6 21:43:11 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E6661065696; Mon, 6 Dec 2010 21:43:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 744338FC16; Mon, 6 Dec 2010 21:43:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB6LhBMf033373; Mon, 6 Dec 2010 21:43:11 GMT (envelope-from avg@freefall.freebsd.org) Received: (from avg@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB6LhAVp033369; Mon, 6 Dec 2010 21:43:10 GMT (envelope-from avg) Date: Mon, 6 Dec 2010 21:43:10 GMT Message-Id: <201012062143.oB6LhAVp033369@freefall.freebsd.org> To: samspeed@mail.ru, avg@FreeBSD.org, freebsd-net@FreeBSD.org From: avg@FreeBSD.org Cc: Subject: Re: amd64/145654: amd64-curent memory leak in kernel 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: Mon, 06 Dec 2010 21:43:11 -0000 Synopsis: amd64-curent memory leak in kernel State-Changed-From-To: open->closed State-Changed-By: avg State-Changed-When: Mon Dec 6 21:42:39 UTC 2010 State-Changed-Why: Closing per submitter's request, the issue seems to be resolved. http://www.freebsd.org/cgi/query-pr.cgi?pr=145654 From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 01:45:00 2010 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 EA449106566C for ; Tue, 7 Dec 2010 01:45:00 +0000 (UTC) (envelope-from csalgau-br@bitdefender.com) Received: from mail.bitdefender.com (mail.bitdefender.com [91.199.104.2]) by mx1.freebsd.org (Postfix) with ESMTP id 1C7788FC21 for ; Tue, 7 Dec 2010 01:44:59 +0000 (UTC) Received: (qmail 20502 invoked from network); 7 Dec 2010 03:18:18 +0200 Received: from 79-112-48-000.iasi.fiberlink.ro (HELO CSalgau3.mshome.net) (csalgau@bitdefender.com@79.112.48.0) by mail.bitdefender.com with AES256-SHA encrypted SMTP; 7 Dec 2010 03:18:17 +0200 Date: Tue, 7 Dec 2010 03:18:07 +0200 From: Mihai-Catalin Salgau X-Priority: 3 (Normal) Message-ID: <07255796.20101207031807@bitdefender.com> To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.118621, SQMD Hits: InvalidIPBytes34 97.49.107.105, rbl score: 0(0), bayes score: 500(0), pbayes score: 500(0), neunet score: 0(0), flags: [NN_LEGIT_BITDEFENDER], SQMD: 5a110e331106ea5f798e01419aefaf09.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-Scanner: Clean, Agent: BitDefender qmail 3.1.0 on elfie.dsd.hq, sigver: 7.34942 Subject: vlan limits on e1000? 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, 07 Dec 2010 01:45:01 -0000 Hello Freebsd-net, I have two dual port NICs, one Broadcom(bce0,bce1) and one Intel(em0,em1), on FreeBSD 8-stable (about two weeks old) with a DHCP server running. I've been successfully using a large number of vlans over bce1,em0 and em1 with iSCSI, but wanted to switch to AoE(ata over ethernet). I've set vlandevs by round-robin, and got vlan1 on bce0, vlan2 on em0, vlan3 on em1, vlan4 on bce0....vlan12 on em1. I've binded net/vblade instances to each interface, but the problem I'm facing now is that while vlans 1-10 are working properly, vlans 11 and 12 won't see any traffic unless the interface is in promiscuous mode. I noticed that while trying to attach tcpdump and saw the thing instantly work. I've had no problems with iSCSI over the same setup, and dhcp packets are getting trough properly. I've moved those last two vlans to bce0 and they work ok, but I'm a bit locked on why this is happening. Are there any known limitations on vlans on e1000? From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 14:39:59 2010 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 3F1DF106564A for ; Tue, 7 Dec 2010 14:39:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 161B28FC1B for ; Tue, 7 Dec 2010 14:39:59 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C3D7046B38; Tue, 7 Dec 2010 09:39:58 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D0FBB8A009; Tue, 7 Dec 2010 09:39:57 -0500 (EST) From: John Baldwin To: freebsd-net@freebsd.org Date: Tue, 7 Dec 2010 09:33:13 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <07255796.20101207031807@bitdefender.com> In-Reply-To: <07255796.20101207031807@bitdefender.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012070933.13710.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 07 Dec 2010 09:39:57 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Mihai-Catalin Salgau Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 14:39:59 -0000 On Monday, December 06, 2010 8:18:07 pm Mihai-Catalin Salgau wrote: > Hello Freebsd-net, > > I have two dual port NICs, one Broadcom(bce0,bce1) and one Intel(em0,em1), on FreeBSD 8-stable > (about two weeks old) with a DHCP server running. > I've been successfully using a large number of vlans over bce1,em0 and em1 with iSCSI, > but wanted to switch to AoE(ata over ethernet). I've set vlandevs by round-robin, and got > vlan1 on bce0, vlan2 on em0, vlan3 on em1, vlan4 on bce0....vlan12 on em1. I've binded > net/vblade instances to each interface, but the problem I'm facing now is that while > vlans 1-10 are working properly, vlans 11 and 12 won't see any traffic unless the interface is > in promiscuous mode. I noticed that while trying to attach tcpdump and saw the thing instantly work. > I've had no problems with iSCSI over the same setup, and dhcp packets are getting trough properly. > I've moved those last two vlans to bce0 and they work ok, but I'm a bit locked on why this is happening. > Are there any known limitations on vlans on e1000? Are you using the 'vlanhwfilter' feature? -- John Baldwin From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 17:46:35 2010 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 5FA2D106566C; Tue, 7 Dec 2010 17:46:35 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id E98908FC0A; Tue, 7 Dec 2010 17:46:34 +0000 (UTC) Received: by ywp6 with SMTP id 6so148323ywp.13 for ; Tue, 07 Dec 2010 09:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=w0lbyBQoKku/7XeUaqXXog0XzZJF19nJb1DSeHTva2Y=; b=j3tS7Erx1GJQBZlsRQam+AmD7Y4PWEtjT8ImQ0UnIqKfqzw1Mhtv0fsSer9tuhQRf9 gAv/NN7ZAzfI/rhScBFBEIa6y4Xab60ryzdzv3/R+Ag666u9ED6Lo9UL49TkWTqEYkAD 0o2LkZ8dYIxsD7MaUSS1/82WZMHZ18iH8HatI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=f+s0Y3IwNihqPaYRj9eC3pBRvaNCs5gSeHgj72ozpGWwPGk7CjbHe5GwQ+nVl5AmTh aFNW7AgR12IGCnkv+8VT/Hft2qP7J4Yb+py5gSv7t/7YfPSpfpfdpqm+mgNyejgxlnAq ElvkMkIkGBSdK6t97hnGw3leYLTLCKTToYquE= MIME-Version: 1.0 Received: by 10.151.47.17 with SMTP id z17mr2345468ybj.43.1291743993020; Tue, 07 Dec 2010 09:46:33 -0800 (PST) Received: by 10.147.124.9 with HTTP; Tue, 7 Dec 2010 09:46:32 -0800 (PST) In-Reply-To: <201012070933.13710.jhb@freebsd.org> References: <07255796.20101207031807@bitdefender.com> <201012070933.13710.jhb@freebsd.org> Date: Tue, 7 Dec 2010 09:46:32 -0800 Message-ID: From: Jack Vogel To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, Mihai-Catalin Salgau Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 17:46:35 -0000 Same thing I was thinking, there is nothing else that should limit vlans in any way. Jack On Tue, Dec 7, 2010 at 6:33 AM, John Baldwin wrote: > On Monday, December 06, 2010 8:18:07 pm Mihai-Catalin Salgau wrote: > > Hello Freebsd-net, > > > > I have two dual port NICs, one Broadcom(bce0,bce1) and one > Intel(em0,em1), on FreeBSD 8-stable > > (about two weeks old) with a DHCP server running. > > I've been successfully using a large number of vlans over bce1,em0 and > em1 with iSCSI, > > but wanted to switch to AoE(ata over ethernet). I've set vlandevs by > round-robin, and got > > vlan1 on bce0, vlan2 on em0, vlan3 on em1, vlan4 on bce0....vlan12 on > em1. I've binded > > net/vblade instances to each interface, but the problem I'm facing now > is that while > > vlans 1-10 are working properly, vlans 11 and 12 won't see any traffic > unless the interface is > > in promiscuous mode. I noticed that while trying to attach tcpdump and > saw the thing instantly work. > > I've had no problems with iSCSI over the same setup, and dhcp packets > are getting trough properly. > > I've moved those last two vlans to bce0 and they work ok, but I'm a bit > locked on why this is happening. > > Are there any known limitations on vlans on e1000? > > Are you using the 'vlanhwfilter' feature? > > -- > John Baldwin > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 17:57:27 2010 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 664B0106566B for ; Tue, 7 Dec 2010 17:57:27 +0000 (UTC) (envelope-from csalgau-br@bitdefender.com) Received: from mail.bitdefender.com (mail.bitdefender.com [91.199.104.2]) by mx1.freebsd.org (Postfix) with ESMTP id AC8B88FC12 for ; Tue, 7 Dec 2010 17:57:26 +0000 (UTC) Received: (qmail 15665 invoked from network); 7 Dec 2010 19:57:24 +0200 Received: from bitdefender.is.ew.ro (HELO ?192.168.70.65?) (csalgau@bitdefender.com@81.181.91.206) by mail.bitdefender.com with AES256-SHA encrypted SMTP; 7 Dec 2010 19:57:24 +0200 Date: Tue, 7 Dec 2010 19:57:14 +0200 From: Mihai-Catalin Salgau X-Priority: 3 (Normal) Message-ID: <1466741156.20101207195714@bitdefender.com> To: Jack Vogel In-Reply-To: References: <07255796.20101207031807@bitdefender.com> <201012070933.13710.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.118769, SQMD Hits: InvalidIPBytes34 97.41.107.111, rbl score: 0(0), bayes score: 500(0), pbayes score: 500(0), neunet score: 0(0), flags: [NN_LEGIT_BITDEFENDER], SQMD: 965452724f87b39e94b57b6dfe58fe0d.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-Scanner: Clean, Agent: BitDefender qmail 3.1.0 on elfie.dsd.hq, sigver: 7.34955 Cc: freebsd-net@freebsd.org, Mihai-Catalin Salgau , John Baldwin Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 17:57:27 -0000 Hello Jack, Tuesday, December 7, 2010, 7:46:32 PM, you wrote: > Same thing I was thinking, there is nothing else that should limit vlans in > any way. > Jack > On Tue, Dec 7, 2010 at 6:33 AM, John Baldwin wrote: >> On Monday, December 06, 2010 8:18:07 pm Mihai-Catalin Salgau wrote: >> > Hello Freebsd-net, >> > >> > I have two dual port NICs, one Broadcom(bce0,bce1) and one >> Intel(em0,em1), on FreeBSD 8-stable >> > (about two weeks old) with a DHCP server running. >> > I've been successfully using a large number of vlans over bce1,em0 and >> em1 with iSCSI, >> > but wanted to switch to AoE(ata over ethernet). I've set vlandevs by >> round-robin, and got >> > vlan1 on bce0, vlan2 on em0, vlan3 on em1, vlan4 on bce0....vlan12 on >> em1. I've binded >> > net/vblade instances to each interface, but the problem I'm facing now >> is that while >> > vlans 1-10 are working properly, vlans 11 and 12 won't see any traffic >> unless the interface is >> > in promiscuous mode. I noticed that while trying to attach tcpdump and >> saw the thing instantly work. >> > I've had no problems with iSCSI over the same setup, and dhcp packets >> are getting trough properly. >> > I've moved those last two vlans to bce0 and they work ok, but I'm a bit >> locked on why this is happening. >> > Are there any known limitations on vlans on e1000? >> >> Are you using the 'vlanhwfilter' feature? >> >> -- >> John Baldwin No, I'm not using it. em0&em1 have RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4 enabled The Broadcom has RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO I've also tried disabling vlanhwtag and enabling vlanhwfilter, but it doesn't help. Still, the moment I switch the interface to promiscuous mode, it works. I've also tried setting 8 vlans on bce1 to see if there's a limit per driver for some reason, but it works ok. From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 18:11:17 2010 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 85562106564A; Tue, 7 Dec 2010 18:11:17 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by mx1.freebsd.org (Postfix) with ESMTP id 0E01D8FC13; Tue, 7 Dec 2010 18:11:16 +0000 (UTC) Received: by gxk28 with SMTP id 28so212303gxk.17 for ; Tue, 07 Dec 2010 10:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=a91Nw0V0LJDHwioz2z+zlQPzUeDNA43C48z7RRPqvhk=; b=Nh3tePyWPvqyBZQmimimtgd1R9h5I+f75NTQY1GH9PtiH1dO4T+uer/CI4ZKX0Zcxp Taot9wLmlYqlSZOiKCU+h9wB2LqcvqJK4MX5R5QnJMCUWLTAwSg0jBgvOWLVBf2+Vph7 wLvWbzGHrVdetCs4EzykuGJN+M5/J+ISjn2Dc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=llttHS8xeOvpL4zKc7PKqoofUz2pWPJRxv3AzZM8679g7+SZWGV0JYGpNqZU2MIJ6x Rh9/t0KXgAwvmPwAiQOHrf6b7jmBTvC9CRNtlDGVwee6n14uqHJBTypMziHE0kg0otXY mLExJttaJRi82bt5jJD/BMI7kx9M38rYS8/FI= MIME-Version: 1.0 Received: by 10.100.7.3 with SMTP id 3mr4159851ang.6.1291745475872; Tue, 07 Dec 2010 10:11:15 -0800 (PST) Received: by 10.147.124.9 with HTTP; Tue, 7 Dec 2010 10:11:15 -0800 (PST) In-Reply-To: <1466741156.20101207195714@bitdefender.com> References: <07255796.20101207031807@bitdefender.com> <201012070933.13710.jhb@freebsd.org> <1466741156.20101207195714@bitdefender.com> Date: Tue, 7 Dec 2010 10:11:15 -0800 Message-ID: From: Jack Vogel To: Mihai-Catalin Salgau Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, John Baldwin Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 18:11:17 -0000 HMMMMMM, well this has a certain amount of deja vu to it :) There was a problem like this long ago when someone was using vlans AND the lagg device, the issue was that the em driver never received the vlan attach events because lagg ate them, so to speak :) Still I think this was only an issue with filtering. Just for giggles, turn on BOTH tagging and filtering and see what happens. Jack On Tue, Dec 7, 2010 at 9:57 AM, Mihai-Catalin Salgau < csalgau-br@bitdefender.com> wrote: > Hello Jack, > > Tuesday, December 7, 2010, 7:46:32 PM, you wrote: > > > Same thing I was thinking, there is nothing else that should limit vlans > in > > any way. > > > Jack > > > > On Tue, Dec 7, 2010 at 6:33 AM, John Baldwin wrote: > > >> On Monday, December 06, 2010 8:18:07 pm Mihai-Catalin Salgau wrote: > >> > Hello Freebsd-net, > >> > > >> > I have two dual port NICs, one Broadcom(bce0,bce1) and one > >> Intel(em0,em1), on FreeBSD 8-stable > >> > (about two weeks old) with a DHCP server running. > >> > I've been successfully using a large number of vlans over bce1,em0 > and > >> em1 with iSCSI, > >> > but wanted to switch to AoE(ata over ethernet). I've set vlandevs by > >> round-robin, and got > >> > vlan1 on bce0, vlan2 on em0, vlan3 on em1, vlan4 on bce0....vlan12 > on > >> em1. I've binded > >> > net/vblade instances to each interface, but the problem I'm facing > now > >> is that while > >> > vlans 1-10 are working properly, vlans 11 and 12 won't see any > traffic > >> unless the interface is > >> > in promiscuous mode. I noticed that while trying to attach tcpdump > and > >> saw the thing instantly work. > >> > I've had no problems with iSCSI over the same setup, and dhcp > packets > >> are getting trough properly. > >> > I've moved those last two vlans to bce0 and they work ok, but I'm a > bit > >> locked on why this is happening. > >> > Are there any known limitations on vlans on e1000? > >> > >> Are you using the 'vlanhwfilter' feature? > >> > >> -- > >> John Baldwin > > No, I'm not using it. > em0&em1 have RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4 enabled > The Broadcom has > RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO > I've also tried disabling vlanhwtag and enabling vlanhwfilter, but it > doesn't help. > Still, the moment I switch the interface to promiscuous mode, it works. > I've also tried setting 8 vlans on bce1 to see if there's a limit per > driver for some reason, but it works ok. > > From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 18:13:40 2010 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 2F7831065672 for ; Tue, 7 Dec 2010 18:13:40 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1-6.sentex.ca [IPv6:2607:f3e0:0:1::12]) by mx1.freebsd.org (Postfix) with ESMTP id E0B898FC0A for ; Tue, 7 Dec 2010 18:13:39 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:2c91:fa66:2350:ddab] ([IPv6:2607:f3e0:0:4:2c91:fa66:2350:ddab]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id oB7IDV44053690 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 7 Dec 2010 13:13:31 -0500 (EST) (envelope-from mike@sentex.net) Message-ID: <4CFE7946.70209@sentex.net> Date: Tue, 07 Dec 2010 13:13:26 -0500 From: Mike Tancsa User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Mihai-Catalin Salgau References: <07255796.20101207031807@bitdefender.com> In-Reply-To: <07255796.20101207031807@bitdefender.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 18:13:40 -0000 On 12/6/2010 8:18 PM, Mihai-Catalin Salgau wrote: > Hello Freebsd-net, > > I have two dual port NICs, one Broadcom(bce0,bce1) and one Intel(em0,em1), on FreeBSD 8-stable > (about two weeks old) with a DHCP server running. Hi, There were a bunch of changes to RELENG_8's em driver a week ago. Perhaps update to that first. But what sort of em nics do you have ? pciconf -lvc will show it. I have a number of boxes with 20 or more ifconfig | grep ^vlan | wc 20 120 1562 Most of which are pcie based, or onboard 82574L types. ---Mike > I've been successfully using a large number of vlans over bce1,em0 and em1 with iSCSI, > but wanted to switch to AoE(ata over ethernet). I've set vlandevs by round-robin, and got > vlan1 on bce0, vlan2 on em0, vlan3 on em1, vlan4 on bce0....vlan12 on em1. I've binded > net/vblade instances to each interface, but the problem I'm facing now is that while > vlans 1-10 are working properly, vlans 11 and 12 won't see any traffic unless the interface is > in promiscuous mode. I noticed that while trying to attach tcpdump and saw the thing instantly work. > I've had no problems with iSCSI over the same setup, and dhcp packets are getting trough properly. > I've moved those last two vlans to bce0 and they work ok, but I'm a bit locked on why this is happening. > Are there any known limitations on vlans on e1000? > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 18:20:05 2010 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 9ADE4106566B for ; Tue, 7 Dec 2010 18:20:05 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 459398FC08 for ; Tue, 7 Dec 2010 18:20:04 +0000 (UTC) Received: by yxh35 with SMTP id 35so172539yxh.13 for ; Tue, 07 Dec 2010 10:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=L76slW3TOu1Tan05RooUesagnLYcQ+WAjAREi3O1dmQ=; b=cmfo7JcvTUOqLTHGbwFpkWfJSEsFtUte2g9oJCaQ430UyFKACgbMK9aXDvJIrAGLl6 FmKFmcWoeBEcijyUMgDOk0j/PtobQskl70unIJqbNSwGAgrK7/SHb17AbEzwnl9jx1BA LSiTtXptUlzHUmiQdmTjBkvtKyclV4HilzWMc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XawLeenU6IcGkMWYE5ArEFBsMIBPP1S7QvJmB6w+iugKjAbS+WwOu1nT94piaNMjVt lsWv1yEQ4LafwWuy5tlR9ExARy2R50/2eYA9t9cmHthT/fO6/o7w6Ut5BwZ4F8qloH/b aNQU7DzwWgHSQmr3ztTmpCQH15jMMxYfUth+c= MIME-Version: 1.0 Received: by 10.150.200.21 with SMTP id x21mr2301628ybf.100.1291746004396; Tue, 07 Dec 2010 10:20:04 -0800 (PST) Received: by 10.147.124.9 with HTTP; Tue, 7 Dec 2010 10:20:04 -0800 (PST) In-Reply-To: <4CFE7946.70209@sentex.net> References: <07255796.20101207031807@bitdefender.com> <4CFE7946.70209@sentex.net> Date: Tue, 7 Dec 2010 10:20:04 -0800 Message-ID: From: Jack Vogel To: Mike Tancsa Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, Mihai-Catalin Salgau Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 18:20:05 -0000 I assumed he was, but if you arent running 7.1.8 do that before anything else. Jack On Tue, Dec 7, 2010 at 10:13 AM, Mike Tancsa wrote: > On 12/6/2010 8:18 PM, Mihai-Catalin Salgau wrote: > > Hello Freebsd-net, > > > > I have two dual port NICs, one Broadcom(bce0,bce1) and one > Intel(em0,em1), on FreeBSD 8-stable > > (about two weeks old) with a DHCP server running. > > Hi, > There were a bunch of changes to RELENG_8's em driver a week ago. > Perhaps update to that first. But what sort of em nics do you have ? > pciconf -lvc will show it. I have a number of boxes with 20 or more > > ifconfig | grep ^vlan | wc > 20 120 1562 > > Most of which are pcie based, or onboard 82574L types. > > ---Mike > > > I've been successfully using a large number of vlans over bce1,em0 and > em1 with iSCSI, > > but wanted to switch to AoE(ata over ethernet). I've set vlandevs by > round-robin, and got > > vlan1 on bce0, vlan2 on em0, vlan3 on em1, vlan4 on bce0....vlan12 on > em1. I've binded > > net/vblade instances to each interface, but the problem I'm facing now > is that while > > vlans 1-10 are working properly, vlans 11 and 12 won't see any traffic > unless the interface is > > in promiscuous mode. I noticed that while trying to attach tcpdump and > saw the thing instantly work. > > I've had no problems with iSCSI over the same setup, and dhcp packets > are getting trough properly. > > I've moved those last two vlans to bce0 and they work ok, but I'm a bit > locked on why this is happening. > > Are there any known limitations on vlans on e1000? > > > > > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 19:19:21 2010 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 155791065694 for ; Tue, 7 Dec 2010 19:19:21 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 730C18FC12 for ; Tue, 7 Dec 2010 19:19:20 +0000 (UTC) Received: by wwf26 with SMTP id 26so249686wwf.31 for ; Tue, 07 Dec 2010 11:19:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:reply-to:from:to:subject:date :message-id:mime-version:content-type:x-mailer:thread-index :content-language; bh=CRk/RYF4ThG7DdXI9esG6R7hTeYBSczhPTzRqbfLZSE=; b=KptIj/8z+44nO4ZYkqTZsU/HZ4/kb/a4/teAbzqpi9OKsHeWu0AHMpreLiSDAwh2Xs IahYhgLqsq33maFIQpcZI9U0K6yFf2JZSRBZ2XuB4URafnY4f7wOHCYKFIR2AOzshtpA 0BxfvS6ICauLjHRs6+7qBOcI3gJx2w6q+R3MI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:subject:date:message-id:mime-version:content-type :x-mailer:thread-index:content-language; b=kFLCwb/TMfxbzw1k5JIsvdxSpsVFn7GOdTir+Nm/TqDp+pd51CKE5XFnRQmhzIaBRK nPkocWuW5fyYBv6CeHCihDJ/AJYOoXkdmiQCbKgpuXEsCtL2d98pjdqhFFSxxTgzY/z6 l7TcXlqNAMGf6JCcH5PRZ5y6Gb3wVymxdBucY= Received: by 10.216.50.147 with SMTP id z19mr821936web.38.1291749559280; Tue, 07 Dec 2010 11:19:19 -0800 (PST) Received: from rimwks1x64 ([92.124.16.65]) by mx.google.com with ESMTPS id x28sm3130518weq.40.2010.12.07.11.19.16 (version=SSLv3 cipher=RC4-MD5); Tue, 07 Dec 2010 11:19:18 -0800 (PST) From: rozhuk.im@gmail.com To: Date: Wed, 8 Dec 2010 03:19:14 +0800 Message-ID: <4cfe88b6.1cedd80a.33f5.119d@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0065_01CB9686.B27BE840" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcuWQ6KYRrLlJ7k9SVKlpuvD9hTEkQ== Content-Language: ru Subject: [arp] possible DoS, fixes and improvements X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2010 19:19:21 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0065_01CB9686.B27BE840 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Hi! 1. ah->ar_hln - is depend from ar_hrd? Yes, and for ARPHRD_ETHER is 6 (ETHER_ADDR_LEN) For ARPHRD_IEEE1394 - sizeof(struct fw_hwaddr) ah->ar_hln ignored in ether_output: bcopy(ar_tha(ah), edst, = ETHER_ADDR_LEN); check in in_arpinput: if (ifp->if_addrlen !=3D ah->ar_hln) { LLE_WUNLOCK(la); log(LOG_WARNING, "arp from %*D: addr len: new %d, i/f %d (ignored)", ifp->if_addrlen, (u_char *) ar_sha(ah), ":", ah->ar_hln, ifp->if_addrlen); goto reply; } NO DROP!!!! In reply we get: (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln); Or=20 (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); (void)memcpy(ar_sha(ah), &lle->ll_addr, ah->ar_hln); How to use it see below. 2. ah->ar_pln - does not checked! We can make big arp request (512 nulls after struct arphdr + 2*6 + 2*4) = , valid for host, set ar_plt =3D 255 And in reply will receive part of stack or core panic: in_arpinput: (void)memcpy(ar_spa(ah), &itaddr, ah->ar_pln); ... m->m_len =3D sizeof(*ah) + (2 * ah->ar_pln) + (2 * ah->ar_hln); ( eq arphdr_len(ah) ) 3. ar_sha(ah) - does not checked for multicast! Answers to request my be send to multicast addrs Only broadcast and host addr are checked. No check is ar_sha(ah) equal to Ethernet.ether_shost As result: arp -an ? (172.16.0.2) at 01:80:c2:00:00:01 on em0 expires in 118 seconds = [ethernet] 4. holded packet my be sended without any locks Current: if (la->la_hold !=3D NULL) { struct mbuf *m_hold, *m_hold_next; bcopy(L3_ADDR(la), &sa, sizeof(sa)); LLE_WUNLOCK(la); for (m_hold =3D la->la_hold, la->la_hold =3D NULL; m_hold !=3D NULL; m_hold =3D m_hold_next) { m_hold_next =3D m_hold->m_nextpkt; m_hold->m_nextpkt =3D NULL; (*ifp->if_output)(ifp, m_hold, &sa, NULL); } } else LLE_WUNLOCK(la); la->la_hold =3D NULL; la->la_numheld =3D 0; Here we unlock la and then modify them - this is bad idea! Patched - see in attached patch. This sample will work only for Ethernet without locks if_output -> call arplookup again for every packet for sa_family =3D = AF_INET AF_UNSPEC - just copy ether_type/arc_type/... and L2 addr from = dst->sa_data struct mbuf *m_hold, *m_hold_next; struct sockaddr dst; m_hold =3D la->la_hold; if (m_hold !=3D NULL) { dst.sa_len =3D sizeof(dst); dst.sa_family =3D AF_UNSPEC; /* prevent call arpresolve, we know L2 addr dst */ switch (ntohs(ah->ar_hrd)){ case ARPHRD_ETHER: ((struct ether_header*)&dst.sa_data)->ether_type =3D ah->ar_pro; bcopy(ar_sha(ah), ((struct ether_header*)&dst.sa_data)->ether_dhost, ah->ar_hln); break; //case ARPHRD_IEEE802: // break; //case ARPHRD_ARCNET: // ((struct arc_header *)&dst.sa_data)->arc_type =3D ah->ar_pro; // bcopy(ar_sha(ah), ((struct arc_header *)&dst.sa_data)->arc_dhost, ah->ar_hln); // break; //case ARPHRD_FRELAY: // break; //case ARPHRD_IEEE1394: // break; default: bcopy(L3_ADDR(la), &dst, sizeof(dst)); } } la->la_hold =3D NULL; la->la_numheld =3D 0; LLE_WUNLOCK(la); for (; m_hold !=3D NULL; m_hold =3D m_hold_next) { m_hold_next =3D m_hold->m_nextpkt; m_hold->m_nextpkt =3D NULL; (*ifp->if_output)(ifp, m_hold, &dst, NULL); } Do I need include this improvement in next patch? Will attached patch included in mainstream code? PS: patch contain fixes and some code cleanup and improvements. Only basics tests done, not tested in production. PPS: tests for 1 and 2 Part of code to generate arp packet struct arphdr *ah; u_char buff[2048]; u_int32_t src, dst; bzero(buff, sizeof(buff)); ah =3D (struct arphdr *)buff; src =3D INET_ADDR(172,16,0,2); dst =3D INET_ADDR(172,16,0,254);// - target! ah->ar_hrd =3D htons(ARPHRD_ETHER); ah->ar_pro =3D htons(ETHERTYPE_IP); ah->ar_op =3D htons(ARPOP_REQUEST); ah->ar_hln =3D 255;//ETHER_ADDR_LEN; ah->ar_pln =3D 255;//INET_ADDR_LEN; ETHER_ADDR_COPY(ar_sha(ah), ether_shost); INET_ADDR_COPY(ar_spa(ah), &src); INET_ADDR_COPY(ar_tpa(ah), &dst); send_ether(bpf, ether_dhost, ether_shost, ETHERTYPE_ARP, (u_char*)ah, = 1200); returned answer is 1042 bytes size, no core panic tested on my home freebsd box (i386, 8.2 @ E5300), with custom kernel 0x0030 x 0000 0000 0018 0000 0000 0000 00ff ffff x ................ 0x0040 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0050 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0060 x 0000 0000 0000 0000 0000 0000 0000 6a2f x ..............j/ 0x0070 x c5a0 522f c580 552f c500 412f c500 0008 x ..R/..U/..A/.... 0x0080 x f100 0000 f101 b000 0000 000a f100 0000 x ................ 0x0090 x 0000 0000 0000 0000 0086 801f a086 80d3 x ................ 0x00A0 x 1007 0010 0002 0000 0000 0801 1100 0000 x ................ 0x00B0 x 0006 0000 0000 0000 0002 0000 0022 c8cc x .............".. 0x00C0 x cecf 0000 0000 0000 0000 0000 0000 0000 x ................ 0x00D0 x 0000 0000 0000 0000 0000 0000 0080 00d0 x ................ 0x00E0 x 0100 0000 0000 0000 0000 0000 0000 0000 x ................ 0x00F0 x 0000 0000 0004 8005 00a0 1c1c 0000 0000 x ................ 0x0100 x 0000 2000 0003 00ac 1000 feac 1000 0210 x ................ 0x0110 x 0200 00ac 1000 0200 0000 0000 0000 00a0 x ................ 0x0120 x 3520 c570 3820 c5a0 3520 c5a0 3520 c502 x 5..p8...5...5... 0x0130 x e249 fb00 0000 0000 8121 c900 58c2 c07c x .I.......!..X..| 0x0140 x 7cdb c4ea 6856 c000 8121 c9c0 066c c001 x |...hV...!...l.. 0x0150 x 0000 0002 0000 0060 7cdb c4a0 3520 c5a0 x .......`|...5... 0x0160 x 3520 c5c4 0000 007f ffff ff80 0000 00cc x 5............... 0x0170 x 59c2 c001 0000 0007 0000 00c0 c31e c500 x Y............... 0x0180 x 5e1c c5a0 3520 c5ac 7cdb c49e 0d49 c000 x ^...5...|....I.. 0x0190 x 58c2 c0ec e64b c000 0000 0009 0100 0047 x X....K.........G 0x01A0 x d152 e8a0 3520 c500 0000 0000 5e1c c530 x .R..5.......^..0 0x01B0 x d11e c5a0 3520 c5dc 7cdb c43e 2649 c0a0 x ....5...|..>&I.. 0x01C0 x 1a20 c500 5e1c c57d c565 c02d 0500 0070 x ....^..}.e.-...p 0x01D0 x 5e1c c56c 5e1c c5a0 1a20 c530 d11e c5a0 x ^..l^......0.... 0x01E0 x 3520 c500 0000 0014 7ddb c4fd e948 c030 x 5.......}....H.0 0x01F0 x d11e c528 7ddb c400 0000 0000 0000 0000 x ...(}........... 0x0200 x 0000 0000 0000 001d 0ff2 4b4a 0000 0000 x ..........KJ.... 0x0210 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0220 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0230 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0240 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0250 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0260 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0270 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0280 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0290 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x02A0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x02B0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x02C0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x02D0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x02E0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x02F0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0300 x 0000 0000 00ac 1000 0200 0000 0000 0000 x ................ 0x0310 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0320 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0330 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0340 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0350 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0360 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0370 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0380 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0390 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x03A0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x03B0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x03C0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x03D0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x03E0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x03F0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0400 x 0000 0000 x .... ah->ar_hln =3D ETHER_ADDR_LEN; // =3D 6 ah->ar_pln =3D 255;//INET_ADDR_LEN; 0x0000 x 0001 0800 06ff 0002 001b 214f f5b3 ac10 x ..........!O.... 0x0010 x 00fe ac10 0002 1002 0000 ac10 0002 0000 x ................ 0x0020 x 0000 0000 0000 a035 20c5 0000 0000 a035 x .......5.......5 0x0030 x 20c5 a035 20c5 02e2 49fb 0000 0000 00c4 x ...5....I....... 0x0040 x 26c9 0058 c2c0 7c7c dbc4 ea68 56c0 00c4 x &..X..||...hV... 0x0050 x 26c9 c006 6cc0 0100 0000 0200 0000 607c x &...l.........`| 0x0060 x dbc4 a035 20c5 a035 20c5 c400 0000 7fff x ...5...5........ 0x0070 x ffff 8000 0000 cc59 c2c0 0100 0000 0700 x .......Y........ 0x0080 x 0000 c0c3 1ec5 005e 1cc5 a035 20c5 ac7c x .......^...5...| 0x0090 x dbc4 9e0d 49c0 0058 c2c0 ece6 4bc0 0000 x ....I..X....K... 0x00A0 x 0000 0901 0000 dedc 6b6f a035 20c5 0000 x ........ko.5.... 0x00B0 x 0000 005e 1cc5 30d1 1ec5 a035 20c5 dc7c x ...^..0....5...| 0x00C0 x dbc4 3e26 49c0 a01a 20c5 005e 1cc5 7dc5 x ..>&I......^..}. 0x00D0 x 65c0 2d05 0000 705e 1cc5 6c5e 1cc5 a01a x e.-...p^..l^.... 0x00E0 x 20c5 30d1 1ec5 a035 20c5 0000 0000 147d x ..0....5.......} 0x00F0 x dbc4 fde9 48c0 30d1 1ec5 287d dbc4 0000 x ....H.0...(}.... 0x0100 x 0000 0000 0000 0000 0000 0000 0000 1d0f x ................ 0x0110 x f24b 4aac 1000 0200 0000 0000 0000 0000 x .KJ............. 0x0120 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0130 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0140 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0150 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0160 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0170 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0180 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0190 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x01A0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x01B0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x01C0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x01D0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x01E0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x01F0 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0200 x 0000 0000 0000 0000 0000 0000 0000 0000 x ................ 0x0210 x 0000 x .. =A0 -- Rozhuk Ivan =A0=20 ------=_NextPart_000_0065_01CB9686.B27BE840 Content-Type: application/octet-stream; name="if_ether.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="if_ether.patch" --- /usr/src/sys/netinet/if_ether.orig 2010-12-02 16:52:06.000000000 = +0800=0A= +++ /usr/src/sys/netinet/if_ether.c 2010-12-08 02:49:07.000000000 +0800=0A= @@ -57,6 +57,9 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= +#include =0A= +#include =0A= #include =0A= #include =0A= =0A= @@ -246,7 +249,7 @@=0A= m->m_pkthdr.len =3D m->m_len;=0A= MH_ALIGN(m, m->m_len);=0A= ah =3D mtod(m, struct arphdr *);=0A= - bzero((caddr_t)ah, m->m_len);=0A= + bzero(ah, m->m_len);=0A= #ifdef MAC=0A= mac_netinet_arp_send(ifp, m);=0A= #endif=0A= @@ -254,9 +257,9 @@=0A= ah->ar_hln =3D ifp->if_addrlen; /* hardware address length */=0A= ah->ar_pln =3D sizeof(struct in_addr); /* protocol address length */=0A= ah->ar_op =3D htons(ARPOP_REQUEST);=0A= - bcopy((caddr_t)enaddr, (caddr_t)ar_sha(ah), ah->ar_hln);=0A= - bcopy((caddr_t)sip, (caddr_t)ar_spa(ah), ah->ar_pln);=0A= - bcopy((caddr_t)tip, (caddr_t)ar_tpa(ah), ah->ar_pln);=0A= + bcopy(enaddr, ar_sha(ah), ah->ar_hln);=0A= + bcopy(sip, ar_spa(ah), ah->ar_pln);=0A= + bcopy(tip, ar_tpa(ah), ah->ar_pln);=0A= sa.sa_family =3D AF_ARP;=0A= sa.sa_len =3D 2;=0A= m->m_flags |=3D M_BCAST;=0A= @@ -292,8 +295,7 @@=0A= if (m !=3D NULL) {=0A= if (m->m_flags & M_BCAST) {=0A= /* broadcast */=0A= - (void)memcpy(desten,=0A= - ifp->if_broadcastaddr, ifp->if_addrlen);=0A= + bcopy(ifp->if_broadcastaddr, desten, ifp->if_addrlen);=0A= return (0);=0A= }=0A= if (m->m_flags & M_MCAST && ifp->if_type !=3D IFT_ARCNET) {=0A= @@ -429,42 +431,68 @@=0A= static void=0A= arpintr(struct mbuf *m)=0A= {=0A= - struct arphdr *ar;=0A= + struct arphdr *ah;=0A= =0A= if (m->m_len < sizeof(struct arphdr) &&=0A= ((m =3D m_pullup(m, sizeof(struct arphdr))) =3D=3D NULL)) {=0A= log(LOG_ERR, "arp: runt packet -- m_pullup failed\n");=0A= return;=0A= }=0A= - ar =3D mtod(m, struct arphdr *);=0A= + ah =3D mtod(m, struct arphdr *);=0A= =0A= - if (ntohs(ar->ar_hrd) !=3D ARPHRD_ETHER &&=0A= - ntohs(ar->ar_hrd) !=3D ARPHRD_IEEE802 &&=0A= - ntohs(ar->ar_hrd) !=3D ARPHRD_ARCNET &&=0A= - ntohs(ar->ar_hrd) !=3D ARPHRD_IEEE1394) {=0A= - log(LOG_ERR, "arp: unknown hardware address format (0x%2D)\n",=0A= - (unsigned char *)&ar->ar_hrd, "");=0A= - m_freem(m);=0A= - return;=0A= + /* check hw addr len and hw addr */=0A= + switch (ntohs(ah->ar_hrd)){=0A= + case ARPHRD_ETHER:=0A= + if (ah->ar_hln !=3D ETHER_ADDR_LEN) {=0A= + log(LOG_ERR, "arp: invalid length of hardware address\n");=0A= + goto drop;=0A= + }=0A= + /* is from [multi/broad]cast? - sender cant be [multi/broad]cast! */=0A= + if (ETHER_IS_MULTICAST(ar_sha(ah)) !=3D 0) {=0A= + log(LOG_ERR, "arp: link address is multicast\n");=0A= + goto drop;=0A= + }=0A= + break;=0A= + case ARPHRD_IEEE802:=0A= + if (ah->ar_hln !=3D ISO88025_ADDR_LEN)=0A= + goto drop;=0A= + break;=0A= + case ARPHRD_ARCNET:=0A= + if (ah->ar_hln !=3D ARC_ADDR_LEN)=0A= + goto drop;=0A= + break;=0A= + case ARPHRD_FRELAY:=0A= + if (ah->ar_hln !=3D 2)=0A= + goto drop;=0A= + break;=0A= + case ARPHRD_IEEE1394:=0A= + if (ah->ar_hln !=3D sizeof(struct fw_hwaddr)) /* XXX 8? */=0A= + goto drop;=0A= + break;=0A= + default:=0A= + log(LOG_ERR, "arp: unknown hardware address format\n");=0A= + goto drop;=0A= }=0A= =0A= - if (m->m_len < arphdr_len(ar)) {=0A= - if ((m =3D m_pullup(m, arphdr_len(ar))) =3D=3D NULL) {=0A= + if (m->m_len < arphdr_len(ah)) {=0A= + if ((m =3D m_pullup(m, arphdr_len(ah))) =3D=3D NULL) {=0A= log(LOG_ERR, "arp: runt packet\n");=0A= - m_freem(m);=0A= return;=0A= }=0A= - ar =3D mtod(m, struct arphdr *);=0A= + ah =3D mtod(m, struct arphdr *);=0A= }=0A= =0A= ARPSTAT_INC(received);=0A= - switch (ntohs(ar->ar_pro)) {=0A= + switch (ntohs(ah->ar_pro)) {=0A= #ifdef INET=0A= case ETHERTYPE_IP:=0A= in_arpinput(m);=0A= return;=0A= #endif=0A= }=0A= +=0A= + log(LOG_ERR, "arp: unknown format of protocol address\n");=0A= +drop:=0A= m_freem(m);=0A= }=0A= =0A= @@ -507,11 +535,10 @@=0A= struct rtentry *rt;=0A= struct ifaddr *ifa;=0A= struct in_ifaddr *ia;=0A= - struct sockaddr sa;=0A= + struct sockaddr dst;=0A= struct in_addr isaddr, itaddr, myaddr;=0A= u_int8_t *enaddr =3D NULL;=0A= int op, flags;=0A= - int req_len;=0A= int bridged =3D 0, is_bridge =3D 0;=0A= int carp_match =3D 0;=0A= struct sockaddr_in sin;=0A= @@ -519,25 +546,25 @@=0A= sin.sin_family =3D AF_INET;=0A= sin.sin_addr.s_addr =3D 0;=0A= =0A= - if (ifp->if_bridge)=0A= - bridged =3D 1;=0A= - if (ifp->if_type =3D=3D IFT_BRIDGE)=0A= - is_bridge =3D 1;=0A= =0A= - req_len =3D arphdr_len2(ifp->if_addrlen, sizeof(struct in_addr));=0A= - if (m->m_len < req_len && (m =3D m_pullup(m, req_len)) =3D=3D NULL) {=0A= - log(LOG_ERR, "in_arp: runt packet -- m_pullup failed\n");=0A= - return;=0A= + ah =3D mtod(m, struct arphdr *);=0A= + if (ah->ar_pln !=3D sizeof(struct in_addr)) {=0A= + log(LOG_ERR, "arp: invalid length of protocol address\n");=0A= + goto drop;=0A= }=0A= =0A= - ah =3D mtod(m, struct arphdr *);=0A= op =3D ntohs(ah->ar_op);=0A= - (void)memcpy(&isaddr, ar_spa(ah), sizeof (isaddr));=0A= - (void)memcpy(&itaddr, ar_tpa(ah), sizeof (itaddr));=0A= + bcopy(ar_spa(ah), &isaddr, sizeof (isaddr));=0A= + bcopy(ar_tpa(ah), &itaddr, sizeof (itaddr));=0A= =0A= if (op =3D=3D ARPOP_REPLY)=0A= ARPSTAT_INC(rxreplies);=0A= =0A= + if (ifp->if_bridge)=0A= + bridged =3D 1;=0A= + if (ifp->if_type =3D=3D IFT_BRIDGE)=0A= + is_bridge =3D 1;=0A= +=0A= /*=0A= * For a bridge, we want to check the address irrespective=0A= * of the receive interface. (This will change slightly=0A= @@ -626,6 +653,15 @@=0A= enaddr =3D (u_int8_t *)IF_LLADDR(ifp);=0A= myaddr =3D ia->ia_addr.sin_addr;=0A= ifa_free(&ia->ia_ifa);=0A= +=0A= + /* XXX length of hardware address (ar_hln) already checked in arpintr = */=0A= + if (ifp->if_addrlen !=3D ah->ar_hln) {=0A= + log(LOG_WARNING,=0A= + "arp from %*D: addr len: new %d, i/f %d (ignored)",=0A= + ifp->if_addrlen, (u_char *) ar_sha(ah), ":",=0A= + ah->ar_hln, ifp->if_addrlen);=0A= + goto drop;=0A= + }=0A= if (!bcmp(ar_sha(ah), enaddr, ifp->if_addrlen))=0A= goto drop; /* it's from me, ignore it. */=0A= if (!bcmp(ar_sha(ah), ifp->if_broadcastaddr, ifp->if_addrlen)) {=0A= @@ -695,16 +731,8 @@=0A= ifp->if_xname);=0A= }=0A= }=0A= - =0A= - if (ifp->if_addrlen !=3D ah->ar_hln) {=0A= - LLE_WUNLOCK(la);=0A= - log(LOG_WARNING,=0A= - "arp from %*D: addr len: new %d, i/f %d (ignored)",=0A= - ifp->if_addrlen, (u_char *) ar_sha(ah), ":",=0A= - ah->ar_hln, ifp->if_addrlen);=0A= - goto reply;=0A= - }=0A= - (void)memcpy(&la->ll_addr, ar_sha(ah), ifp->if_addrlen);=0A= +=0A= + bcopy(ar_sha(ah), &la->ll_addr, ifp->if_addrlen);=0A= la->la_flags |=3D LLE_VALID;=0A= =0A= EVENTHANDLER_INVOKE(arp_update_event, la);=0A= @@ -728,31 +756,31 @@=0A= * NB: The lock MUST be released before the call to the=0A= * output routine.=0A= */=0A= - if (la->la_hold !=3D NULL) {=0A= - struct mbuf *m_hold, *m_hold_next;=0A= + struct mbuf *m_hold, *m_hold_next;=0A= =0A= - memcpy(&sa, L3_ADDR(la), sizeof(sa));=0A= - LLE_WUNLOCK(la);=0A= - for (m_hold =3D la->la_hold, la->la_hold =3D NULL;=0A= - m_hold !=3D NULL; m_hold =3D m_hold_next) {=0A= - m_hold_next =3D m_hold->m_nextpkt;=0A= - m_hold->m_nextpkt =3D NULL;=0A= - (*ifp->if_output)(ifp, m_hold, &sa, NULL);=0A= - }=0A= - } else=0A= - LLE_WUNLOCK(la);=0A= + m_hold =3D la->la_hold;=0A= + if (m_hold !=3D NULL)=0A= + bcopy(L3_ADDR(la), &dst, sizeof(dst));=0A= la->la_hold =3D NULL;=0A= la->la_numheld =3D 0;=0A= - } /* end of FIB loop */=0A= + LLE_WUNLOCK(la);=0A= +=0A= + /* send packets to output */=0A= + for (; m_hold !=3D NULL; m_hold =3D m_hold_next) {=0A= + m_hold_next =3D m_hold->m_nextpkt;=0A= + m_hold->m_nextpkt =3D NULL;=0A= + (*ifp->if_output)(ifp, m_hold, &dst, NULL);=0A= + }=0A= + }=0A= reply:=0A= if (op !=3D ARPOP_REQUEST)=0A= goto drop;=0A= ARPSTAT_INC(rxrequests);=0A= =0A= + bcopy(ar_sha(ah), ar_tha(ah), ah->ar_hln);=0A= if (itaddr.s_addr =3D=3D myaddr.s_addr) {=0A= /* Shortcut.. the receiving interface is the target. */=0A= - (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);=0A= - (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln);=0A= + bcopy(enaddr, ar_sha(ah), ah->ar_hln);=0A= } else {=0A= struct llentry *lle =3D NULL;=0A= =0A= @@ -762,8 +790,7 @@=0A= IF_AFDATA_UNLOCK(ifp);=0A= =0A= if ((lle !=3D NULL) && (lle->la_flags & LLE_PUB)) {=0A= - (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);=0A= - (void)memcpy(ar_sha(ah), &lle->ll_addr, ah->ar_hln);=0A= + bcopy(&lle->ll_addr, ar_sha(ah), ah->ar_hln);=0A= LLE_RUNLOCK(lle);=0A= } else {=0A= =0A= @@ -790,9 +817,6 @@=0A= }=0A= RTFREE_LOCKED(rt);=0A= =0A= - (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);=0A= - (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln);=0A= -=0A= /*=0A= * Also check that the node which sent the ARP packet=0A= * is on the the interface we expect it to be on. This=0A= @@ -815,6 +839,8 @@=0A= }=0A= RTFREE_LOCKED(rt);=0A= =0A= + bcopy(enaddr, ar_sha(ah), ah->ar_hln);=0A= +=0A= #ifdef DEBUG_PROXY=0A= printf("arp: proxying for %s\n",=0A= inet_ntoa(itaddr));=0A= @@ -835,15 +861,15 @@=0A= /* default behaviour; never reply by broadcast. */=0A= m->m_flags &=3D ~(M_BCAST|M_MCAST);=0A= }=0A= - (void)memcpy(ar_tpa(ah), ar_spa(ah), ah->ar_pln);=0A= - (void)memcpy(ar_spa(ah), &itaddr, ah->ar_pln);=0A= + bcopy(ar_spa(ah), ar_tpa(ah), ah->ar_pln);=0A= + bcopy(&itaddr, ar_spa(ah), ah->ar_pln);=0A= ah->ar_op =3D htons(ARPOP_REPLY);=0A= ah->ar_pro =3D htons(ETHERTYPE_IP); /* let's be sure! */=0A= - m->m_len =3D sizeof(*ah) + (2 * ah->ar_pln) + (2 * ah->ar_hln); =0A= + m->m_len =3D arphdr_len(ah); =0A= m->m_pkthdr.len =3D m->m_len; =0A= - sa.sa_family =3D AF_ARP;=0A= - sa.sa_len =3D 2;=0A= - (*ifp->if_output)(ifp, m, &sa, NULL);=0A= + dst.sa_family =3D AF_ARP;=0A= + dst.sa_len =3D 2;=0A= + (*ifp->if_output)(ifp, m, &dst, NULL);=0A= ARPSTAT_INC(txreplies);=0A= return;=0A= =0A= ------=_NextPart_000_0065_01CB9686.B27BE840-- From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 19:53:43 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F6C3106564A; Tue, 7 Dec 2010 19:53:43 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 465A68FC08; Tue, 7 Dec 2010 19:53:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB7JrhEf047422; Tue, 7 Dec 2010 19:53:43 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB7Jrhd2047418; Tue, 7 Dec 2010 19:53:43 GMT (envelope-from linimon) Date: Tue, 7 Dec 2010 19:53:43 GMT Message-Id: <201012071953.oB7Jrhd2047418@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/152893: [netgraph] [panic] 8.2-PRERELEASE panic in netgraph 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, 07 Dec 2010 19:53:43 -0000 Old Synopsis: 8.2-PRERELEASE panic in NETGRAP New Synopsis: [netgraph] [panic] 8.2-PRERELEASE panic in netgraph Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Tue Dec 7 19:53:11 UTC 2010 Responsible-Changed-Why: reclassify and assign. http://www.freebsd.org/cgi/query-pr.cgi?pr=152893 From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 21:55:02 2010 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 6DC1F10656A3 for ; Tue, 7 Dec 2010 21:55:02 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout028.mac.com (asmtpout028.mac.com [17.148.16.103]) by mx1.freebsd.org (Postfix) with ESMTP id 506728FC19 for ; Tue, 7 Dec 2010 21:55:02 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp028.mac.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 64bit)) with ESMTPSA id <0LD200CT9SPE3C70@asmtp028.mac.com> for freebsd-net@freebsd.org; Tue, 07 Dec 2010 12:53:40 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1010190000 definitions=main-1012070159 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2010-12-07_10:2010-12-07, 2010-12-07, 1970-01-01 signatures=0 From: Chuck Swiger In-reply-to: <4cfe88b6.1cedd80a.33f5.119d@mx.google.com> Date: Tue, 07 Dec 2010 12:53:38 -0800 Message-id: References: <4cfe88b6.1cedd80a.33f5.119d@mx.google.com> To: Rozhuk.IM@gmail.com X-Mailer: Apple Mail (2.1082) Cc: freebsd-net@freebsd.org Subject: Re: [arp] possible DoS, fixes and improvements 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, 07 Dec 2010 21:55:02 -0000 Hi, Rozhuk-- On Dec 7, 2010, at 11:19 AM, rozhuk.im@gmail.com wrote: > Hi! > > 1. ah->ar_hln - is depend from ar_hrd? > Yes, and for ARPHRD_ETHER is 6 (ETHER_ADDR_LEN) > For ARPHRD_IEEE1394 - sizeof(struct fw_hwaddr) > ah->ar_hln ignored in ether_output: bcopy(ar_tha(ah), edst, ETHER_ADDR_LEN); If you know that ar_hrd is ARPHRD_ETHER, then you can either assume the length is ETHER_ADDR_LEN, or optionally check it, per RFC 826: "When an address resolution packet is received, the receiving Ethernet module gives the packet to the Address Resolution module which goes through an algorithm similar to the following. Negative conditionals indicate an end of processing and a discarding of the packet. ?Do I have the hardware type in ar$hrd? Yes: (almost definitely) [optionally check the hardware length ar$hln] ?Do I speak the protocol in ar$pro? Yes: [optionally check the protocol length ar$pln]" > check in in_arpinput: > if (ifp->if_addrlen != ah->ar_hln) { > LLE_WUNLOCK(la); > log(LOG_WARNING, > "arp from %*D: addr len: new %d, i/f %d (ignored)", > ifp->if_addrlen, (u_char *) ar_sha(ah), ":", > ah->ar_hln, ifp->if_addrlen); > goto reply; > } > NO DROP!!!! I wonder which version of netinet/if_ether.c you are working from? In 7-STABLE sources, it breaks rather than going to generate a reply: if (ifp->if_addrlen != ah->ar_hln) { log(LOG_WARNING, "arp from %*D: addr len: " "new %d, i/f %d (ignored)", ifp->if_addrlen, (u_char *) ar_sha(ah), ":", ah->ar_hln, ifp->if_addrlen); RT_UNLOCK(rt); break; } > In reply we get: > (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); > (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln); > Or > (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); > (void)memcpy(ar_sha(ah), &lle->ll_addr, ah->ar_hln); > > How to use it see below. > > > 2. ah->ar_pln - does not checked! > We can make big arp request (512 nulls after struct arphdr + 2*6 + 2*4) , > valid for host, set ar_plt = 255 > And in reply will receive part of stack or core panic: > in_arpinput: > (void)memcpy(ar_spa(ah), &itaddr, ah->ar_pln); > ... > m->m_len = sizeof(*ah) + (2 * ah->ar_pln) + (2 * ah->ar_hln); > ( eq arphdr_len(ah) ) I think I agree that this is not being checked for properly.... Regards, -- -Chuck From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 22:41:30 2010 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 6086C106566B for ; Tue, 7 Dec 2010 22:41:30 +0000 (UTC) (envelope-from w8hdkim@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id ECFED8FC17 for ; Tue, 7 Dec 2010 22:41:29 +0000 (UTC) Received: by wyf19 with SMTP id 19so475560wyf.13 for ; Tue, 07 Dec 2010 14:41:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=T4TeZEhZ9OQACyOXhN4yDywDE7WlufBel6F9v0G6fGM=; b=WOLAu4R3HMlkf0kWa3be+rn8kJg7DWakwWHfvpxr6XfnNMrDF1BVoRBPC3Wm/P7SYs ehpLLXORObDLGjHKUhB5V99uLO3FuIim9Dtd7tJPTE1kPy3IqTmiFJOTV3M/56VLlR/Q NiWtKF7sF4NXO+TJiY0ymQzr4qxpId/owcmEI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lRmGiEfmY9l8Go7uKH7CawF76jz7AwyDHvKVrifIrLGZgqx2MF93LzyTfTY4uaaIRy AxY0Mwby7wMc6+63X4f4XWRnwMFTQ9IRBC85qJHth/IALca2udM+3of4AuOiol5h+jdT eG3LGvPeg5o25Th/dDexRt4ETHO7rU3OBghVc= MIME-Version: 1.0 Received: by 10.227.128.141 with SMTP id k13mr8082447wbs.32.1291760250622; Tue, 07 Dec 2010 14:17:30 -0800 (PST) Received: by 10.227.23.203 with HTTP; Tue, 7 Dec 2010 14:17:30 -0800 (PST) Date: Tue, 7 Dec 2010 17:17:30 -0500 Message-ID: From: Kim Culhan To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 8.2-PRERELESE ifconfig_bridge has no members unless run from rc.local 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, 07 Dec 2010 22:41:30 -0000 Had been running a wireless bridge for some months in rc.conf: ifconfig_bridge0="addm wlan0 addm re1 up" Updated to 8.2-PRERELEASE 2 days ago and when the machine boots the bridge has no members. Reversing the order of the members results in the bridge having just the re1 member. Running the above command from a shell works and running from an rc.local file also works. FWIW, running from a shell there is about a 3 second delay after hit enter before it returns the shell prompt, members are then present. The lines in rc.conf: cloned_interfaces="bridge0" ifconfig_wlan0="inet 192.168.1.50/24 channel 11" wlans_rum0="wlan0" create_args_wlan0="wlanmode hostap mode 11g" ifconfig_bridge0="addm wlan0 addm re1 up" Tried replacing the re device with em, no change. Any help is very greatly appreciated. -kim From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 23:45:55 2010 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 0CECC106564A for ; Tue, 7 Dec 2010 23:45:55 +0000 (UTC) (envelope-from csalgau-br@bitdefender.com) Received: from mail.bitdefender.com (mail.bitdefender.com [91.199.104.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3C7AB8FC17 for ; Tue, 7 Dec 2010 23:45:53 +0000 (UTC) Received: (qmail 17647 invoked from network); 8 Dec 2010 01:45:52 +0200 Received: from 79-112-48-000.iasi.fiberlink.ro (HELO CSalgau3.mshome.net) (csalgau@bitdefender.com@79.112.48.0) by mail.bitdefender.com with AES256-SHA encrypted SMTP; 8 Dec 2010 01:45:51 +0200 Date: Wed, 8 Dec 2010 01:45:40 +0200 From: Mihai-Catalin Salgau X-Priority: 3 (Normal) Message-ID: <234252450.20101208014540@bitdefender.com> CC: freebsd-net@freebsd.org In-Reply-To: <4CFE7946.70209@sentex.net> References: <07255796.20101207031807@bitdefender.com> <4CFE7946.70209@sentex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.118796, SQMD Hits: none, rbl score: 0(0), bayes score: 500(0), pbayes score: 500(0), neunet score: 0(0), flags: [NN_LEGIT_BITDEFENDER], SQMD: 9f67f4c530072e081e6f8010e3c4eddf.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-Scanner: Clean, Agent: BitDefender qmail 3.1.0 on elfie.dsd.hq, sigver: 7.34956 Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 23:45:55 -0000 Hello Mike, Tuesday, December 7, 2010, 8:13:26 PM, you wrote: > Hi, > There were a bunch of changes to RELENG_8's em driver a week ago. > Perhaps update to that first. But what sort of em nics do you have ? > pciconf -lvc will show it. I have a number of boxes with 20 or more > ifconfig | grep ^vlan | wc > 20 120 1562 > Most of which are pcie based, or onboard 82574L types. The Intel card yields: Intel Corporation HP NC360T PCIe DP Gigabit Server Adapter (n1e5132) Done updating and still the same thing:( From owner-freebsd-net@FreeBSD.ORG Tue Dec 7 23:59:15 2010 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 057261065672 for ; Tue, 7 Dec 2010 23:59:15 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1-6.sentex.ca [IPv6:2607:f3e0:0:1::12]) by mx1.freebsd.org (Postfix) with ESMTP id AF63A8FC1E for ; Tue, 7 Dec 2010 23:59:14 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:2c91:fa66:2350:ddab] ([IPv6:2607:f3e0:0:4:2c91:fa66:2350:ddab]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id oB7Nx9Xv021555 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 7 Dec 2010 18:59:09 -0500 (EST) (envelope-from mike@sentex.net) Message-ID: <4CFECA47.50108@sentex.net> Date: Tue, 07 Dec 2010 18:59:03 -0500 From: Mike Tancsa User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Mihai-Catalin Salgau References: <07255796.20101207031807@bitdefender.com> <4CFE7946.70209@sentex.net> <234252450.20101208014540@bitdefender.com> In-Reply-To: <234252450.20101208014540@bitdefender.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org Subject: Re: vlan limits on e1000? 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, 07 Dec 2010 23:59:15 -0000 On 12/7/2010 6:45 PM, Mihai-Catalin Salgau wrote: > Hello Mike, > > Tuesday, December 7, 2010, 8:13:26 PM, you wrote: > >> Hi, >> There were a bunch of changes to RELENG_8's em driver a week ago. >> Perhaps update to that first. But what sort of em nics do you have ? >> pciconf -lvc will show it. I have a number of boxes with 20 or more > >> ifconfig | grep ^vlan | wc >> 20 120 1562 > >> Most of which are pcie based, or onboard 82574L types. > > The Intel card yields: Intel Corporation HP NC360T PCIe DP Gigabit Server Adapter (n1e5132) > Done updating and still the same thing:( Strange, I have that card as well. Strange, I have many of those and they work fine and it works fine for me. How are you creating the vlans ? ie. what is the syntax em1@pci0:1:0:1: class=0x020000 card=0x115e8086 chip=0x105e8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = 'HP NC360T PCIe DP Gigabit Server Adapter (n1e5132)' class = network subclass = ethernet % ifconfig | grep em1 em1: flags=8843 metric 0 mtu 1500 vlan: 5 parent interface: em1 vlan: 770 parent interface: em1 vlan: 71 parent interface: em1 vlan: 73 parent interface: em1 vlan: 77 parent interface: em1 vlan: 155 parent interface: em1 vlan: 260 parent interface: em1 vlan: 107 parent interface: em1 vlan: 352 parent interface: em1 vlan: 522 parent interface: em1 vlan: 501 parent interface: em1 vlan: 543 parent interface: em1 vlan: 145 parent interface: em1 vlan: 250 parent interface: em1 vlan: 262 parent interface: em1 vlan: 872 parent interface: em1 vlan: 390 parent interface: em1 vlan: 58 parent interface: em1 vlan: 63 parent interface: em1 vlan: 740 parent interface: em1 vlan: 603 parent interface: em1 vlan: 1123 parent interface: em1 vlan: 502 parent interface: em1 vlan: 504 parent interface: em1 vlan: 1125 parent interface: em1 ---Mike From owner-freebsd-net@FreeBSD.ORG Wed Dec 8 15:12:07 2010 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 8BAAD106564A for ; Wed, 8 Dec 2010 15:12:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5D2488FC12 for ; Wed, 8 Dec 2010 15:12:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B759246B03; Wed, 8 Dec 2010 10:12:06 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EC3B98A029; Wed, 8 Dec 2010 10:12:05 -0500 (EST) From: John Baldwin To: freebsd-net@freebsd.org Date: Wed, 8 Dec 2010 09:23:30 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012080923.31048.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 08 Dec 2010 10:12:06 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Kim Culhan Subject: Re: 8.2-PRERELESE ifconfig_bridge has no members unless run from rc.local 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: Wed, 08 Dec 2010 15:12:07 -0000 On Tuesday, December 07, 2010 5:17:30 pm Kim Culhan wrote: > Had been running a wireless bridge for some months in rc.conf: > > ifconfig_bridge0="addm wlan0 addm re1 up" > > Updated to 8.2-PRERELEASE 2 days ago and when the machine boots > the bridge has no members. > > Reversing the order of the members results in the bridge having just > the re1 member. > > Running the above command from a shell works and running from > an rc.local file also works. > > FWIW, running from a shell there is about a 3 second delay after hit enter > before it returns the shell prompt, members are then present. > > The lines in rc.conf: > > cloned_interfaces="bridge0" > ifconfig_wlan0="inet 192.168.1.50/24 channel 11" > wlans_rum0="wlan0" > create_args_wlan0="wlanmode hostap mode 11g" > ifconfig_bridge0="addm wlan0 addm re1 up" > > Tried replacing the re device with em, no change. > > Any help is very greatly appreciated. Most likely the bridge0 device is created by /etc/rc.d/netif before the wlan0 device is created, so when the system startup tries to configure bridge0, the ifconfig statement fails. What does 'ifconfig -l' show after you have booted? -- John Baldwin From owner-freebsd-net@FreeBSD.ORG Wed Dec 8 16:29:51 2010 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 515A810656AD for ; Wed, 8 Dec 2010 16:29:51 +0000 (UTC) (envelope-from w8hdkim@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B3F2D8FC1C for ; Wed, 8 Dec 2010 16:29:50 +0000 (UTC) Received: by wyf19 with SMTP id 19so1358598wyf.13 for ; Wed, 08 Dec 2010 08:29:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=L7CAbxWFsX6HejHfoOHBbt9dknrCUttYfbkJa2NpOT8=; b=QB3r4XE23Fs/xZHAdBMKsT2TKg9tbA/vqPkwSbpIv9E7Wad8gS/7gI7NFDE0/pethf 21Sngq80MbUfh3zxOwAeVtDXWzArnIwZhOPKVBjFkHLHxznx7NoAaLj+/HGeeCPC8pIY ffXa2vc/NzIC0drs6LG5f6GUNOeGZX9G6ZL6U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=FFaBUslHNF+Sn95bis+CLXy5+eWduzJGyKX8vyHbqyQSBSfVT3mHH/D+dlM8Y63/uQ ZyOZmyzC+IoX3/+paN1LTXMOipx7pLlqG5hmgOpjZoxZZE6ew6CZKrWfkJYXraqbmqyj 281Ch8oRK9ILcZknQvCXYSUjMwlT3BXBcjCE0= MIME-Version: 1.0 Received: by 10.227.134.201 with SMTP id k9mr9101460wbt.177.1291825789552; Wed, 08 Dec 2010 08:29:49 -0800 (PST) Received: by 10.227.23.203 with HTTP; Wed, 8 Dec 2010 08:29:49 -0800 (PST) In-Reply-To: <201012080923.31048.jhb@freebsd.org> References: <201012080923.31048.jhb@freebsd.org> Date: Wed, 8 Dec 2010 11:29:49 -0500 Message-ID: From: Kim Culhan To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: 8.2-PRERELESE ifconfig_bridge has no members unless run from rc.local 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: Wed, 08 Dec 2010 16:29:51 -0000 On Wed, Dec 8, 2010 at 9:23 AM, John Baldwin wrote: > On Tuesday, December 07, 2010 5:17:30 pm Kim Culhan wrote: > > Had been running a wireless bridge for some months in rc.conf: > > > > ifconfig_bridge0="addm wlan0 addm re1 up" > > > > Updated to 8.2-PRERELEASE 2 days ago and when the machine boots > > the bridge has no members. > > > > Reversing the order of the members results in the bridge having just > > the re1 member. > > > > Running the above command from a shell works and running from > > an rc.local file also works. > > > > FWIW, running from a shell there is about a 3 second delay after hit > enter > > before it returns the shell prompt, members are then present. > > > > The lines in rc.conf: > > > > cloned_interfaces="bridge0" > > ifconfig_wlan0="inet 192.168.1.50/24 channel 11" > > wlans_rum0="wlan0" > > create_args_wlan0="wlanmode hostap mode 11g" > > ifconfig_bridge0="addm wlan0 addm re1 up" > > > > Tried replacing the re device with em, no change. > > > > Any help is very greatly appreciated. > > Most likely the bridge0 device is created by /etc/rc.d/netif before the > wlan0 > device is created, so when the system startup tries to configure bridge0, > the > ifconfig statement fails. > > What does 'ifconfig -l' show after you have booted? > It shows: re0 em0 plip0 lo0 bridge0 On the console at boot there is, after the file partition status and setting the hostname: ifconfig: BRDGADD wlan0: No such file or directory Following this is: Starting Network: lo0 re0 em0 bridge0 Which is followed by output the same as from ifconfig -a including bridge0 which has no members. Next is: Starting Network: rum0 rum0: flags=8843 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 A14661065675 for ; Wed, 8 Dec 2010 18:29:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 739678FC0A for ; Wed, 8 Dec 2010 18:29:30 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 29BC446B38; Wed, 8 Dec 2010 13:29:30 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 491038A009; Wed, 8 Dec 2010 13:29:29 -0500 (EST) From: John Baldwin To: freebsd-net@freebsd.org Date: Wed, 8 Dec 2010 12:58:51 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201012080923.31048.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012081258.51694.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 08 Dec 2010 13:29:29 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Kim Culhan Subject: Re: 8.2-PRERELESE ifconfig_bridge has no members unless run from rc.local 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: Wed, 08 Dec 2010 18:29:30 -0000 On Wednesday, December 08, 2010 11:29:49 am Kim Culhan wrote: > On Wed, Dec 8, 2010 at 9:23 AM, John Baldwin wrote: > > > On Tuesday, December 07, 2010 5:17:30 pm Kim Culhan wrote: > > > Had been running a wireless bridge for some months in rc.conf: > > > > > > ifconfig_bridge0="addm wlan0 addm re1 up" > > > > > > Updated to 8.2-PRERELEASE 2 days ago and when the machine boots > > > the bridge has no members. > > > > > > Reversing the order of the members results in the bridge having just > > > the re1 member. > > > > > > Running the above command from a shell works and running from > > > an rc.local file also works. > > > > > > FWIW, running from a shell there is about a 3 second delay after hit > > enter > > > before it returns the shell prompt, members are then present. > > > > > > The lines in rc.conf: > > > > > > cloned_interfaces="bridge0" > > > ifconfig_wlan0="inet 192.168.1.50/24 channel 11" > > > wlans_rum0="wlan0" > > > create_args_wlan0="wlanmode hostap mode 11g" > > > ifconfig_bridge0="addm wlan0 addm re1 up" > > > > > > Tried replacing the re device with em, no change. > > > > > > Any help is very greatly appreciated. > > > > Most likely the bridge0 device is created by /etc/rc.d/netif before the > > wlan0 > > device is created, so when the system startup tries to configure bridge0, > > the > > ifconfig statement fails. > > > > What does 'ifconfig -l' show after you have booted? > > > It shows: > > re0 em0 plip0 lo0 bridge0 > > On the console at boot there is, after the file partition status and setting > the hostname: > ifconfig: BRDGADD wlan0: No such file or directory > > Following this is: > > Starting Network: lo0 re0 em0 bridge0 > > Which is followed by output the same as from ifconfig -a including bridge0 > which > has no members. > > Next is: > > Starting Network: rum0 > rum0: flags=8843 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 3548A106564A; Wed, 8 Dec 2010 19:25:43 +0000 (UTC) (envelope-from w8hdkim@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8CE5A8FC0C; Wed, 8 Dec 2010 19:25:42 +0000 (UTC) Received: by wwf26 with SMTP id 26so1468252wwf.31 for ; Wed, 08 Dec 2010 11:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=Z9IJ1ynv8m5Za/PTxjy4yPDbAi8HRKYPVRKQSm6VIa8=; b=x2DTF0tAQXeavUwqTLKxPsAzEf7arVJNWq1/UEER3+Z6OTtbaRVabwkHbc8+UEnTWK DhXG3clVwKJmXFKQGnejt3yD23n9PzoIdiCHSgr8mtsm0biiZx65sUGE78ha/bfEPzmQ VU0RKKxjqikWeBdMusg2KD9wrhz6oAzUTtshs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=p2rTCTYzz5bCfZejER9+/XY2Lwp2NIRrOrSKtzy1TxD3rhGA1lxc3CpN/m7+KXMpXy izmoVdWMtNfsUn7LApnfvalk6rs58dNhITHB1hiHI18MmSddkpz0dNsoK9YgAzyIN8rn OHROH0RSEViIq6g2iJMIIHtQLMFW+gsdbEmSs= MIME-Version: 1.0 Received: by 10.227.128.141 with SMTP id k13mr9535680wbs.32.1291836340497; Wed, 08 Dec 2010 11:25:40 -0800 (PST) Received: by 10.227.23.203 with HTTP; Wed, 8 Dec 2010 11:25:40 -0800 (PST) In-Reply-To: <201012081258.51694.jhb@freebsd.org> References: <201012080923.31048.jhb@freebsd.org> <201012081258.51694.jhb@freebsd.org> Date: Wed, 8 Dec 2010 14:25:40 -0500 Message-ID: From: Kim Culhan To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: 8.2-PRERELESE ifconfig_bridge has no members unless run from rc.local 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: Wed, 08 Dec 2010 19:25:43 -0000 On Wed, Dec 8, 2010 at 12:58 PM, John Baldwin wrote: > On Wednesday, December 08, 2010 11:29:49 am Kim Culhan wrote: > > On Wed, Dec 8, 2010 at 9:23 AM, John Baldwin wrote: > > > > > On Tuesday, December 07, 2010 5:17:30 pm Kim Culhan wrote: > > > > Had been running a wireless bridge for some months in rc.conf: > > > > > > > > ifconfig_bridge0="addm wlan0 addm re1 up" > > > > > > > > Updated to 8.2-PRERELEASE 2 days ago and when the machine boots > > > > the bridge has no members. > > > > > > > > Reversing the order of the members results in the bridge having just > > > > the re1 member. > > > > > > > > Running the above command from a shell works and running from > > > > an rc.local file also works. > > > > > > > > FWIW, running from a shell there is about a 3 second delay after hit > > > enter > > > > before it returns the shell prompt, members are then present. > > > > > > > > The lines in rc.conf: > > > > > > > > cloned_interfaces="bridge0" > > > > ifconfig_wlan0="inet 192.168.1.50/24 channel 11" > > > > wlans_rum0="wlan0" > > > > create_args_wlan0="wlanmode hostap mode 11g" > > > > ifconfig_bridge0="addm wlan0 addm re1 up" > > > > > > > > Tried replacing the re device with em, no change. > > > > > > > > Any help is very greatly appreciated. > > > > > > Most likely the bridge0 device is created by /etc/rc.d/netif before the > > > wlan0 > > > device is created, so when the system startup tries to configure > bridge0, > > > the > > > ifconfig statement fails. > > > > > > What does 'ifconfig -l' show after you have booted? > > > > > It shows: > > > > re0 em0 plip0 lo0 bridge0 > > > > On the console at boot there is, after the file partition status and > setting > > the hostname: > > ifconfig: BRDGADD wlan0: No such file or directory > > > > Following this is: > > > > Starting Network: lo0 re0 em0 bridge0 > > > > Which is followed by output the same as from ifconfig -a including > bridge0 > > which > > has no members. > > > > Next is: > > > > Starting Network: rum0 > > rum0: flags=8843 > Hmm, I wonder why rum0 shows up so late. Do you not plug it in until after > boot, or does it depend on devd loading firmware into the device, etc.? > Its plugged in at boot and rum is in the kernel. There is a mention in rum(4) about uploading microcode for the onboard controller. The machine has an Intel D945GCLF2 Atom motherboard, which has been in use for some months without this problem, prior to updating the bits now 4 days ago. There is a second machine running 8.2-PRERELEASE which has a faster core2 quad processor and does not have this problem when run with the same rum device, also updated 4 days ago. This machine has an Intel DG45ID motherboard. Replaced the drive in the Atom machine and installed 8.2-BETA1 thinking a mistake may have been made in the update process over the preceeding weeks to cause this, no change. -kim From owner-freebsd-net@FreeBSD.ORG Thu Dec 9 18:43:51 2010 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 9CAA01065670 for ; Thu, 9 Dec 2010 18:43:51 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [62.231.161.221]) by mx1.freebsd.org (Postfix) with ESMTP id EEF828FC0A for ; Thu, 9 Dec 2010 18:43:50 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.4/8.14.4) with ESMTP id oB9Ihjkt094587; Fri, 10 Dec 2010 00:43:45 +0600 (NOVT) (envelope-from egrosbein@rdtc.ru) Message-ID: <4D01235C.4050803@rdtc.ru> Date: Fri, 10 Dec 2010 00:43:40 +0600 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.1.10) Gecko/20100712 Thunderbird/3.0.5 MIME-Version: 1.0 To: Jack Vogel References: <201011270946271408828@yahoo.com.cn> <20101128081617.GA90332@zibbi.meraka.csir.co.za> <4CF73A2C.7000802@rdtc.ru> <4CF89EE7.8020807@rdtc.ru> <4CF93A77.30804@rdtc.ru> <4CF9470F.4020709@sentex.net> <4CF947D4.10504@rdtc.ru> <4CFA0435.7020100@rdtc.ru> <4CFCCD94.60100@rdtc.ru> In-Reply-To: <4CFCCD94.60100@rdtc.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: bzeeb-lists@lists.zabbadoz.net, Mike Tancsa , freebsd-net Subject: Re: [patch] Bring link down when interface goes down 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: Thu, 09 Dec 2010 18:43:51 -0000 On 06.12.2010 17:48, Eugene Grosbein wrote: > On 04.12.2010 15:08, Jack Vogel wrote: >> This isn't some simple 'go change this line or parameter', >> there were some problematic issues that my Linux coworkers >> faced, I have to go look into it before I even decide... >> >> so...patience friend. > > For igb(4) the change seems pretty short. At least, it works > for my 82576-based dual-port copper card. [skip] > > However, similar patch applied to em(4) does not work > for my on-board 82574L-based cards: e1000_power_down_phy() > thanslates to e1000_power_down_phy_copper_82571() that does nothing > because mac->ops.check_mng_mode(hw) returns true value > and, therefore, e1000_power_down_phy_copper(hw) is not even called. > > Still trying to find a way... I've written a patch for em(4) that works for my 82573L and 82574L-based systems. By default, ifconfig down does not affect link (POLA issue). After sysctl dev.em.0.down_disables_link=1 it does. Still do not know how to disable "management mode" on my cards so patch just ignores it when sysctl turned on. Dirty hack, I guess. --- sys/dev/e1000/if_em.h.orig 2010-12-06 12:45:53.000000000 +0600 +++ sys/dev/e1000/if_em.h 2010-12-08 20:11:05.000000000 +0600 @@ -436,6 +436,9 @@ unsigned long link_irq; struct e1000_hw_stats stats; + + /* Bring link down when interface goes down */ + int down_disables_link; }; /******************************************************************************** --- sys/dev/e1000/if_em.c.orig 2010-12-06 12:47:51.000000000 +0600 +++ sys/dev/e1000/if_em.c 2010-12-08 20:46:02.000000000 +0600 @@ -452,6 +452,13 @@ OID_AUTO, "debug", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, em_sysctl_debug_info, "I", "Debug Information"); + adapter->down_disables_link = 0; + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "down_disables_link", CTLTYPE_INT|CTLFLAG_RW, + &adapter->down_disables_link, adapter->down_disables_link, + "Bring link down when interface goes down"); + callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); /* Determine hardware and mac info */ @@ -1266,6 +1273,8 @@ } /* Initialize the hardware */ + if (!adapter->hw.phy.reset_disable) + e1000_phy_hw_reset(&adapter->hw); em_reset(adapter); em_update_link_status(adapter); @@ -2319,6 +2328,19 @@ e1000_led_off(&adapter->hw); e1000_cleanup_led(&adapter->hw); + + if(adapter->down_disables_link) { + /* Bring physical link down by powering the phy down */ +/* e1000_power_down_phy(&adapter->hw); */ + e1000_power_down_phy_copper(&adapter->hw); + + /* Update system interface state */ + adapter->hw.mac.get_link_status = 1; + em_update_link_status(adapter); + + /* Reset the phy next time init gets called */ + adapter->hw.phy.reset_disable = FALSE; + } } From owner-freebsd-net@FreeBSD.ORG Thu Dec 9 19:25:59 2010 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 DE08C106566B for ; Thu, 9 Dec 2010 19:25:59 +0000 (UTC) (envelope-from john.giacomoni@lineratesystems.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id B9D1F8FC17 for ; Thu, 9 Dec 2010 19:25:59 +0000 (UTC) Received: by pvc22 with SMTP id 22so646828pvc.13 for ; Thu, 09 Dec 2010 11:25:59 -0800 (PST) Received: by 10.142.157.7 with SMTP id f7mr4457601wfe.335.1291921199585; Thu, 09 Dec 2010 10:59:59 -0800 (PST) Received: from [10.126.1.135] (74-95-119-238-Colorado.hfc.comcastbusiness.net [74.95.119.238]) by mx.google.com with ESMTPS id v19sm2867583wfh.0.2010.12.09.10.59.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Dec 2010 10:59:58 -0800 (PST) From: John Giacomoni Content-Type: multipart/mixed; boundary=Apple-Mail-705-81382347 Date: Thu, 9 Dec 2010 11:59:54 -0700 Message-Id: To: freebsd-net@freebsd.org Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: connections stuck in SYN_SENT problem (re: kern/138046) 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: Thu, 09 Dec 2010 19:25:59 -0000 --Apple-Mail-705-81382347 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Does anyone have a copy of the example program found in kern/138046 (404 = is returned) or validated if reported SYN_SENT bugs are valid? The other day we ran into a similar looking problem where we had = connections stuck in the SYN_SENT state and would like to compare the = two situations. Thanks, John G -- Founder John.Giacomoni@LineRateSystems.com Mobile: 303.931.2843 LineRate Systems --Apple-Mail-705-81382347 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail-705-81382347-- From owner-freebsd-net@FreeBSD.ORG Thu Dec 9 21:16:25 2010 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 16CB2106564A for ; Thu, 9 Dec 2010 21:16:25 +0000 (UTC) (envelope-from john.giacomoni@lineratesystems.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id C4DB08FC17 for ; Thu, 9 Dec 2010 21:16:24 +0000 (UTC) Received: by qyk36 with SMTP id 36so2531502qyk.13 for ; Thu, 09 Dec 2010 13:16:24 -0800 (PST) Received: by 10.224.179.76 with SMTP id bp12mr8548762qab.264.1291929383847; Thu, 09 Dec 2010 13:16:23 -0800 (PST) Received: from [10.126.1.135] (74-95-119-238-Colorado.hfc.comcastbusiness.net [74.95.119.238]) by mx.google.com with ESMTPS id t17sm1454996qcp.26.2010.12.09.13.16.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Dec 2010 13:16:23 -0800 (PST) From: John Giacomoni Content-Type: multipart/mixed; boundary=Apple-Mail-725-89566200 Date: Thu, 9 Dec 2010 14:16:18 -0700 Message-Id: <4C3D19CF-0540-4AFB-824F-AAF5E7DB9F96@LineRateSystems.com> To: freebsd-net@freebsd.org Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Missing transition from TCPS_SYN_SENT to TCPS_CLOSED in tcp_drop? 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: Thu, 09 Dec 2010 21:16:25 -0000 --Apple-Mail-725-89566200 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii I'm curious, why is there an explicit check in tcp_drop (FreeBSD 7.3) = that prevents a connection in the TCPS_SYN_SENT from transitioning to = the TCPS_CLOSED state? The check seems to run against the logical transition in the TCP state = diagram in Stevens. Thanks, John G -- Founder John.Giacomoni@LineRateSystems.com Mobile: 303.931.2843 LineRate Systems --Apple-Mail-725-89566200 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail-725-89566200-- From owner-freebsd-net@FreeBSD.ORG Thu Dec 9 21:18:43 2010 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 EAA251065670 for ; Thu, 9 Dec 2010 21:18:43 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 31DBA8FC14 for ; Thu, 9 Dec 2010 21:18:42 +0000 (UTC) Received: by wwf26 with SMTP id 26so2752388wwf.31 for ; Thu, 09 Dec 2010 13:18:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:reply-to:from:to:cc :references:in-reply-to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:thread-index :content-language; bh=Co5nnXk+bcvsw+ZgXcnoBJYJ82EICYw3S33vC5QUtic=; b=IlKlq2iPoV1SKGh88NwPO+azxIX9/+hB/LtFScoxoTT5YwNE+26DVhcnLO+zuTc78I 7zsLHs9fEk6cYIKZATifZD3tR05DD5vM85UrWo61T0fbXAlOBRxX33lPwYnSQrvL9wvP HrrsoxWfq3C6jmESnHoRND7IE2LuUG8fabwBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; b=Eouq6KM8/bowTZ99cK+SRRIh6hwVF5aQb7A/B3t8QwvNh8v1fws4K+eiIfEtXmnxr3 t4aKTmcIowaVgnqenkSYqu9YCjrpaPg2iqLdBvXzOl1ZCiDrLs4LZWtrPzn+KdEJXhkH 4he1NblwgM+eLxLeI0K3Gq16E2wMcCSVS6itU= Received: by 10.227.136.15 with SMTP id p15mr10201149wbt.124.1291927800286; Thu, 09 Dec 2010 12:50:00 -0800 (PST) Received: from rimwks1x64 ([92.124.9.131]) by mx.google.com with ESMTPS id 11sm1534320wbi.0.2010.12.09.12.49.57 (version=SSLv3 cipher=RC4-MD5); Thu, 09 Dec 2010 12:49:59 -0800 (PST) From: rozhuk.im@gmail.com To: "'Chuck Swiger'" References: <4cfe88b6.1cedd80a.33f5.119d@mx.google.com> In-Reply-To: Date: Fri, 10 Dec 2010 04:49:54 +0800 Message-ID: <4d0140f7.4b02e30a.7efb.7963@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcuWUOOW+QSJMKZqQW2X4ll10edqdABkVYFg Content-Language: ru Cc: freebsd-net@freebsd.org Subject: RE: [arp] possible DoS, fixes and improvements X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2010 21:18:44 -0000 Hi! > I wonder which version of netinet/if_ether.c you are working from? uname -a FreeBSD firewall 9.0-CURRENT FreeBSD 9.0-CURRENT #2: Wed Dec 8 02:53:50 IRKT 2010 root@firewall:/usr/obj/usr/src/sys/RIMx64 amd64 =A0 -- Rozhuk Ivan =A0=20 > -----Original Message----- > From: Chuck Swiger [mailto:cswiger@mac.com] > Sent: Wednesday, December 08, 2010 4:54 AM > To: Rozhuk.IM@gmail.com > Cc: freebsd-net@freebsd.org > Subject: Re: [arp] possible DoS, fixes and improvements >=20 > Hi, Rozhuk-- >=20 > On Dec 7, 2010, at 11:19 AM, rozhuk.im@gmail.com wrote: > > Hi! > > > > 1. ah->ar_hln - is depend from ar_hrd? > > Yes, and for ARPHRD_ETHER is 6 (ETHER_ADDR_LEN) > > For ARPHRD_IEEE1394 - sizeof(struct fw_hwaddr) > > ah->ar_hln ignored in ether_output: bcopy(ar_tha(ah), edst, > ETHER_ADDR_LEN); >=20 > If you know that ar_hrd is ARPHRD_ETHER, then you can either assume = the > length is ETHER_ADDR_LEN, or optionally check it, per RFC 826: >=20 > "When an address resolution packet is received, the receiving > Ethernet module gives the packet to the Address Resolution module > which goes through an algorithm similar to the following. > Negative conditionals indicate an end of processing and a > discarding of the packet. >=20 > ?Do I have the hardware type in ar$hrd? > Yes: (almost definitely) > [optionally check the hardware length ar$hln] > ?Do I speak the protocol in ar$pro? > Yes: > [optionally check the protocol length ar$pln]" >=20 > > check in in_arpinput: > > if (ifp->if_addrlen !=3D ah->ar_hln) { > > LLE_WUNLOCK(la); > > log(LOG_WARNING, > > "arp from %*D: addr len: new %d, i/f %d > (ignored)", > > ifp->if_addrlen, (u_char *) ar_sha(ah), ":", > > ah->ar_hln, ifp->if_addrlen); > > goto reply; > > } > > NO DROP!!!! >=20 > I wonder which version of netinet/if_ether.c you are working from? > In 7-STABLE sources, it breaks rather than going to generate a reply: >=20 > if (ifp->if_addrlen !=3D ah->ar_hln) { > log(LOG_WARNING, > "arp from %*D: addr len: " > "new %d, i/f %d (ignored)", > ifp->if_addrlen, (u_char *) > ar_sha(ah), > ":", ah->ar_hln, ifp->if_addrlen); > RT_UNLOCK(rt); > break; > } >=20 > > In reply we get: > > (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); > > (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln); > > Or > > (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); > > (void)memcpy(ar_sha(ah), &lle->ll_addr, ah->ar_hln); > > > > How to use it see below. > > > > > > 2. ah->ar_pln - does not checked! > > We can make big arp request (512 nulls after struct arphdr + 2*6 + > 2*4) , > > valid for host, set ar_plt =3D 255 > > And in reply will receive part of stack or core panic: > > in_arpinput: > > (void)memcpy(ar_spa(ah), &itaddr, ah->ar_pln); > > ... > > m->m_len =3D sizeof(*ah) + (2 * ah->ar_pln) + (2 * ah->ar_hln); > > ( eq arphdr_len(ah) ) >=20 > I think I agree that this is not being checked for properly.... >=20 > Regards, > -- > -Chuck