From owner-freebsd-net@FreeBSD.ORG Sun Nov 7 01:48:09 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29D3816A4CE for ; Sun, 7 Nov 2004 01:48:09 +0000 (GMT) Received: from sxm.trinetworks.com (sxm.trinetworks.com [64.73.235.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0149543D49 for ; Sun, 7 Nov 2004 01:48:09 +0000 (GMT) (envelope-from freebsd@trinetworks.com) Received: from sxm.trinetworks.com (localhost.trinetworks.com [127.0.0.1]) by sxm.trinetworks.com (8.12.10/8.12.10) with ESMTP id iA71stVe007488 for ; Sat, 6 Nov 2004 17:54:55 -0800 (PST) (envelope-from freebsd@trinetworks.com) Received: (from nobody@localhost) by sxm.trinetworks.com (8.12.10/8.12.10/Submit) id iA71stO7007487; Sat, 6 Nov 2004 17:54:55 -0800 (PST) (envelope-from freebsd@trinetworks.com) X-Authentication-Warning: sxm.trinetworks.com: nobody set sender to freebsd@trinetworks.com using -f Received: from 24-25-209-32.san.rr.com ([24.25.209.32]) (SquirrelMail authenticated user freebsd); by mail.trinetworks.com with HTTP; Sat, 6 Nov 2004 17:54:55 -0800 (PST) Message-ID: <1903.24.25.209.32.1099792495.squirrel@24.25.209.32> Date: Sat, 6 Nov 2004 17:54:55 -0800 (PST) From: "Matthew T. Lager" To: freebsd-net@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: 5.3-RELEASE w/ IPSEC & RACOON X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 07 Nov 2004 01:48:09 -0000 Good Morning! I have a simple tunnel established between two FreeBSD machines. The tunnel is encrypted using IPSEC and Racoon. Prior to 5.3-*, I have never experienced any issues with it. Using the same configuration in 5.3-*, the tunnel is still established and simple traffic can be sent across the tunnel. When a sudden burst of packets is sent through the tunnel, that particular connection completly and permanantly freezes. An example of this is a simple SSH session to another FreeBSD machine where a dmesg is issued. About 5 lines into the dmesg, the connection freezes up. I have read a lot about the MPSAFE/GIANT situation in 5.3-*, and noticed that my kernel warned me that MPSAFE was forced to be disabled due to IPSEC's requirement to be in a GIANT-LOCKED environment. I havn't yet determined that this particular issue is what is causing my problems. When racoon is disabled and IPSEC is removed from the kernel, I do not experience this issue. Does anyone have any ideas or information? Thanks in advance! Matt Lager From owner-freebsd-net@FreeBSD.ORG Mon Nov 8 11:02:00 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5703116A4D6 for ; Mon, 8 Nov 2004 11:02:00 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4935343D46 for ; Mon, 8 Nov 2004 11:02:00 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id iA8B20e1010245 for ; Mon, 8 Nov 2004 11:02:00 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iA8B1xkn010239 for freebsd-net@freebsd.org; Mon, 8 Nov 2004 11:01:59 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 8 Nov 2004 11:01:59 GMT Message-Id: <200411081101.iA8B1xkn010239@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-net@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 08 Nov 2004 11:02:00 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2002/07/26] kern/41007 net overfull traffic on third and fourth adap o [2003/10/14] kern/57985 net [patch] Missing splx in ether_output_fram 2 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/02/08] kern/24959 net proper TCP_NOPUSH/TCP_CORK compatibility o [2003/07/11] kern/54383 net [nfs] [patch] NFS root configurations wit 2 problems total. From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 00:37:02 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D12D916A4CE for ; Tue, 9 Nov 2004 00:37:02 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1755343D3F for ; Tue, 9 Nov 2004 00:37:02 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) iA90awaI094955 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Tue, 9 Nov 2004 01:36:59 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id iA90Zqsu024073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 9 Nov 2004 01:35:53 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id iA90ZqxC002343 for ; Tue, 9 Nov 2004 01:35:52 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id iA90ZqZX002342 for freebsd-net@freebsd.org; Tue, 9 Nov 2004 01:35:52 +0100 (CET) (envelope-from ticso) Date: Tue, 9 Nov 2004 01:35:52 +0100 From: Bernd Walter To: freebsd-net@freebsd.org Message-ID: <20041109003551.GG98623@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de Subject: close_wait state lost? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 00:37:03 -0000 [89]cicely13# tcpdump -n port 502 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on tx0, link-type EN10MB (Ethernet), capture size 96 bytes 00:44:07.031278 IP 10.1.1.15.60646 > 10.1.1.245.502: S 428196572:428196572(0) win 65535 00:44:07.048388 IP 10.1.1.245.502 > 10.1.1.15.60646: S 1000000:1000000(0) ack 428196573 win 3216 00:44:07.048837 IP 10.1.1.15.60646 > 10.1.1.245.502: . ack 1 win 65535 00:44:07.050228 IP 10.1.1.15.60646 > 10.1.1.245.502: P 1:7(6) ack 1 win 65535 00:44:07.052560 IP 10.1.1.15.60646 > 10.1.1.245.502: P 7:12(5) ack 1 win 65535 00:44:07.063431 IP 10.1.1.245.502 > 10.1.1.15.60646: . ack 7 win 3210 00:44:07.073372 IP 10.1.1.245.502 > 10.1.1.15.60646: . ack 12 win 3211 00:44:07.084658 IP 10.1.1.245.502 > 10.1.1.15.60646: P 1:7(6) ack 12 win 3216 00:44:07.091685 IP 10.1.1.245.502 > 10.1.1.15.60646: P 7:33(26) ack 12 win 3216 00:44:07.092031 IP 10.1.1.15.60646 > 10.1.1.245.502: . ack 33 win 65535 00:44:07.096082 IP 10.1.1.15.60646 > 10.1.1.245.502: P 12:18(6) ack 33 win 65535 00:44:07.098019 IP 10.1.1.245.502 > 10.1.1.15.60646: F 33:33(0) ack 12 win 3216 00:44:07.099479 IP 10.1.1.15.60646 > 10.1.1.245.502: P 18:23(5) ack 33 win 65535 00:44:07.116718 IP 10.1.1.245.502 > 10.1.1.15.60646: . ack 23 win 3205 ^C 14 packets captured 134 packets received by filter 0 packets dropped by kernel [90]cicely13# netstat -an | grep 502 tcp4 0 0 10.1.1.15.60646 10.1.1.245.502 ESTABLISHED The server is running Ethernut Nut/OS and does a close on the connect after each transaction for sparse resource reasons. The client was a month old 6.0-current (also verified with a march 5.2-current). The client application establishes a new connection, enables TCP_NODELAY and tries to cache the connection. It does two write(2) (6 byte then 5 byte in the above case) calls and then 2 read(2) calls for each transaction. The first transaction wents fine with the fresh connection. Normaly the client should notice the dropped connection and reconnect, but instead succeds in both write calls. The client is then stuck in the first read(2) call. I would have expected at least the read to fail, because this one waits for either data or connection drop. But also the server already had send a FIN it does ack a data packet later and I see the connection as established under netstat. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 03:52:05 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88DE516A4CE; Tue, 9 Nov 2004 03:52:05 +0000 (GMT) Received: from wyvern.icir.org (wyvern.icir.org [192.150.187.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 655F743D46; Tue, 9 Nov 2004 03:52:05 +0000 (GMT) (envelope-from mallman@icir.org) Received: from guns.icir.org (adsl-68-76-113-50.dsl.bcvloh.ameritech.net [68.76.113.50]) by wyvern.icir.org (8.12.9p1/8.12.8) with ESMTP id iA93q4D3085455; Mon, 8 Nov 2004 19:52:04 -0800 (PST) (envelope-from mallman@icir.org) Received: from lawyers.icir.org (guns.icir.org [68.76.113.50]) by guns.icir.org (Postfix) with ESMTP id 68B3F77AD0D; Mon, 8 Nov 2004 22:52:02 -0500 (EST) Received: from lawyers.icir.org (localhost [127.0.0.1]) by lawyers.icir.org (Postfix) with ESMTP id 9ED891FB5E2; Mon, 8 Nov 2004 22:52:03 -0500 (EST) To: Randall Stewart From: Mark Allman In-Reply-To: <417A5B28.9080308@stewart.chicago.il.us> Organization: ICSI Center for Internet Research (ICIR) Song-of-the-Day: Back in Black MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Date: Mon, 08 Nov 2004 22:52:03 -0500 Sender: mallman@icir.org Message-Id: <20041109035203.9ED891FB5E2@lawyers.icir.org> cc: freebsd-net@freebsd.org cc: Andre Oppermann cc: freebsd-arch@freebsd.org Subject: Re: Removing T/TCP and replacing it with something simpler X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mallman@icir.org List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 03:52:05 -0000 --=-=-= Content-Type: text/plain (catching up ...) > I would rather have Andre work with me to get any other > rinkles out of SCTP that he deems are there... and get the > KAME-SCTP stack ported directly in to FreeBSD.. this IMO ... would > make more sense... Get something that is pretty well baked (IMO at > least) and work to get it "productionized" (even though I don't > feel it needs much work in this vein)... I do not prefer xor. I agree that it'd be nice if SCTP was rolled into freebsd. But, these things seem orthogonal to me. allman -- Mark Allman -- ICIR -- http://www.icir.org/mallman/ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFBkD7jWyrrWs4yIs4RAo8UAJ9FV5ntNoD9L3PqIa1X5jj5gVpupACfUvC5 VFAjdGGFocvL54rph/JV5uI= =7iGy -----END PGP SIGNATURE----- --=-=-=-- From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 08:00:11 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3EF116A4CE for ; Tue, 9 Nov 2004 08:00:11 +0000 (GMT) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A9ED43D39 for ; Tue, 9 Nov 2004 08:00:10 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id iA9807sw067650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 9 Nov 2004 11:00:08 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id iA9806Ef042161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Nov 2004 11:00:07 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id iA9806ZX042160; Tue, 9 Nov 2004 11:00:06 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Tue, 9 Nov 2004 11:00:06 +0300 From: Gleb Smirnoff To: Pawel Malachowski Message-ID: <20041109080006.GD41761@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , Pawel Malachowski , freebsd-net@freebsd.org References: <20041026153108.GA91134@shellma.zin.lublin.pl> <20041028113808.GB50262@cell.sick.ru> <20041028131316.GA73157@shellma.zin.lublin.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20041028131316.GA73157@shellma.zin.lublin.pl> User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20041013, clamav-milter version 0.75l on 127.0.0.1 X-Virus-Status: Clean cc: freebsd-net@freebsd.org Subject: Re: PPTP/PPPoE mpd/poptop performance X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 08:00:11 -0000 On Thu, Oct 28, 2004 at 03:13:16PM +0200, Pawel Malachowski wrote: P> > I'd suggest to choose PPPoE, not PPTP, because the latter is quite P> > complicated and violated by some client implementation. You will P> > not find any problems with PPPoE, since ng_pppoe is compatible with P> > all known PPPoE implementations. P> P> This is what I am currently looking at. I am considering PPTP only because P> client is already available in Windows machines for free. While in XP PPPoE P> is already in, I don't see free PPPoE clients for Win9x. P> I am a bit worried about behaviour in lossy WiFi environments; I'll give it P> a try in free time, I guess. Sorry for late reply. We recommend to use RASPPPoE for winboxes. It is stable and nice software. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 08:29:06 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC61516A4CE; Tue, 9 Nov 2004 08:29:06 +0000 (GMT) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1FE143D54; Tue, 9 Nov 2004 08:29:05 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id iA98T4qw068240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 9 Nov 2004 11:29:04 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id iA98T3Bf042504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Nov 2004 11:29:04 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id iA98T3K2042503; Tue, 9 Nov 2004 11:29:03 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Tue, 9 Nov 2004 11:29:03 +0300 From: Gleb Smirnoff To: andre@freebsd.org Message-ID: <20041109082903.GA42446@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20041013, clamav-milter version 0.75l on 127.0.0.1 X-Virus-Status: Clean cc: net@freebsd.org Subject: ng_ksocket as divert socket is broken X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 08:29:06 -0000 Andre, I've recently noticed a regression between RELENG_5 and CURRENT. In CURRENT ng_ksocket is unable to work as divert socket. Since you have touched divert code recently I'm asking you. Today I'm going to dig deeply there, but probably you can give some ideas without investigation. A test for this functionality looks like this: /usr/sbin/ngctl -f- <<-SEQ mkpeer echo dummy dummy name .:dummy echo_div mkpeer echo_div: ksocket echo inet/raw/divert name echo_div:echo div_sock rmhook dummy msg div_sock: bind inet/0.0.0.0:8888 SEQ ipfw add 1000 divert 8888 all from any to any via fxp0 And packets should flow thru fxp0 in both directions. Do not try lo0, there are some problems in there. You also need this patch (going to commit it soon), if you are running INVARIANTS: --- ip_divert.c 25 Oct 2004 20:02:34 -0000 1.106 +++ ip_divert.c 9 Nov 2004 08:27:24 -0000 @@ -277,7 +277,7 @@ struct divert_tag *dt; int error = 0; - KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null")); + m->m_pkthdr.rcvif = NULL; if (control) m_freem(control); /* XXX */ -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 09:27:29 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AED216A4CE for ; Tue, 9 Nov 2004 09:27:29 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B69E43D54 for ; Tue, 9 Nov 2004 09:27:28 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 35975 invoked from network); 9 Nov 2004 09:22:42 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 9 Nov 2004 09:22:42 -0000 Message-ID: <41908D80.8EAEF656@freebsd.org> Date: Tue, 09 Nov 2004 10:27:28 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: mallman@icir.org References: <20041109035203.9ED891FB5E2@lawyers.icir.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-net@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: Removing T/TCP and replacing it with something simpler X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 09:27:29 -0000 Mark Allman wrote: > > (catching up ...) > > > I would rather have Andre work with me to get any other > > rinkles out of SCTP that he deems are there... and get the > > KAME-SCTP stack ported directly in to FreeBSD.. this IMO ... would > > make more sense... Get something that is pretty well baked (IMO at > > least) and work to get it "productionized" (even though I don't > > feel it needs much work in this vein)... > > I do not prefer xor. > > I agree that it'd be nice if SCTP was rolled into freebsd. But, these > things seem orthogonal to me. The author of the BSD SCTP code is working on a direct FreeBSD native port (no KAME detour to take). -- Andre From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 11:05:55 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F252016A4CE for ; Tue, 9 Nov 2004 11:05:54 +0000 (GMT) Received: from mailbox.rainbownet.com (mailbox.rainbownet.com [213.174.191.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABBB943D46 for ; Tue, 9 Nov 2004 11:05:51 +0000 (GMT) (envelope-from aturetta@commit.it) Received: from 192.168.43.85 ([151.38.10.253]) (authenticated user aturetta@rainbownet.com) by rainbownet.com (mailbox.rainbownet.com [127.0.0.1]) (MDaemon.PRO.v6.8.5.R) with ESMTP id 23-md50000001046.tmp for ; Tue, 09 Nov 2004 12:04:49 +0100 Message-ID: <4190A452.1060303@commit.it> Date: Tue, 09 Nov 2004 12:04:50 +0100 From: Angelo Turetta User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Matthew T. Lager" References: <1903.24.25.209.32.1099792495.squirrel@24.25.209.32> In-Reply-To: <1903.24.25.209.32.1099792495.squirrel@24.25.209.32> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: aturetta@rainbownet.com X-Spam-Processed: mailbox.rainbownet.com, Tue, 09 Nov 2004 12:04:49 +0100 (not processed: message from valid local sender) X-MDRemoteIP: 151.38.10.253 X-Return-Path: aturetta@commit.it X-MDaemon-Deliver-To: freebsd-net@freebsd.org cc: freebsd-net@freebsd.org Subject: Re: 5.3-RELEASE w/ IPSEC & RACOON X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 11:05:55 -0000 Matthew T. Lager wrote: > Using the same configuration in 5.3-*, the tunnel is still established and > simple traffic can be sent across the tunnel. When a sudden burst of > packets is sent through the tunnel, that particular connection completly > and permanantly freezes. An example of this is a simple SSH session to > another FreeBSD machine where a dmesg is issued. About 5 lines into the > dmesg, the connection freezes up. > > Does anyone have any ideas or information? Thanks in advance! > > Matt Lager I once have seen a similar problem, and after a lot of tcpdump I found something I don't know all the exact details about, but I'll try to explain in non-technical language :-(. Apparently, sometimes a TCP packet is so full that after adding the ESP headers it's length exceeds the MTU. The IPSEC layer should fragment it transparently, while the receiving side reassemble the pieces and normally nobody notices. In my case, the remote side was a commercial firewall which actually blocked the fragments, hanging the TCP connection. To solve the problem I had to MSS-CLAMP all the TCP trafic between the two subnets. I don't know what filters you may have between your two bridge-head servers, but I advice you to tcpdump on the external interfaces of both sides, looking for strange packets. Hope this helps, Angelo Turetta From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 12:59:33 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78D6916A4CE for ; Tue, 9 Nov 2004 12:59:33 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD35143D2F for ; Tue, 9 Nov 2004 12:59:30 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id BA49E653B5; Tue, 9 Nov 2004 12:59:28 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02807-04-11; Tue, 9 Nov 2004 12:59:28 +0000 (GMT) Received: from empiric.dek.spc.org (adsl-64-171-185-59.dsl.snfc21.pacbell.net [64.171.185.59]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id BCC4965381; Tue, 9 Nov 2004 12:59:27 +0000 (GMT) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 917FB6482; Tue, 9 Nov 2004 04:59:16 -0800 (PST) Date: Tue, 9 Nov 2004 04:59:16 -0800 From: Bruce M Simpson To: "Marc G. Fournier" Message-ID: <20041109125916.GA3114@empiric.icir.org> Mail-Followup-To: "Marc G. Fournier" , freebsd-net@freebsd.org References: <20041106003028.F46679@ganymede.hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041106003028.F46679@ganymede.hub.org> cc: freebsd-net@freebsd.org Subject: Re: "bug" with ifconfig ... ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 12:59:33 -0000 On Sat, Nov 06, 2004 at 12:31:15AM -0400, Marc G. Fournier wrote: > "Remove the network address specified.", to me, means that if one isn't > specified, nothing should/would happen :( Intentional: %%% delete Another name for the -alias parameter. %%% Basically, delete or alias without an argument will remove the address(es) configured on the interface for the default address family (almost always inet, i.e. IPv4). This is something I've used for years, but I have always taken it to mean 'the very last address configured'. BMS From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 14:32:10 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF4E116A4CE for ; Tue, 9 Nov 2004 14:32:10 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AC7843D45 for ; Tue, 9 Nov 2004 14:32:10 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) iA9EW6aI020140 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Tue, 9 Nov 2004 15:32:07 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id iA9EUusu028759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 9 Nov 2004 15:30:57 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id iA9EUupJ006726 for ; Tue, 9 Nov 2004 15:30:56 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id iA9EUu96006725 for freebsd-net@freebsd.org; Tue, 9 Nov 2004 15:30:56 +0100 (CET) (envelope-from ticso) Date: Tue, 9 Nov 2004 15:30:55 +0100 From: Bernd Walter To: freebsd-net@freebsd.org Message-ID: <20041109143054.GI98623@cicely12.cicely.de> References: <20041109003551.GG98623@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041109003551.GG98623@cicely12.cicely.de> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de Subject: Re: close_wait state lost! X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 14:32:11 -0000 On Tue, Nov 09, 2004 at 01:35:52AM +0100, Bernd Walter wrote: > [89]cicely13# tcpdump -n port 502 > tcpdump: verbose output suppressed, use -v or -vv for full protocol decode > listening on tx0, link-type EN10MB (Ethernet), capture size 96 bytes > 00:44:07.031278 IP 10.1.1.15.60646 > 10.1.1.245.502: S 428196572:428196572(0) win 65535 > 00:44:07.048388 IP 10.1.1.245.502 > 10.1.1.15.60646: S 1000000:1000000(0) ack 428196573 win 3216 > 00:44:07.048837 IP 10.1.1.15.60646 > 10.1.1.245.502: . ack 1 win 65535 > 00:44:07.050228 IP 10.1.1.15.60646 > 10.1.1.245.502: P 1:7(6) ack 1 win 65535 > 00:44:07.052560 IP 10.1.1.15.60646 > 10.1.1.245.502: P 7:12(5) ack 1 win 65535 > 00:44:07.063431 IP 10.1.1.245.502 > 10.1.1.15.60646: . ack 7 win 3210 > 00:44:07.073372 IP 10.1.1.245.502 > 10.1.1.15.60646: . ack 12 win 3211 > 00:44:07.084658 IP 10.1.1.245.502 > 10.1.1.15.60646: P 1:7(6) ack 12 win 3216 > 00:44:07.091685 IP 10.1.1.245.502 > 10.1.1.15.60646: P 7:33(26) ack 12 win 3216 > 00:44:07.092031 IP 10.1.1.15.60646 > 10.1.1.245.502: . ack 33 win 65535 > 00:44:07.096082 IP 10.1.1.15.60646 > 10.1.1.245.502: P 12:18(6) ack 33 win 65535 > 00:44:07.098019 IP 10.1.1.245.502 > 10.1.1.15.60646: F 33:33(0) ack 12 win 3216 > 00:44:07.099479 IP 10.1.1.15.60646 > 10.1.1.245.502: P 18:23(5) ack 33 win 65535 > 00:44:07.116718 IP 10.1.1.245.502 > 10.1.1.15.60646: . ack 23 win 3205 > ^C > 14 packets captured > 134 packets received by filter > 0 packets dropped by kernel > [90]cicely13# netstat -an | grep 502 > tcp4 0 0 10.1.1.15.60646 10.1.1.245.502 ESTABLISHED > > > The server is running Ethernut Nut/OS and does a close on the connect > after each transaction for sparse resource reasons. > The client was a month old 6.0-current (also verified with a march > 5.2-current). > The client application establishes a new connection, enables > TCP_NODELAY and tries to cache the connection. > It does two write(2) (6 byte then 5 byte in the above case) calls and > then 2 read(2) calls for each transaction. > The first transaction wents fine with the fresh connection. > Normaly the client should notice the dropped connection and reconnect, > but instead succeds in both write calls. > The client is then stuck in the first read(2) call. > I would have expected at least the read to fail, because this one waits > for either data or connection drop. > But also the server already had send a FIN it does ack a data packet > later and I see the connection as established under netstat. I think this is a bug in FreeBSD somewhere. The write calls suceeding and the acking of them by the server is OK, because we still have a half closed connection. But it is not OK for FreeBSD to loose the information about the close_wait state and therefor block in the read call. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 16:49:53 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE9DE16A565 for ; Tue, 9 Nov 2004 16:49:53 +0000 (GMT) Received: from ms-dienst.rz.rwth-aachen.de (ms-1.rz.RWTH-Aachen.DE [134.130.3.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 465D743D49 for ; Tue, 9 Nov 2004 16:49:53 +0000 (GMT) (envelope-from chris@unixpages.org) Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0I6X00EXP833VX@ms-dienst.rz.rwth-aachen.de> for net@freebsd.org; Tue, 09 Nov 2004 17:49:52 +0100 (MET) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Tue, 09 Nov 2004 17:49:49 +0100 (MET) Received: from haakonia.hitnet.rwth-aachen.de (haakonia.hitnet.RWTH-Aachen.DE [137.226.181.92])iA9GnmTp024191 for ; Tue, 09 Nov 2004 17:49:48 +0100 (MET) Received: from gondor.middleearth (gondor.middleearth [192.168.1.42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))(Postfix) with ESMTP id 1219628445 for ; Tue, 09 Nov 2004 17:49:43 +0100 (CET) Received: by gondor.middleearth (Postfix, from userid 1001) id A16722281B; Tue, 09 Nov 2004 17:49:42 +0100 (CET) Date: Tue, 09 Nov 2004 17:49:42 +0100 From: Christian Brueffer To: net@freebsd.org Message-id: <20041109164942.GC555@unixpages.org> MIME-version: 1.0 Content-type: multipart/signed; boundary=W5WqUoFLvi1M7tJE; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.3-BETA7 X-PGP-Key: http://people.freebsd.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D Subject: sf(4) device polling X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 16:49:53 -0000 --W5WqUoFLvi1M7tJE Content-Type: multipart/mixed; boundary="XWOWbaMNXpFDWE00" Content-Disposition: inline --XWOWbaMNXpFDWE00 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, the attached patch implements device polling for the sf(4) driver. It has been running on my home gateway for almost two weeks now, without any ill effects. I'd appreciate it, when someone could review/commit this. - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --XWOWbaMNXpFDWE00 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sf_polling.diff" Content-Transfer-Encoding: quoted-printable Index: pci/if_sf.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /data/ncvs/freebsd/src/sys/pci/if_sf.c,v retrieving revision 1.72.2.1 diff -u -r1.72.2.1 if_sf.c --- pci/if_sf.c 2 Sep 2004 20:57:40 -0000 1.72.2.1 +++ pci/if_sf.c 9 Nov 2004 16:45:24 -0000 @@ -164,6 +164,12 @@ static int sf_miibus_readreg (device_t, int, int); static int sf_miibus_writereg (device_t, int, int, int); static void sf_miibus_statchg (device_t); +#ifdef DEVICE_POLLING +static void sf_poll (struct ifnet *ifp, enum poll_cmd cmd, + int count); +static void sf_poll_locked (struct ifnet *ifp, enum poll_cmd cmd, + int count); +#endif =20 static u_int32_t csr_read_4 (struct sf_softc *, int); static void csr_write_4 (struct sf_softc *, int, u_int32_t); @@ -534,6 +540,10 @@ mii =3D device_get_softc(sc->sf_miibus); error =3D ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); break; + case SIOCSIFCAP: + ifp->if_capenable &=3D ~IFCAP_POLLING; + ifp->if_capenable |=3D ifr->ifr_reqcap & IFCAP_POLLING; + break; default: error =3D ether_ioctl(ifp, command, data); break; @@ -714,6 +724,10 @@ ifp->if_init =3D sf_init; ifp->if_baudrate =3D 10000000; ifp->if_snd.ifq_maxlen =3D SF_TX_DLIST_CNT - 1; +#ifdef DEVICE_POLLING + ifp->if_capabilities |=3D IFCAP_POLLING; +#endif + ifp->if_capenable =3D ifp->if_capabilities; =20 /* * Call MI attach routine. @@ -903,6 +917,14 @@ while (cmpconsidx !=3D cmpprodidx) { struct mbuf *m0; =20 +#ifdef DEVICE_POLLING + if (ifp->if_flags & IFF_POLLING) { + if (sc->rxcycles <=3D 0) + break; + sc->rxcycles--; + } +#endif + cur_rx =3D &sc->sf_ldata->sf_rx_clist[cmpconsidx]; desc =3D &sc->sf_ldata->sf_rx_dlist_big[cur_rx->sf_endidx]; m =3D desc->sf_mbuf; @@ -1010,6 +1032,58 @@ } } =20 +#ifdef DEVICE_POLLING +static void +sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct sf_softc *sc =3D ifp->if_softc; + + SF_LOCK(sc); + sf_poll_locked(ifp, cmd, count); + SF_UNLOCK(sc); +} + +static void +sf_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct sf_softc *sc =3D ifp->if_softc; + + SF_LOCK_ASSERT(sc); + + if (!(ifp->if_capenable & IFCAP_POLLING)) { + ether_poll_deregister(ifp); + cmd =3D POLL_DEREGISTER; + } + + if (cmd =3D=3D POLL_DEREGISTER) { + /* Final call, enable interrupts. */ + csr_write_4(sc, SF_IMR, SF_INTRS); + return; + } + + sc->rxcycles =3D count; + sf_rxeof(sc); + sf_txeof(sc); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)); + sf_start(ifp); + + if (cmd =3D=3D POLL_AND_CHECK_STATUS) { + uint16_t status; + =09 + status =3D csr_read_4(sc, SF_ISR); + + if (!status) + return; + =09 + /* ACK what we have. */ + csr_write_4(sc, SF_ISR, status); + + if ((status & SF_INTRS) =3D=3D 0) + return; + } +} +#endif + static void sf_intr(arg) void *arg; @@ -1023,6 +1097,19 @@ =20 ifp =3D &sc->arpcom.ac_if; =20 +#ifdef DEVICE_POLLING + if (ifp->if_flags & IFF_POLLING) + goto done_locked; + + if ((ifp->if_capenable & IFCAP_POLLING) && + ether_poll_register(sf_poll, ifp)) { + /* OK, disable interrupts. */ + csr_write_4(sc, SF_IMR, 0x00000000); + sf_poll_locked(ifp, 0, 1); + goto done_locked; + } +#endif + if (!(csr_read_4(sc, SF_ISR_SHADOW) & SF_ISR_PCIINT_ASSERTED)) { SF_UNLOCK(sc); return; @@ -1066,6 +1153,7 @@ if (ifp->if_snd.ifq_head !=3D NULL) sf_start(ifp); =20 +done_locked: SF_UNLOCK(sc); } =20 @@ -1163,6 +1251,13 @@ /* Enable autopadding of short TX frames. */ SF_SETBIT(sc, SF_MACCFG_1, SF_MACCFG1_AUTOPAD); =20 +#ifdef DEVICE_POLLING + /* Disable interrupts if we are polling */ + if (ifp->if_flags & IFF_POLLING) + csr_write_4(sc, SF_IMR, 0x00000000); + else +#endif + /* Enable interrupts. */ csr_write_4(sc, SF_IMR, SF_INTRS); SF_SETBIT(sc, SF_PCI_DEVCFG, SF_PCIDEVCFG_INTR_ENB); @@ -1339,6 +1434,10 @@ =20 untimeout(sf_stats_update, sc, sc->sf_stat_ch); =20 +#ifdef DEVICE_POLLING + ether_poll_deregister(ifp); +#endif +=09 csr_write_4(sc, SF_GEN_ETH_CTL, 0); csr_write_4(sc, SF_CQ_CONSIDX, 0); csr_write_4(sc, SF_CQ_PRODIDX, 0); Index: pci/if_sfreg.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /data/ncvs/freebsd/src/sys/pci/if_sfreg.h,v retrieving revision 1.10 diff -u -r1.10 if_sfreg.h --- pci/if_sfreg.h 14 Nov 2003 19:00:31 -0000 1.10 +++ pci/if_sfreg.h 9 Nov 2004 16:45:33 -0000 @@ -1046,6 +1046,9 @@ int sf_if_flags; struct callout_handle sf_stat_ch; struct mtx sf_mtx; +#ifdef DEVICE_POLLING + int rxcycles; +#endif }; =20 =20 --XWOWbaMNXpFDWE00-- --W5WqUoFLvi1M7tJE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBkPUmbHYXjKDtmC0RAnkkAKD81hFQlJXBM8I4niXDPY6m/UXIgQCg8iyb j7Jteuu4X6qmFHCNZEHEHnU= =oh88 -----END PGP SIGNATURE----- --W5WqUoFLvi1M7tJE-- From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 17:44:36 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 294C916A4CE for ; Tue, 9 Nov 2004 17:44:36 +0000 (GMT) Received: from outmx008.isp.belgacom.be (outmx008.isp.belgacom.be [195.238.3.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB4FB43D2F for ; Tue, 9 Nov 2004 17:44:30 +0000 (GMT) (envelope-from massonda@scarlet.be) Received: from outmx008.isp.belgacom.be (localhost [127.0.0.1]) with ESMTP id iA9HiJp9017192 for ; Tue, 9 Nov 2004 18:44:20 +0100 (envelope-from ) Received: from scarlet.be (27.195-78-194.adsl-fix.skynet.be [194.78.195.27]) with ESMTP id iA9Hi9ae017062 for ; Tue, 9 Nov 2004 18:44:10 +0100 (envelope-from ) Message-ID: <4191054D.1080306@scarlet.be> Date: Tue, 09 Nov 2004 18:58:37 +0100 From: "MASSON D." User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Setting up nat with FREEBSD 5.2.1 but keeping original mac address X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 17:44:36 -0000 Hello everybody, I need to connect two networks together. Those networks have total different IP ranges. Each machine in network A needs to connect with a unique "nat'ed" ip address to the network B, but it needs to keep its own MAC address (or, if this is not possible, a fake one). I try to use FREEBSD 5.2.1 with NAT to do the job but this sends as espected the mac address from the router to de destination host, in my case this is not allowed. PS A little bit firewall is welcome to. Can this be done? Perhaps with netgraph? Masson D. from a small country with great chocolates (BELGIUM) Sorry for my english it's a little bit wrong typed, I know..... From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 20:07:37 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D636B16A4CE for ; Tue, 9 Nov 2004 20:07:37 +0000 (GMT) Received: from mx01.bos.ma.towardex.com (mx01.bos.ma.towardex.com [65.124.16.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CFDA43D53 for ; Tue, 9 Nov 2004 20:07:37 +0000 (GMT) (envelope-from haesu@mx01.bos.ma.towardex.com) Received: by mx01.bos.ma.towardex.com (TowardEX ESMTP 3.0p11_DAKN, from userid 1001) id 21CCE2FA2A; Tue, 9 Nov 2004 15:07:37 -0500 (EST) Date: Tue, 9 Nov 2004 15:07:37 -0500 From: James To: freebsd-net@freebsd.org Message-ID: <20041109200737.GA81448@scylla.towardex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: OT: IPv6 packet generator/flood test X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 20:07:37 -0000 Does anybody know of any IPv6 traffic generators, to stress test v6 routers? No need for setting hop by hop options, 6to4 tunneling, etc options. just plain unicast v6 packet generator. Thanks! -J -- James Jun TowardEX Technologies, Inc. Technical Lead IPv4 and Native IPv6 Colocation, Bandwidth, james@towardex.com and Web Hosting Services in the Metro Boston area cell: 1(978)-394-2867 web: http://www.towardex.com , noc: www.twdx.net From owner-freebsd-net@FreeBSD.ORG Tue Nov 9 20:57:06 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57C7816A4CE; Tue, 9 Nov 2004 20:57:06 +0000 (GMT) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 714C343D48; Tue, 9 Nov 2004 20:57:05 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id iA9Kv42V079713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 9 Nov 2004 23:57:04 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id iA9Kv3Xd048705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Nov 2004 23:57:03 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id iA9Kv3eI048704; Tue, 9 Nov 2004 23:57:03 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Tue, 9 Nov 2004 23:57:03 +0300 From: Gleb Smirnoff To: green@freebsd.org Message-ID: <20041109205703.GB48632@cell.sick.ru> References: <20041109082903.GA42446@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20041109082903.GA42446@cell.sick.ru> User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20041013, clamav-milter version 0.75l on 127.0.0.1 X-Virus-Status: Clean cc: net@freebsd.org Subject: Re: ng_ksocket as divert socket is broken X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 09 Nov 2004 20:57:06 -0000 Brian, doing a serie of tests I have found that this commit has introduced regression described below: http://lists.freebsd.org/pipermail/cvs-src/2004-October/032888.html Now I'm working on this, but I'd be glad if you join. On Tue, Nov 09, 2004 at 11:29:03AM +0300, Gleb Smirnoff wrote: T> I've recently noticed a regression between RELENG_5 and CURRENT. T> In CURRENT ng_ksocket is unable to work as divert socket. Since T> you have touched divert code recently I'm asking you. Today I'm T> going to dig deeply there, but probably you can give some ideas T> without investigation. T> T> A test for this functionality looks like this: T> T> /usr/sbin/ngctl -f- <<-SEQ T> mkpeer echo dummy dummy T> name .:dummy echo_div T> mkpeer echo_div: ksocket echo inet/raw/divert T> name echo_div:echo div_sock T> rmhook dummy T> msg div_sock: bind inet/0.0.0.0:8888 T> SEQ T> T> ipfw add 1000 divert 8888 all from any to any via fxp0 T> T> And packets should flow thru fxp0 in both directions. Do not T> try lo0, there are some problems in there. T> T> You also need this patch (going to commit it soon), if you are T> running INVARIANTS: T> T> --- ip_divert.c 25 Oct 2004 20:02:34 -0000 1.106 T> +++ ip_divert.c 9 Nov 2004 08:27:24 -0000 T> @@ -277,7 +277,7 @@ T> struct divert_tag *dt; T> int error = 0; T> T> - KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null")); T> + m->m_pkthdr.rcvif = NULL; T> T> if (control) T> m_freem(control); /* XXX */ T> -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 01:14:10 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B2E816A4CE for ; Wed, 10 Nov 2004 01:14:10 +0000 (GMT) Received: from outbound0.sv.meer.net (outbound0.sv.meer.net [205.217.152.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id E738443D2D for ; Wed, 10 Nov 2004 01:14:09 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [209.157.152.14]) iAA0wFoV030756; Tue, 9 Nov 2004 17:11:43 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from h229.neville-neil.com.neville-neil.com (h229.neville-neil.com [209.157.133.229] (may be forged)) by mail.meer.net (8.12.10/8.12.10/meer) with ESMTP id iAA0hiA7092437; Tue, 9 Nov 2004 16:43:44 -0800 (PST) (envelope-from gnn@neville-neil.com) Date: Tue, 09 Nov 2004 16:43:44 -0800 Message-ID: From: gnn@freebsd.org To: James In-Reply-To: <20041109200737.GA81448@scylla.towardex.com> References: <20041109200737.GA81448@scylla.towardex.com> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.5 Emacs/21.2 (powerpc-apple-darwin) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: OT: IPv6 packet generator/flood test X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 01:14:10 -0000 At Tue, 9 Nov 2004 15:07:37 -0500, James wrote: > > > Does anybody know of any IPv6 traffic generators, to stress test v6 routers? > No need for setting hop by hop options, 6to4 tunneling, etc options. just plain > unicast v6 packet generator. > NetPipe now has IPv6 integrated into it. I don't know if this is yet in the ports version. I can send you the patch if you need it. Later, George From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 05:11:26 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB21416A4CE for ; Wed, 10 Nov 2004 05:11:26 +0000 (GMT) Received: from measurement-factory.com (measurement-factory.com [206.168.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B61F43D2F for ; Wed, 10 Nov 2004 05:11:26 +0000 (GMT) (envelope-from rousskov@measurement-factory.com) Received: from measurement-factory.com (localhost [127.0.0.1]) iAA5BQJ2033860; Tue, 9 Nov 2004 22:11:26 -0700 (MST) (envelope-from rousskov@measurement-factory.com) Received: (from rousskov@localhost) by measurement-factory.com (8.12.9/8.12.9/Submit) id iAA5BPDe033859; Tue, 9 Nov 2004 22:11:25 -0700 (MST) (envelope-from rousskov) Date: Tue, 9 Nov 2004 22:11:25 -0700 (MST) From: Alex Rousskov To: James In-Reply-To: <20041109200737.GA81448@scylla.towardex.com> Message-ID: <20041109215817.J29938@measurement-factory.com> References: <20041109200737.GA81448@scylla.towardex.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-net@freebsd.org Subject: Re: OT: IPv6 packet generator/flood test X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 05:11:26 -0000 On Tue, 9 Nov 2004, James wrote: > Does anybody know of any IPv6 traffic generators, to stress test v6 > routers? No need for setting hop by hop options, 6to4 tunneling, etc > options. just plain unicast v6 packet generator. Web Polygraph[1] supports IPv6 addresses[2]. Polygraph is designed to test HTTP intermediaries (including L4-7 routers) and does not work on a packet level. Thus, hopefully, it is not the best tool available for low-level IPv6 router testing. On the other hand, it can generate [a lot of] realistic L7 traffic for your tests and can be configured to create DoS or DDoS attack conditions (which justifies this selfish plug). HTH, Alex. [1] http://www.web-polygraph.org/ [2] http://www.web-polygraph.org/docs/reference/pgl/types.html#type:docs/reference/pgl/types/addr From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 08:14:08 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2FC816A4CE for ; Wed, 10 Nov 2004 08:14:08 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E25E743D39 for ; Wed, 10 Nov 2004 08:14:07 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAA8E6XC072790; Wed, 10 Nov 2004 10:14:06 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 90649-09; Wed, 10 Nov 2004 10:14:05 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAA8E51C072784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Nov 2004 10:14:05 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id iAA8DeZC093154; Wed, 10 Nov 2004 10:13:40 +0200 (EET) (envelope-from ru) Date: Wed, 10 Nov 2004 10:13:40 +0200 From: Ruslan Ermilov To: Christian Brueffer Message-ID: <20041110081340.GD65475@ip.net.ua> References: <20041109164942.GC555@unixpages.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i7F3eY7HS/tUJxUd" Content-Disposition: inline In-Reply-To: <20041109164942.GC555@unixpages.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: net@FreeBSD.ORG Subject: Re: sf(4) device polling X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 08:14:08 -0000 --i7F3eY7HS/tUJxUd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Christian, On Tue, Nov 09, 2004 at 05:49:42PM +0100, Christian Brueffer wrote: > the attached patch implements device polling for the sf(4) driver. It > has been running on my home gateway for almost two weeks now, without any > ill effects. >=20 > I'd appreciate it, when someone could review/commit this. >=20 Unfortunately, I cannot give this patch a real testing as I don't have the hardware in question, but I did the code inspection and found only three bugs. ;) 1. The done_locked: label should be put in #ifdef DEVICE_POLLING, or it will cause compile-time warning if compiling without the DEVICE_POLLING option. 2. The condition to call if_start() in sf_poll_locked() was broken twice: there's an extra semicolon at the end of the "if" line, and while this conditional is valid for ALTQ, it's not for this driver, as it doesn't yet support it (perhaps your local version of the driver does). 3. The POLL_AND_CHECK_STATUS command handler is wrong: you use 16-bit status variable where 32-bit is necessary, and you don't do any error-recovering that sf_intr() does. I blindly fixed this, but I cannot test it on a real hardware. I also "fixed" the #endif's. ;) An updated patch can be found here: http://people.freebsd.org/~ru/patches/if_sf.patch Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --i7F3eY7HS/tUJxUd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBkc20qRfpzJluFF4RAmqFAJ0bFz8DMUsbNBdQUkZnebr6wepRewCfRCY/ A42N1F0oCEfZygGBKKskGz0= =+7aa -----END PGP SIGNATURE----- --i7F3eY7HS/tUJxUd-- From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 13:27:19 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4ADB516A4CE for ; Wed, 10 Nov 2004 13:27:19 +0000 (GMT) Received: from ms-dienst.rz.rwth-aachen.de (ms-1.rz.RWTH-Aachen.DE [134.130.3.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id D06B143D5A for ; Wed, 10 Nov 2004 13:27:18 +0000 (GMT) (envelope-from chris@unixpages.org) Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0I6Y009DTTDGZL@ms-dienst.rz.rwth-aachen.de> for net@freebsd.org; Wed, 10 Nov 2004 14:27:17 +0100 (MET) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Wed, 10 Nov 2004 14:27:16 +0100 (MET) Received: from haakonia.hitnet.rwth-aachen.de (haakonia.hitnet.RWTH-Aachen.DE [137.226.181.92])iAADRFds023825 for ; Wed, 10 Nov 2004 14:27:15 +0100 (MET) Received: from gondor.middleearth (gondor.middleearth [192.168.1.42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))(Postfix) with ESMTP id 793E72846F for ; Wed, 10 Nov 2004 14:27:10 +0100 (CET) Received: by gondor.middleearth (Postfix, from userid 1001) id 3E16F2281B; Wed, 10 Nov 2004 14:27:10 +0100 (CET) Date: Wed, 10 Nov 2004 14:27:10 +0100 From: Christian Brueffer In-reply-to: <20041109164942.GC555@unixpages.org> To: net@freebsd.org Message-id: <20041110132709.GC9922@unixpages.org> MIME-version: 1.0 Content-type: multipart/signed; boundary=HWvPVVuAAfuRc6SZ; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-disposition: inline User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.3-BETA7 X-PGP-Key: http://people.freebsd.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D References: <20041109164942.GC555@unixpages.org> Subject: Re: sf(4) device polling X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 13:27:19 -0000 --HWvPVVuAAfuRc6SZ Content-Type: multipart/mixed; boundary="Izn7cH1Com+I3R9J" Content-Disposition: inline --Izn7cH1Com+I3R9J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 09, 2004 at 05:49:42PM +0100, Christian Brueffer wrote: > Hi, >=20 > the attached patch implements device polling for the sf(4) driver. It > has been running on my home gateway for almost two weeks now, without any > ill effects. >=20 Here's a new patch from Ruslan, which corrects some stuff and adds missing error recovery. - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --Izn7cH1Com+I3R9J Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_sf.patch" Content-Transfer-Encoding: quoted-printable Index: if_sf.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/pci/if_sf.c,v retrieving revision 1.73 diff -u -p -r1.73 if_sf.c --- if_sf.c 28 Aug 2004 15:10:35 -0000 1.73 +++ if_sf.c 10 Nov 2004 08:08:34 -0000 @@ -164,6 +164,12 @@ static u_int8_t sf_read_eeprom (struct s static int sf_miibus_readreg (device_t, int, int); static int sf_miibus_writereg (device_t, int, int, int); static void sf_miibus_statchg (device_t); +#ifdef DEVICE_POLLING +static void sf_poll (struct ifnet *ifp, enum poll_cmd cmd, + int count); +static void sf_poll_locked (struct ifnet *ifp, enum poll_cmd cmd, + int count); +#endif /* DEVICE_POLLING */ =20 static u_int32_t csr_read_4 (struct sf_softc *, int); static void csr_write_4 (struct sf_softc *, int, u_int32_t); @@ -534,6 +540,10 @@ sf_ioctl(ifp, command, data) mii =3D device_get_softc(sc->sf_miibus); error =3D ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); break; + case SIOCSIFCAP: + ifp->if_capenable &=3D ~IFCAP_POLLING; + ifp->if_capenable |=3D ifr->ifr_reqcap & IFCAP_POLLING; + break; default: error =3D ether_ioctl(ifp, command, data); break; @@ -714,6 +724,10 @@ sf_attach(dev) ifp->if_init =3D sf_init; ifp->if_baudrate =3D 10000000; ifp->if_snd.ifq_maxlen =3D SF_TX_DLIST_CNT - 1; +#ifdef DEVICE_POLLING + ifp->if_capabilities |=3D IFCAP_POLLING; +#endif /* DEVICE_POLLING */ + ifp->if_capenable =3D ifp->if_capabilities; =20 /* * Call MI attach routine. @@ -903,6 +917,14 @@ sf_rxeof(sc) while (cmpconsidx !=3D cmpprodidx) { struct mbuf *m0; =20 +#ifdef DEVICE_POLLING + if (ifp->if_flags & IFF_POLLING) { + if (sc->rxcycles <=3D 0) + break; + sc->rxcycles--; + } +#endif /* DEVICE_POLLING */ + cur_rx =3D &sc->sf_ldata->sf_rx_clist[cmpconsidx]; desc =3D &sc->sf_ldata->sf_rx_dlist_big[cur_rx->sf_endidx]; m =3D desc->sf_mbuf; @@ -1010,6 +1032,63 @@ sf_txthresh_adjust(sc) } } =20 +#ifdef DEVICE_POLLING +static void +sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct sf_softc *sc =3D ifp->if_softc; + + SF_LOCK(sc); + sf_poll_locked(ifp, cmd, count); + SF_UNLOCK(sc); +} + +static void +sf_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct sf_softc *sc =3D ifp->if_softc; + + SF_LOCK_ASSERT(sc); + + if (!(ifp->if_capenable & IFCAP_POLLING)) { + ether_poll_deregister(ifp); + cmd =3D POLL_DEREGISTER; + } + + if (cmd =3D=3D POLL_DEREGISTER) { + /* Final call, enable interrupts. */ + csr_write_4(sc, SF_IMR, SF_INTRS); + return; + } + + sc->rxcycles =3D count; + sf_rxeof(sc); + sf_txeof(sc); + if (ifp->if_snd.ifq_head !=3D NULL) + sf_start(ifp); + + if (cmd =3D=3D POLL_AND_CHECK_STATUS) { + u_int32_t status; + + status =3D csr_read_4(sc, SF_ISR); + if (status) + csr_write_4(sc, SF_ISR, status); + + if (status & SF_ISR_TX_LOFIFO) + sf_txthresh_adjust(sc); + + if (status & SF_ISR_ABNORMALINTR) { + if (status & SF_ISR_STATSOFLOW) { + untimeout(sf_stats_update, sc, + sc->sf_stat_ch); + sf_stats_update(sc); + } else + sf_init(sc); + } + } +} +#endif /* DEVICE_POLLING */ + static void sf_intr(arg) void *arg; @@ -1023,6 +1102,19 @@ sf_intr(arg) =20 ifp =3D &sc->arpcom.ac_if; =20 +#ifdef DEVICE_POLLING + if (ifp->if_flags & IFF_POLLING) + goto done_locked; + + if ((ifp->if_capenable & IFCAP_POLLING) && + ether_poll_register(sf_poll, ifp)) { + /* OK, disable interrupts. */ + csr_write_4(sc, SF_IMR, 0x00000000); + sf_poll_locked(ifp, 0, 1); + goto done_locked; + } +#endif /* DEVICE_POLLING */ + if (!(csr_read_4(sc, SF_ISR_SHADOW) & SF_ISR_PCIINT_ASSERTED)) { SF_UNLOCK(sc); return; @@ -1066,6 +1158,9 @@ sf_intr(arg) if (ifp->if_snd.ifq_head !=3D NULL) sf_start(ifp); =20 +#ifdef DEVICE_POLLING +done_locked: +#endif /* DEVICE_POLLING */ SF_UNLOCK(sc); } =20 @@ -1163,6 +1258,13 @@ sf_init(xsc) /* Enable autopadding of short TX frames. */ SF_SETBIT(sc, SF_MACCFG_1, SF_MACCFG1_AUTOPAD); =20 +#ifdef DEVICE_POLLING + /* Disable interrupts if we are polling. */ + if (ifp->if_flags & IFF_POLLING) + csr_write_4(sc, SF_IMR, 0x00000000); + else +#endif /* DEVICE_POLLING */ + /* Enable interrupts. */ csr_write_4(sc, SF_IMR, SF_INTRS); SF_SETBIT(sc, SF_PCI_DEVCFG, SF_PCIDEVCFG_INTR_ENB); @@ -1339,6 +1441,10 @@ sf_stop(sc) =20 untimeout(sf_stats_update, sc, sc->sf_stat_ch); =20 +#ifdef DEVICE_POLLING + ether_poll_deregister(ifp); +#endif /* DEVICE_POLLING */ +=09 csr_write_4(sc, SF_GEN_ETH_CTL, 0); csr_write_4(sc, SF_CQ_CONSIDX, 0); csr_write_4(sc, SF_CQ_PRODIDX, 0); Index: if_sfreg.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/pci/if_sfreg.h,v retrieving revision 1.10 diff -u -p -r1.10 if_sfreg.h --- if_sfreg.h 14 Nov 2003 19:00:31 -0000 1.10 +++ if_sfreg.h 10 Nov 2004 07:23:49 -0000 @@ -1046,6 +1046,9 @@ struct sf_softc { int sf_if_flags; struct callout_handle sf_stat_ch; struct mtx sf_mtx; +#ifdef DEVICE_POLLING + int rxcycles; +#endif }; =20 =20 --Izn7cH1Com+I3R9J-- --HWvPVVuAAfuRc6SZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBkhctbHYXjKDtmC0RAh2WAJ4xG1D8bQLoFZZKCKEg0llOxkEUUQCfQPnp WuNWnrK/xCvTfsa/5bpDWeU= =WoOS -----END PGP SIGNATURE----- --HWvPVVuAAfuRc6SZ-- From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 13:50:15 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54C4F16A4CE for ; Wed, 10 Nov 2004 13:50:15 +0000 (GMT) Received: from mail.trippynames.com (mail.trippynames.com [38.113.223.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31E9543D41 for ; Wed, 10 Nov 2004 13:50:15 +0000 (GMT) (envelope-from sean@chittenden.org) Received: from localhost (localhost [127.0.0.1]) by mail.trippynames.com (Postfix) with ESMTP id 894AFA6C2B for ; Wed, 10 Nov 2004 05:50:14 -0800 (PST) Received: from mail.trippynames.com ([127.0.0.1]) by localhost (rand.nxad.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 81088-02 for ; Wed, 10 Nov 2004 05:50:12 -0800 (PST) Received: from [192.168.123.123] (unknown [38.113.223.82]) by mail.trippynames.com (Postfix) with ESMTP id C3B11A6C8B for ; Wed, 10 Nov 2004 05:50:12 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: <7070775A-331F-11D9-A34C-000A95C705DC@chittenden.org> Content-Type: text/plain; charset=US-ASCII; format=flowed To: net@freebsd.org From: Sean Chittenden Date: Wed, 10 Nov 2004 05:50:10 -0800 X-Mailer: Apple Mail (2.619) Subject: Ability to live lock 5.3 via routing... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 13:50:15 -0000 Pretty easy for me to reproduce. The machine live locks so I can't get anything out of it, serial console or otherwise. :( Imagine a machine with two NICs, fxp0 and fxp1 (though it could be any two NICs). The following commands should lead to a lock: # Add the primary address on the external NIC ifconfig fxp0 192.168.1.2 netmask 255.255.255.0 media 100baseTX mediaopt full-duplex # Add the default gateway route add default 192.168.1.1 # Add a network to the internal interface ifconfig fxp1 10.10.10.1 netmask 255.255.255.0 media 100baseTX mediaopt full-duplex # On the external interface, on the same VLAN, there are two other networks. # Add aliases that way the machine can participate on those networks. ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.255 ifconfig fxp0 alias 192.168.3.250 netmask 255.255.255.255 # Add a route so that machines on the internal network can get # to the 192.168.2.0/24 network. This command succeeds. route add -net 192.168.2.250/24 192.168.2.250 # Add a route so that machines on the internal network can also # get to the 192.168.3.0/24 network. This command results in a hard # lock of the system. route add -net 192.168.3.250/24 192.168.3.250 I'm unable to debug this problem further. Can someone shed some light onto this and/or help me debug it further? As I've said, I can't even break to a debugger or get at the machine via a serial connection. :( Help? -sc -- Sean Chittenden From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 14:06:51 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8602316A4D7 for ; Wed, 10 Nov 2004 14:06:51 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5718343D48 for ; Wed, 10 Nov 2004 14:06:50 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) iAAE6JaI065211 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 10 Nov 2004 15:06:21 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id iAAE5usu048799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Nov 2004 15:05:56 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id iAAE5tr9031772; Wed, 10 Nov 2004 15:05:55 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id iAAE5t2G031771; Wed, 10 Nov 2004 15:05:55 +0100 (CET) (envelope-from ticso) Date: Wed, 10 Nov 2004 15:05:54 +0100 From: Bernd Walter To: Sean Chittenden Message-ID: <20041110140554.GN98623@cicely12.cicely.de> References: <7070775A-331F-11D9-A34C-000A95C705DC@chittenden.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7070775A-331F-11D9-A34C-000A95C705DC@chittenden.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: net@freebsd.org Subject: Re: Ability to live lock 5.3 via routing... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 14:06:52 -0000 On Wed, Nov 10, 2004 at 05:50:10AM -0800, Sean Chittenden wrote: > Pretty easy for me to reproduce. The machine live locks so I can't get > anything out of it, serial console or otherwise. :( Imagine a machine > with two NICs, fxp0 and fxp1 (though it could be any two NICs). The > following commands should lead to a lock: > > # Add the primary address on the external NIC > ifconfig fxp0 192.168.1.2 netmask 255.255.255.0 media 100baseTX > mediaopt full-duplex > > # Add the default gateway > route add default 192.168.1.1 > > # Add a network to the internal interface > ifconfig fxp1 10.10.10.1 netmask 255.255.255.0 media 100baseTX mediaopt > full-duplex > > # On the external interface, on the same VLAN, there are two other > networks. > # Add aliases that way the machine can participate on those networks. > ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.255 > ifconfig fxp0 alias 192.168.3.250 netmask 255.255.255.255 You should use the correct netmask for the networks: e.g.: ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.0 or: ifconfig fxp0 alias 192.168.2.250/24 /32 is only correct if you are adding an alias for a network you already participate. > # Add a route so that machines on the internal network can get > # to the 192.168.2.0/24 network. This command succeeds. > route add -net 192.168.2.250/24 192.168.2.250 If you add network routes you should better use the network address (192.168.2.0 in this case). But the complete route is only required because the above alias has the wrong netmask. You should just remove it. > # Add a route so that machines on the internal network can also > # get to the 192.168.3.0/24 network. This command results in a hard > # lock of the system. > route add -net 192.168.3.250/24 192.168.3.250 Same as last route. But it shouldn't hard lock anyway. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 14:38:22 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D41116A4CE for ; Wed, 10 Nov 2004 14:38:22 +0000 (GMT) Received: from mail.trippynames.com (mail.trippynames.com [38.113.223.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F58B43D2F for ; Wed, 10 Nov 2004 14:38:22 +0000 (GMT) (envelope-from sean@chittenden.org) Received: from localhost (localhost [127.0.0.1]) by mail.trippynames.com (Postfix) with ESMTP id AD879A6C8E; Wed, 10 Nov 2004 06:38:21 -0800 (PST) Received: from mail.trippynames.com ([127.0.0.1]) by localhost (rand.nxad.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 85263-08; Wed, 10 Nov 2004 06:38:20 -0800 (PST) Received: from [192.168.123.123] (unknown [38.113.223.82]) by mail.trippynames.com (Postfix) with ESMTP id 12D22A6C86; Wed, 10 Nov 2004 06:38:20 -0800 (PST) In-Reply-To: <20041110140554.GN98623@cicely12.cicely.de> References: <7070775A-331F-11D9-A34C-000A95C705DC@chittenden.org> <20041110140554.GN98623@cicely12.cicely.de> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <29838DF3-3326-11D9-A34C-000A95C705DC@chittenden.org> Content-Transfer-Encoding: 7bit From: Sean Chittenden Date: Wed, 10 Nov 2004 06:38:18 -0800 To: ticso@cicely.de X-Mailer: Apple Mail (2.619) cc: net@freebsd.org Subject: Re: Ability to live lock 5.3 via routing... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 14:38:22 -0000 >> Pretty easy for me to reproduce. The machine live locks so I can't >> get >> anything out of it, serial console or otherwise. :( Imagine a >> machine >> with two NICs, fxp0 and fxp1 (though it could be any two NICs). The >> following commands should lead to a lock: >> >> # Add the primary address on the external NIC >> ifconfig fxp0 192.168.1.2 netmask 255.255.255.0 media 100baseTX >> mediaopt full-duplex >> >> # Add the default gateway >> route add default 192.168.1.1 >> >> # Add a network to the internal interface >> ifconfig fxp1 10.10.10.1 netmask 255.255.255.0 media 100baseTX >> mediaopt >> full-duplex >> >> # On the external interface, on the same VLAN, there are two other >> networks. >> # Add aliases that way the machine can participate on those networks. >> ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.255 >> ifconfig fxp0 alias 192.168.3.250 netmask 255.255.255.255 > > You should use the correct netmask for the networks: > e.g.: > ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.0 > or: > ifconfig fxp0 alias 192.168.2.250/24 > /32 is only correct if you are adding an alias for a network you > already participate. *grabs pointy hat* You're right, I knew better. When using the correct netmasks to the interface aliases, everything works without a hitch. Forgot to change the netmasks when "evolving" this particular mess of subnets and fired off an inquiry. Still, setting /32's and designating routes that hang off of a host address works (and rightfully it should) until that third route is added, then everything goes apeshit. Regardless, thanks for the obvious fix... still not sure why it does this though. If someone doesn't pick it up in the next week, I'll file a PR so it doesn't get lost. -sc -- Sean Chittenden From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 15:46:27 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B2A016A4CE for ; Wed, 10 Nov 2004 15:46:27 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 249AF43D2F for ; Wed, 10 Nov 2004 15:46:27 +0000 (GMT) (envelope-from fehwalker@gmail.com) Received: by rproxy.gmail.com with SMTP id a36so195702rnf for ; Wed, 10 Nov 2004 07:46:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=El0TzUs9Ap2op9PuiKZy0Stf0wL2EFMnvcjUCbxi/sjlB6YQBLOJPDS/klzDqEmbhOPyOIOCA1Jf5vxb+ro5LTqk01RCmrRNvKnoveVxdVduqHrvJUCh7gA+oXPKV2emeP9cNy2vGNEL0CiqGMs7s92wQSy9GQesu50A+/uUIoE= Received: by 10.38.82.80 with SMTP id f80mr90377rnb; Wed, 10 Nov 2004 07:46:26 -0800 (PST) Received: by 10.38.74.74 with HTTP; Wed, 10 Nov 2004 07:46:26 -0800 (PST) Message-ID: <35de0c30041110074662654d9b@mail.gmail.com> Date: Wed, 10 Nov 2004 10:46:26 -0500 From: Bryan Fullerton To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: ipfw jail and debug.mpsafenet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bryan Fullerton List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 15:46:27 -0000 I've upgraded my jail box to 5.3, and was thinking of updating ipfw rules to use the jail rule option. Both the ipfw man page and the 5.3 Errata indicate that debug.mpsafenet must be set to 0 to prevent a system lock when using this rule option. Will setting debug.mpsafenet to 0 impact anything else on the box? A quick googling shows it could impact performance on SMP machines, but this is a uniproc box. Anything else I should keep an eye on? Thanks, Bryan From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 16:14:09 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CD7A16A4CE for ; Wed, 10 Nov 2004 16:14:09 +0000 (GMT) Received: from mail.trippynames.com (mail.trippynames.com [38.113.223.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08E6643D54 for ; Wed, 10 Nov 2004 16:14:09 +0000 (GMT) (envelope-from sean@chittenden.org) Received: from localhost (localhost [127.0.0.1]) by mail.trippynames.com (Postfix) with ESMTP id 0C60EA6C8E; Wed, 10 Nov 2004 08:14:08 -0800 (PST) Received: from mail.trippynames.com ([127.0.0.1]) by localhost (rand.nxad.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 95317-04-2; Wed, 10 Nov 2004 08:14:06 -0800 (PST) Received: from [192.168.123.123] (unknown [38.113.223.82]) by mail.trippynames.com (Postfix) with ESMTP id 97F90A6C8B; Wed, 10 Nov 2004 08:14:06 -0800 (PST) In-Reply-To: <35de0c30041110074662654d9b@mail.gmail.com> References: <35de0c30041110074662654d9b@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <8AFDE7D8-3333-11D9-A34C-000A95C705DC@chittenden.org> Content-Transfer-Encoding: 7bit From: Sean Chittenden Date: Wed, 10 Nov 2004 08:14:05 -0800 To: Bryan Fullerton X-Mailer: Apple Mail (2.619) cc: freebsd-net@freebsd.org Subject: Re: ipfw jail and debug.mpsafenet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 16:14:09 -0000 > I've upgraded my jail box to 5.3, and was thinking of updating ipfw > rules to use the jail rule option. Both the ipfw man page and the 5.3 > Errata indicate that debug.mpsafenet must be set to 0 to prevent a > system lock when using this rule option. > > Will setting debug.mpsafenet to 0 impact anything else on the box? A > quick googling shows it could impact performance on SMP machines, but > this is a uniproc box. Anything else I should keep an eye on? Install the following patch from csjp@. He'll be committing this in the next week or two. Once applied and compiled, fell free to turn mpsafenet off. :) cd /usr/src/sys/netinet fetch http://people.freebsd.org/~csjp/ip_fw2.c.1099500281.diff patch -p0 < ip_fw2.c.1099500281.diff cd /usr/src make buildkernel make installkernel shutdown -r now sysctl debug.mpsafenet=0 -sc -- Sean Chittenden From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 16:14:28 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12DAC16A4CE for ; Wed, 10 Nov 2004 16:14:28 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7258B43D3F for ; Wed, 10 Nov 2004 16:14:27 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1CRv6w-0001a5-IX; Wed, 10 Nov 2004 19:14:18 +0300 From: Vladimir Grebenschikov To: Sean Chittenden In-Reply-To: <29838DF3-3326-11D9-A34C-000A95C705DC@chittenden.org> References: <7070775A-331F-11D9-A34C-000A95C705DC@chittenden.org> <20041110140554.GN98623@cicely12.cicely.de> <29838DF3-3326-11D9-A34C-000A95C705DC@chittenden.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Wed, 10 Nov 2004 19:14:17 +0300 Message-Id: <1100103257.977.27.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: ticso@cicely.de cc: freebsd-net Subject: Re: Ability to live lock 5.3 via routing... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 16:14:28 -0000 =F7 =D3=D2, 10/11/2004 =D7 06:38 -0800, Sean Chittenden =D0=C9=DB=C5=D4: > >> Pretty easy for me to reproduce. The machine live locks so I can't=20 > >> get > >> anything out of it, serial console or otherwise. :( Imagine a=20 > >> machine > >> with two NICs, fxp0 and fxp1 (though it could be any two NICs). The > >> following commands should lead to a lock: > >> > >> # Add the primary address on the external NIC > >> ifconfig fxp0 192.168.1.2 netmask 255.255.255.0 media 100baseTX > >> mediaopt full-duplex > >> > >> # Add the default gateway > >> route add default 192.168.1.1 > >> > >> # Add a network to the internal interface > >> ifconfig fxp1 10.10.10.1 netmask 255.255.255.0 media 100baseTX=20 > >> mediaopt > >> full-duplex > >> > >> # On the external interface, on the same VLAN, there are two other > >> networks. > >> # Add aliases that way the machine can participate on those networks. > >> ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.255 > >> ifconfig fxp0 alias 192.168.3.250 netmask 255.255.255.255 > > > > You should use the correct netmask for the networks: > > e.g.: > > ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.0 > > or: > > ifconfig fxp0 alias 192.168.2.250/24 > > /32 is only correct if you are adding an alias for a network you > > already participate. >=20 > *grabs pointy hat* You're right, I knew better. When using the=20 > correct netmasks to the interface aliases, everything works without a=20 > hitch. Forgot to change the netmasks when "evolving" this particular=20 > mess of subnets and fired off an inquiry. Still, setting /32's and=20 > designating routes that hang off of a host address works (and=20 > rightfully it should) until that third route is added, then everything=20 > goes apeshit. Regardless, thanks for the obvious fix... still not sure=20 > why it does this though. If someone doesn't pick it up in the next=20 > week, I'll file a PR so it doesn't get lost. -sc Actually your actions should not lead to lockup anyway. It is possible to add interface route even if you have no address on this subnet, please try: route add -net 192.168.2.0/24 -iface fxp0 -cloning route add -net 192.168.3.0/24 -iface fxp0 -cloning but anyway, you should not point by routes to yourself --=20 Vladimir B. Grebenchikov vova@fbsd.ru From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 19:41:11 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CEEBE16A4CE for ; Wed, 10 Nov 2004 19:41:11 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AE0943D2D for ; Wed, 10 Nov 2004 19:41:11 +0000 (GMT) (envelope-from fehwalker@gmail.com) Received: by rproxy.gmail.com with SMTP id a36so228685rnf for ; Wed, 10 Nov 2004 11:41:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=WZ5y+4FzPVpJcz330tyh+Wt7wdaPhPOOwWUsBxuHsYIGV8ndaM/v2cYNztlTIH+V8TUh84Nn3CcKL3r9Z88D0kw6FWUzsOgNmI2Z+C3IEN7sMjCEcJIjgYUUNRjbimTEVE337x7K/BcxdSF7lkegr6oI3jWR0+TPY5pvHPLOWlM= Received: by 10.38.15.8 with SMTP id 8mr615409rno; Wed, 10 Nov 2004 11:41:10 -0800 (PST) Received: by 10.38.74.74 with HTTP; Wed, 10 Nov 2004 11:41:10 -0800 (PST) Message-ID: <35de0c3004111011412326d731@mail.gmail.com> Date: Wed, 10 Nov 2004 14:41:10 -0500 From: Bryan Fullerton To: freebsd-net@freebsd.org In-Reply-To: <8AFDE7D8-3333-11D9-A34C-000A95C705DC@chittenden.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <35de0c30041110074662654d9b@mail.gmail.com> <8AFDE7D8-3333-11D9-A34C-000A95C705DC@chittenden.org> Subject: Re: ipfw jail and debug.mpsafenet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bryan Fullerton List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 19:41:11 -0000 (gah, hit repy instead of reply all) On Wed, 10 Nov 2004 08:14:05 -0800, Sean Chittenden wrote: > Install the following patch from csjp@. He'll be committing this in > the next week or two. Once applied and compiled, fell free to turn > mpsafenet off. :) Is the intention to MFC this to RELENG_5_3 (or RELENG_5_3_1...) or is this a 5.4 fix? If the latter I'll just stick with ipfw rules referencing the jail IP and forget about the ipfw jail option until it's fully cooked. Thanks, Bryan From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 20:10:24 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3290D16A4CE for ; Wed, 10 Nov 2004 20:10:24 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B18B43D45 for ; Wed, 10 Nov 2004 20:10:23 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CRynO-0002XH-00; Wed, 10 Nov 2004 21:10:22 +0100 Received: from [217.227.159.25] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CRynN-0007H9-00; Wed, 10 Nov 2004 21:10:22 +0100 From: Max Laier To: freebsd-net@freebsd.org Date: Wed, 10 Nov 2004 21:10:22 +0100 User-Agent: KMail/1.7.1 References: <35de0c30041110074662654d9b@mail.gmail.com> <8AFDE7D8-3333-11D9-A34C-000A95C705DC@chittenden.org> <35de0c3004111011412326d731@mail.gmail.com> In-Reply-To: <35de0c3004111011412326d731@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1333367.tAiQMdpVxz"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411102110.29751.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: Bryan Fullerton Subject: Re: ipfw jail and debug.mpsafenet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 20:10:24 -0000 --nextPart1333367.tAiQMdpVxz Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 10 November 2004 20:41, Bryan Fullerton wrote: > (gah, hit repy instead of reply all) > > On Wed, 10 Nov 2004 08:14:05 -0800, Sean Chittenden = =20 wrote: > > Install the following patch from csjp@. He'll be committing this in > > the next week or two. Once applied and compiled, fell free to turn > > mpsafenet off. :) One thing to note here: debug.mpsafenet=3D1 (on) =3D> Giant-free network (that's the one you want= ) while debug.mpsafenet=3D0 (off) =3D> Giant around the netstack (that's what is r= equired=20 for IPFW's user/group/jail as well as PF's=20 user/group) > Is the intention to MFC this to RELENG_5_3 (or RELENG_5_3_1...) or is > this a 5.4 fix? If the latter I'll just stick with ipfw rules This is certainly something for 5.4 as it must be tested carefully (you can= =20 help! ;) It's not too bad to turn Giant back on unless you have a very busy= =20 MySQL or Apache on a SMP-box, though. > referencing the jail IP and forget about the ipfw jail option until > it's fully cooked. See above, testing is the only way to get it "fully cooked" in reasonable=20 time. From what I know, Christian's patch is already quite mature. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1333367.tAiQMdpVxz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBknW1XyyEoT62BG0RAl+DAJ90uw/AS/wO0SB3IWmMgWr1H4nF+gCfeAUu kABnZS9udjYcgln1YNBFmbk= =VhK7 -----END PGP SIGNATURE----- --nextPart1333367.tAiQMdpVxz-- From owner-freebsd-net@FreeBSD.ORG Wed Nov 10 20:24:30 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 858FA16A4CE for ; Wed, 10 Nov 2004 20:24:30 +0000 (GMT) Received: from mail.trippynames.com (mail.trippynames.com [38.113.223.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F58D43D54 for ; Wed, 10 Nov 2004 20:24:30 +0000 (GMT) (envelope-from sean@chittenden.org) Received: from localhost (localhost [127.0.0.1]) by mail.trippynames.com (Postfix) with ESMTP id A432AA7464; Wed, 10 Nov 2004 12:24:29 -0800 (PST) Received: from mail.trippynames.com ([127.0.0.1]) by localhost (rand.nxad.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24498-07; Wed, 10 Nov 2004 12:24:28 -0800 (PST) Received: from [192.168.123.123] (unknown [38.113.223.82]) by mail.trippynames.com (Postfix) with ESMTP id A554AA7454; Wed, 10 Nov 2004 12:24:27 -0800 (PST) In-Reply-To: <200411102110.29751.max@love2party.net> References: <35de0c30041110074662654d9b@mail.gmail.com> <8AFDE7D8-3333-11D9-A34C-000A95C705DC@chittenden.org> <35de0c3004111011412326d731@mail.gmail.com> <200411102110.29751.max@love2party.net> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <838ADAB8-3356-11D9-A34C-000A95C705DC@chittenden.org> Content-Transfer-Encoding: 7bit From: Sean Chittenden Date: Wed, 10 Nov 2004 12:24:25 -0800 To: Max Laier X-Mailer: Apple Mail (2.619) cc: freebsd-net@freebsd.org cc: Bryan Fullerton Subject: Re: ipfw jail and debug.mpsafenet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 10 Nov 2004 20:24:30 -0000 >> referencing the jail IP and forget about the ipfw jail option until >> it's fully cooked. > > See above, testing is the only way to get it "fully cooked" in > reasonable > time. From what I know, Christian's patch is already quite mature. For the record, I'm using it and it's working well for me. -sc -- Sean Chittenden From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 08:05:39 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7E5616A4CE for ; Thu, 11 Nov 2004 08:05:39 +0000 (GMT) Received: from mta9.srv.hcvlny.cv.net (mta9.srv.hcvlny.cv.net [167.206.5.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 757D643D2F for ; Thu, 11 Nov 2004 08:05:37 +0000 (GMT) (envelope-from anthonyv@brainlink.com) Received: from superior.local.non-standard.net (ool-18b9c193.dyn.optonline.net [24.185.193.147]) by mta9.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0I7000JLC95CTR@mta9.srv.hcvlny.cv.net> for freebsd-net@freebsd.org; Thu, 11 Nov 2004 03:05:37 -0500 (EST) Date: Thu, 11 Nov 2004 03:05:36 -0500 (EST) From: Anthony Volodkin X-X-Sender: anthonyv@superior.local.non-standard.net To: freebsd-net@freebsd.org Message-id: <20041111025930.U82349@superior.local.non-standard.net> MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: IPFW2 matching a list/set of interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 08:05:39 -0000 Hi, I've been trying to implement some ipfw rules that would match several interfaces using the recv/via/xmit keywords, however that seems to be unsupported. So a rule like: ipfw add allow ip from any to 192.168.100.100 via {fxp0,ng0,xl0} fails with an invalid ) error. Alternatively if I use an or block, i get an error about an invalid or block. Does anyone know whether this is actually possible/supported/supported in the near future? Sure I could make a rule for each interface, but in my situation that would not scale well. Thanks, Anthony Volodkin From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 09:58:03 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0982616A4CE; Thu, 11 Nov 2004 09:58:03 +0000 (GMT) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4971643D2D; Thu, 11 Nov 2004 09:58:02 +0000 (GMT) (envelope-from andre.albsmeier@siemens.com) Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.12.6/8.12.6) with ESMTP id iAB9w0BO029732; Thu, 11 Nov 2004 10:58:00 +0100 Received: from mars.cert.siemens.com (mars.cert.siemens.com [139.25.19.9]) by mail3.siemens.de (8.12.6/8.12.6) with ESMTP id iAB9vxBO023941; Thu, 11 Nov 2004 10:57:59 +0100 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) mail/cert.mc.pre,v 1.65 2004/10/29 21:53:46 mailadm Exp $) with ESMTP id iAB9vxEP069064; Thu, 11 Nov 2004 10:57:59 +0100 (CET) Received: (from localhost) by curry.mchp.siemens.de (8.13.1/8.13.1) id iAB9vx5f028291; Date: Thu, 11 Nov 2004 10:57:58 +0100 From: Andre Albsmeier To: Pawel Malachowski Message-ID: <20041111095758.GA72069@curry.mchp.siemens.de> References: <20040805225408.GA70729@shellma.zin.lublin.pl> <20040809163739.GA95408@shellma.zin.lublin.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040809163739.GA95408@shellma.zin.lublin.pl> X-Echelon: Hackers, cocaine, 767, 15kg, Ortega X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.4i cc: darrenr@freebsd.org cc: freebsd-net@freebsd.org Subject: Re: ipfilter/ipnat 3.4.35 and udp-traceroute problem X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 09:58:03 -0000 On Mon, 09-Aug-2004 at 18:37:39 +0200, Pawel Malachowski wrote: > On Fri, Aug 06, 2004 at 12:54:08AM +0200, Pawel Malachowski wrote: > > > I can see weird behavior of this command: > > traceroute -s privateIP -P UDP dst > > Outgoing UDP packets are translated, ICMP time-exceded message comes back, > > but traceroute shows '* * *'. ;) > > v3.4.35 import breaks things on my RELENG_4 box. FYI: > > With this ruleset, UDP-traceroute doesn't work (ICMP- works): > map fxp0 172.27.201.1/24 -> public/32 proxy port ftp ftp/tcp > map fxp0 172.27.201.1/24 -> public/32 portmap tcp/udp auto > map fxp0 172.27.201.1/24 -> public/32 > > % traceroute -s 172.27.201.1 -P udp www.yahoo.com > traceroute to www.yahoo.akadns.net (216.109.118.74) from 172.27.201.1, 64 hops max, 44 byte packets > 1 * * * > 2 * * * > 3 * * * > 4 * * * > 5 * * * > 6 * * * > 7 * * * > 8 * *^C > ... Since I was tired of waiting another 4 months until this is getting fixed (nobody seems to be interested in ipfilter anymore), I have patched ip_nat.c and it is working again. I am sure the patch is ugly/wrong/bad/completely_insane but it works and I haven't seen any side effects so far. If anybody is interested: --- sys/contrib/ipfilter/netinet/ip_nat.c.ORI Mon Jul 5 09:28:35 2004 +++ sys/contrib/ipfilter/netinet/ip_nat.c Tue Nov 9 18:49:30 2004 @@ -1783,7 +1783,7 @@ * Fix UDP pseudo header checksum to compensate for the * IP address change. */ - if ((oip->ip_p == IPPROTO_UDP) && (dlen >= 8) && udp->uh_sum) { + if ((oip->ip_p == IPPROTO_UDP) && (dlen >= 8)) { /* * The UDP checksum is optional, only adjust it * if it has been set. Maybe this helps Darren to find the real problem... -Andre From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 13:56:49 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DB8416A4CE for ; Thu, 11 Nov 2004 13:56:49 +0000 (GMT) Received: from caine.easynet.fr (smarthost161.mail.easynet.fr [212.180.1.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90D3443D1F for ; Thu, 11 Nov 2004 13:56:48 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from [212.180.127.72] (helo=tatooine.tataz.chchile.org) by caine.easynet.fr with esmtp (Exim 4.34) id 1CSFRO-0003zG-Ns; Thu, 11 Nov 2004 14:56:47 +0100 Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id 8D8C6408E; Thu, 11 Nov 2004 14:55:14 +0100 (CET) Date: Thu, 11 Nov 2004 14:55:14 +0100 From: Jeremie Le Hen To: Anthony Volodkin Message-ID: <20041111135514.GF6723@obiwan.tataz.chchile.org> References: <20041111025930.U82349@superior.local.non-standard.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041111025930.U82349@superior.local.non-standard.net> User-Agent: Mutt/1.5.6i X-Broken-Reverse-DNS: no host name found for IP address 212.180.127.72 cc: freebsd-net@freebsd.org cc: Jeremie Le Hen Subject: Re: IPFW2 matching a list/set of interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 13:56:49 -0000 > Does anyone know whether this is actually possible/supported/supported > in the near future? Sure I could make a rule for each interface, but > in my situation that would not scale well. It is not possible at the moment. I'm not aware of any plan about this. Regards, -- Jeremie Le Hen jeremie@le-hen.org From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 15:14:39 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3456316A4CE for ; Thu, 11 Nov 2004 15:14:39 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12E7043D31 for ; Thu, 11 Nov 2004 15:14:39 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.8) with ESMTP id iABFEGba090101; Thu, 11 Nov 2004 07:14:16 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id iABFEGak090100; Thu, 11 Nov 2004 07:14:16 -0800 (PST) (envelope-from rizzo) Date: Thu, 11 Nov 2004 07:14:16 -0800 From: Luigi Rizzo To: Anthony Volodkin Message-ID: <20041111071416.A90040@xorpc.icir.org> References: <20041111025930.U82349@superior.local.non-standard.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20041111025930.U82349@superior.local.non-standard.net>; from anthonyv@brainlink.com on Thu, Nov 11, 2004 at 03:05:36AM -0500 cc: freebsd-net@freebsd.org Subject: Re: IPFW2 matching a list/set of interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 15:14:39 -0000 On Thu, Nov 11, 2004 at 03:05:36AM -0500, Anthony Volodkin wrote: > Hi, > > I've been trying to implement some ipfw rules that would match several > interfaces using the recv/via/xmit keywords, however that seems to be > unsupported. So a rule like: > > ipfw add allow ip from any to 192.168.100.100 via {fxp0,ng0,xl0} > > fails with an invalid ) error. Alternatively if I use an or block, i > get an error about an invalid or block. or blocks are supported with any option so chances are that you are using the wrong syntax (which is _not_ the one above) to specify them. If you post the offending line maybe we can spot the problem cheers luigi From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 19:15:39 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C990F16A4D2 for ; Thu, 11 Nov 2004 19:15:39 +0000 (GMT) Received: from mta3.srv.hcvlny.cv.net (mta3.srv.hcvlny.cv.net [167.206.5.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3644943D45 for ; Thu, 11 Nov 2004 19:15:32 +0000 (GMT) (envelope-from anthonyv@brainlink.com) Received: from superior.local.non-standard.net (ool-18b9c193.dyn.optonline.net [24.185.193.147]) by mta3.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0I7100BJI449IJ@mta3.srv.hcvlny.cv.net> for freebsd-net@freebsd.org; Thu, 11 Nov 2004 14:14:33 -0500 (EST) Date: Thu, 11 Nov 2004 14:14:41 -0500 (EST) From: Anthony Volodkin In-reply-to: <001f01c4c7c6$7d4eba20$b2cef0d5@misho> X-X-Sender: anthonyv@superior.local.non-standard.net To: Mihail Balikov Message-id: <20041111141243.N82349@superior.local.non-standard.net> MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20041111025930.U82349@superior.local.non-standard.net> <001f01c4c7c6$7d4eba20$b2cef0d5@misho> cc: freebsd-net@freebsd.org Subject: Re: IPFW2 matching a list/set of interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 19:15:40 -0000 That seems to work, thanks a lot! -Anthony Volodkin On Thu, 11 Nov 2004, Mihail Balikov wrote: ipfw add allow ip from any to 192.168.100.100 { via fxp0 or via ng0 or via xl0 } > > > ----- Original Message ----- > From: "Anthony Volodkin" > To: > Sent: Thursday, November 11, 2004 10:05 AM > Subject: IPFW2 matching a list/set of interfaces > > > > Hi, > > > > I've been trying to implement some ipfw rules that would match several > > interfaces using the recv/via/xmit keywords, however that seems to be > > unsupported. So a rule like: > > > > ipfw add allow ip from any to 192.168.100.100 via {fxp0,ng0,xl0} > > > > fails with an invalid ) error. Alternatively if I use an or block, i > > get an error about an invalid or block. > > > > Does anyone know whether this is actually possible/supported/supported > > in the near future? Sure I could make a rule for each interface, but in > my situation that would not scale well. > > > > Thanks, > > > > Anthony Volodkin > > _______________________________________________ > > 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 Thu Nov 11 20:24:02 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B936E16A4CE; Thu, 11 Nov 2004 20:24:02 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AE4B43D48; Thu, 11 Nov 2004 20:24:02 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.209] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CSLU9-00018w-00; Thu, 11 Nov 2004 21:24:01 +0100 Received: from [84.128.130.223] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CSLU8-0007bw-00; Thu, 11 Nov 2004 21:24:01 +0100 From: Max Laier To: freebsd-arch@freebsd.org Date: Thu, 11 Nov 2004 21:24:05 +0100 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4509686.Ad4VYY4PBk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411112124.12616.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: freebsd-net@freebsd.org Subject: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 20:24:02 -0000 --nextPart4509686.Ad4VYY4PBk Content-Type: multipart/mixed; boundary="Boundary-01=_np8kBd92qNtmEHy" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_np8kBd92qNtmEHy Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All, I know I have sent this a couple of times before, but never got anywhere. T= his=20 time I am set to commit! The attached patch (http://people.freebsd.org/~mlaier/in.c.patch) derived f= rom=20 WIDE via OpenBSD in.c, rev 1.21 improves the handling of automatic prefix=20 routes. Right now you can't have two legs into the same network. If you want to, yo= u=20 must give on of the interfaces a host address only (netmask /32). This way = it=20 is not possible to hand over the route if one of the interfaces is=20 "removed" (however this is done in the special case). The patch allows to add more than on IPv4 address with the same prefix. In = the=20 case that there is a route already, we leave it alone and add the new addre= ss=20 without the IFA_ROUTE flag. When we remove an address later on, that has a= =20 route associated, we try to find an alternative address to use for the rout= e=20 and hand it over. This is required for CARP, but should be helpful for other situations as we= ll. Any objections? I also plan to merge this back to RELENG_5 after some time. I don't see thi= s=20 breaking assumptions (it was an error case before) - please tell me if you= =20 see something. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_np8kBd92qNtmEHy Content-Type: text/x-diff; charset="us-ascii"; name="in.c.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="in.c.patch" =2D-- ../dist/sys/netinet/in.c Sat Nov 6 21:01:08 2004 +++ sys/netinet/in.c Mon Nov 8 02:05:17 2004 @@ -1,4 +1,32 @@ /* + * Copyright (C) 2001 WIDE Project. All rights reserved. + *=20 + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the project nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + *=20 + * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURP= OSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENT= IAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STR= ICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY W= AY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* * Copyright (c) 1982, 1986, 1991, 1993 * The Regents of the University of California. All rights reserved. * @@ -55,6 +83,8 @@ static int in_lifaddr_ioctl(struct socket *, u_long, caddr_t, struct ifnet *, struct thread *); =20 +static int in_addprefix(struct in_ifaddr *, int); +static int in_scrubprefix(struct in_ifaddr *); static void in_socktrim(struct sockaddr_in *); static int in_ifinit(struct ifnet *, struct in_ifaddr *, struct sockaddr_in *, int); @@ -654,14 +684,7 @@ register struct ifnet *ifp; register struct in_ifaddr *ia; { =2D =2D if ((ia->ia_flags & IFA_ROUTE) =3D=3D 0) =2D return; =2D if (ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT)) =2D rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST); =2D else =2D rtinit(&(ia->ia_ifa), (int)RTM_DELETE, 0); =2D ia->ia_flags &=3D ~IFA_ROUTE; + in_scrubprefix(ia); } =20 /* @@ -743,26 +766,7 @@ return (0); flags |=3D RTF_HOST; } =2D =2D /*- =2D * Don't add host routes for interface addresses of =2D * 0.0.0.0 --> 0.255.255.255 netmask 255.0.0.0. This makes it =2D * possible to assign several such address pairs with consistent =2D * results (no host route) and is required by BOOTP. =2D * =2D * XXX: This is ugly ! There should be a way for the caller to =2D * say that they don't want a host route. =2D */ =2D if (ia->ia_addr.sin_addr.s_addr !=3D INADDR_ANY || =2D ia->ia_netmask !=3D IN_CLASSA_NET || =2D ia->ia_dstaddr.sin_addr.s_addr !=3D htonl(IN_CLASSA_HOST)) { =2D if ((error =3D rtinit(&ia->ia_ifa, (int)RTM_ADD, flags)) !=3D 0) { =2D ia->ia_addr =3D oldaddr; =2D return (error); =2D } =2D ia->ia_flags |=3D IFA_ROUTE; =2D } =2D + error =3D in_addprefix(ia, flags); /* * If the interface supports multicast, join the "all hosts" * multicast group on that interface. @@ -776,6 +780,118 @@ return (error); } =20 +#define rtinitflags(x) \ + ((((x)->ia_ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) !=3D 0) \ + ? RTF_HOST : 0) +/* + * add a route to prefix ("connected route" in cisco terminology). + * does nothing if there's some interface address with the same prefix alr= eady. + */ +static int +in_addprefix(target, flags) + struct in_ifaddr *target; + int flags; +{ + struct in_ifaddr *ia; + struct in_addr prefix, mask, p; + int error; + + if ((flags & RTF_HOST) !=3D 0) + prefix =3D target->ia_dstaddr.sin_addr; + else { + prefix =3D target->ia_addr.sin_addr; + mask =3D target->ia_sockmask.sin_addr; + prefix.s_addr &=3D mask.s_addr; + } + + TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { + if (rtinitflags(ia)) + p =3D ia->ia_dstaddr.sin_addr; + else { + p =3D ia->ia_addr.sin_addr; + p.s_addr &=3D ia->ia_sockmask.sin_addr.s_addr; + } + + if (prefix.s_addr !=3D p.s_addr) + continue; + + /* + * if we got a matching prefix route inserted by other + * interface adderss, we don't need to bother + */ + if (ia->ia_flags & IFA_ROUTE) + return 0; + } + + /* + * noone seem to have prefix route. insert it. + */ + error =3D rtinit(&target->ia_ifa, (int)RTM_ADD, flags); + if (!error) + target->ia_flags |=3D IFA_ROUTE; + return error; +} + +/* + * remove a route to prefix ("connected route" in cisco terminology). + * re-installs the route by using another interface address, if there's one + * with the same prefix (otherwise we lose the route mistakenly). + */ +static int +in_scrubprefix(target) + struct in_ifaddr *target; +{ + struct in_ifaddr *ia; + struct in_addr prefix, mask, p; + int error; + + if ((target->ia_flags & IFA_ROUTE) =3D=3D 0) + return 0; + + if (rtinitflags(target)) + prefix =3D target->ia_dstaddr.sin_addr; + else { + prefix =3D target->ia_addr.sin_addr; + mask =3D target->ia_sockmask.sin_addr; + prefix.s_addr &=3D mask.s_addr; + } + + TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { + if (rtinitflags(ia)) + p =3D ia->ia_dstaddr.sin_addr; + else { + p =3D ia->ia_addr.sin_addr; + p.s_addr &=3D ia->ia_sockmask.sin_addr.s_addr; + } + + if (prefix.s_addr !=3D p.s_addr) + continue; + + /* + * if we got a matching prefix route, move IFA_ROUTE to him + */ + if ((ia->ia_flags & IFA_ROUTE) =3D=3D 0) { + rtinit(&(target->ia_ifa), (int)RTM_DELETE, + rtinitflags(target)); + target->ia_flags &=3D ~IFA_ROUTE; + + error =3D rtinit(&ia->ia_ifa, (int)RTM_ADD, + rtinitflags(ia) | RTF_UP); + if (error =3D=3D 0) + ia->ia_flags |=3D IFA_ROUTE; + return error; + } + } + + /* + * noone seem to have prefix route. remove it. + */ + rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); + target->ia_flags &=3D ~IFA_ROUTE; + return 0; +} + +#undef rtinitflags =20 /* * Return 1 if the address might be a local broadcast address. --Boundary-01=_np8kBd92qNtmEHy-- --nextPart4509686.Ad4VYY4PBk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBk8psXyyEoT62BG0RAmutAJ9z6WB3K1FYiXIDsa/gGY/QjISOYACggWA3 o3PCXKZ60jN3t6bk6VWdkXk= =DccO -----END PGP SIGNATURE----- --nextPart4509686.Ad4VYY4PBk-- From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 21:29:24 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FB1316A4CE; Thu, 11 Nov 2004 21:29:24 +0000 (GMT) Received: from wrzx35.rz.uni-wuerzburg.de (wrzx35.rz.uni-wuerzburg.de [132.187.3.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8FE843D1D; Thu, 11 Nov 2004 21:29:23 +0000 (GMT) (envelope-from q@uni.de) Received: from wrzx30.rz.uni-wuerzburg.de (wrzx30.rz.uni-wuerzburg.de [132.187.1.30]) by wrzx35.rz.uni-wuerzburg.de (Postfix) with ESMTP id A897ADD194; Thu, 11 Nov 2004 22:29:22 +0100 (CET) Received: from virusscan (localhost [127.0.0.1]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id 8F701909AF; Thu, 11 Nov 2004 22:29:22 +0100 (CET) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id 3F4FD8EDAE; Thu, 11 Nov 2004 22:29:22 +0100 (CET) Received: from coyote.q.local (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id E3BCCD4563; Thu, 11 Nov 2004 22:29:21 +0100 (CET) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.12.10/8.12.10) with ESMTP id iABLTLhp033370; Thu, 11 Nov 2004 22:29:21 +0100 (CET) (envelope-from q@uni.de) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.1/8.13.1) with ESMTP id iABLTLoM086628; Thu, 11 Nov 2004 22:29:21 +0100 (CET) (envelope-from q@uni.de) Received: (from q@localhost) by roadrunner.q.local (8.13.1/8.13.1/Submit) id iABLTKDU086571; Thu, 11 Nov 2004 22:29:20 +0100 (CET) (envelope-from q@uni.de) Date: Thu, 11 Nov 2004 22:29:20 +0100 From: Ulrich Spoerlein To: Max Laier Message-ID: <20041111212920.GA902@galgenberg.net> References: <200411112124.12616.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <200411112124.12616.max@love2party.net> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new (Rechenzentrum Universitaet Wuerzburg) cc: freebsd-net@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 21:29:24 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 11.11.2004 at 21:24:05 +0100, Max Laier wrote: > The patch allows to add more than on IPv4 address with the same prefix. I= n the=20 > case that there is a route already, we leave it alone and add the new add= ress=20 > without the IFA_ROUTE flag. When we remove an address later on, that has = a=20 > route associated, we try to find an alternative address to use for the ro= ute=20 > and hand it over. Assume I have two computers hooked up via Ethernet and via Firewire (if_fwe). Will this commit allow me to place all four IP addresses of the interfaces into the same subnet and have FreeBSD re-route the packets through Firewire if the Ethernet link goes down (or vice versa)? Or do I need to go CARP for this to work? Ulrich Spoerlein --=20 PGP Key ID: F0DB9F44 Encrypted mail welcome! Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn." didn't you understand? --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBk9mwmArGtfDbn0QRAm/7AJ4zWIBMlcgZDAZIK+8bTHpyHNXSdgCgrz5d iKehlCxeLAS/qGBh9dDWB1M= =3kwc -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb-- From owner-freebsd-net@FreeBSD.ORG Thu Nov 11 21:55:08 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADC5516A4CE; Thu, 11 Nov 2004 21:55:08 +0000 (GMT) Received: from acampi.inet.it (acampi.inet.it [213.92.1.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DB1243D1D; Thu, 11 Nov 2004 21:55:08 +0000 (GMT) (envelope-from andrea@acampi.inet.it) Received: by acampi.inet.it (Postfix, from userid 1000) id DDF68F; Thu, 11 Nov 2004 22:55:06 +0100 (CET) Date: Thu, 11 Nov 2004 22:55:06 +0100 From: Andrea Campi To: Max Laier Message-ID: <20041111215506.GA60227@webcom.it> References: <200411112124.12616.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411112124.12616.max@love2party.net> User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 11 Nov 2004 21:55:08 -0000 On Thu, Nov 11, 2004 at 09:24:05PM +0100, Max Laier wrote: > The attached patch (http://people.freebsd.org/~mlaier/in.c.patch) derived from > WIDE via OpenBSD in.c, rev 1.21 improves the handling of automatic prefix > routes. Sounds like a very useful change indeed. One comment though: > @@ -743,26 +766,7 @@ > return (0); > flags |= RTF_HOST; > } > - > - /*- > - * Don't add host routes for interface addresses of > - * 0.0.0.0 --> 0.255.255.255 netmask 255.0.0.0. This makes it > - * possible to assign several such address pairs with consistent > - * results (no host route) and is required by BOOTP. > - * > - * XXX: This is ugly ! There should be a way for the caller to > - * say that they don't want a host route. > - */ > - if (ia->ia_addr.sin_addr.s_addr != INADDR_ANY || > - ia->ia_netmask != IN_CLASSA_NET || > - ia->ia_dstaddr.sin_addr.s_addr != htonl(IN_CLASSA_HOST)) { > - if ((error = rtinit(&ia->ia_ifa, (int)RTM_ADD, flags)) != 0) { > - ia->ia_addr = oldaddr; > - return (error); > - } > - ia->ia_flags |= IFA_ROUTE; > - } > - > + error = in_addprefix(ia, flags); > /* > * If the interface supports multicast, join the "all hosts" > * multicast group on that interface. Are you sure you want to go on if you got an error? Regardless, you should probably have an empty line after in_addrprefix. > + TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { > + if (rtinitflags(ia)) > + p = ia->ia_dstaddr.sin_addr; > + else { The if() is misindented. The rest looks good. Bye, Andrea -- ...and that is how we know the Earth to be banana-shaped. From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 00:10:41 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D23816A4CE; Fri, 12 Nov 2004 00:10:41 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B4F643D5D; Fri, 12 Nov 2004 00:10:40 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CSP1T-00040o-00; Fri, 12 Nov 2004 01:10:39 +0100 Received: from [84.128.130.223] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CSP1T-00058B-00; Fri, 12 Nov 2004 01:10:39 +0100 From: Max Laier To: freebsd-net@freebsd.org Date: Fri, 12 Nov 2004 01:10:43 +0100 User-Agent: KMail/1.7.1 References: <200411112124.12616.max@love2party.net> <20041111212920.GA902@galgenberg.net> In-Reply-To: <20041111212920.GA902@galgenberg.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1688102.c5n1zZPv4L"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411120110.51145.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: Ulrich Spoerlein cc: freebsd-arch@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 00:10:41 -0000 --nextPart1688102.c5n1zZPv4L Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 11 November 2004 22:29, Ulrich Spoerlein wrote: > On Thu, 11.11.2004 at 21:24:05 +0100, Max Laier wrote: > > The patch allows to add more than on IPv4 address with the same prefix. > > In the case that there is a route already, we leave it alone and add the > > new address without the IFA_ROUTE flag. When we remove an address later > > on, that has a route associated, we try to find an alternative address = to > > use for the route and hand it over. > > Assume I have two computers hooked up via Ethernet and via Firewire > (if_fwe). Will this commit allow me to place all four IP addresses of > the interfaces into the same subnet and have FreeBSD re-route the > packets through Firewire if the Ethernet link goes down (or vice versa)? > > Or do I need to go CARP for this to work? The route is only handed over when the address is removed. It might help yo= u=20 when you have a laptop with a wireless card. You can first surf on your cou= ch=20 and later walk to your desktop, plug in the cable and unplug the PCMCIA ... This however, is not the primary goal here and CARP might indeed be what yo= u=20 are looking for ... BTW: I forgot to advertise (and people actually asked) CARP patches can be= =20 found at: http://people.freebsd.org/~mlaier/CARP/ =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1688102.c5n1zZPv4L Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBk/+LXyyEoT62BG0RAuSuAJ9mDTxSwkEbQaYDSAKPW5wEGwFK+QCdE532 Fovh96LRbsZERiAoqcw3KVw= =9fbk -----END PGP SIGNATURE----- --nextPart1688102.c5n1zZPv4L-- From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 00:16:26 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB91B16A4CE; Fri, 12 Nov 2004 00:16:25 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78F3043D39; Fri, 12 Nov 2004 00:16:23 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CSP70-00052M-00; Fri, 12 Nov 2004 01:16:22 +0100 Received: from [84.128.130.223] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CSP70-0000rr-00; Fri, 12 Nov 2004 01:16:22 +0100 From: Max Laier To: freebsd-net@freebsd.org Date: Fri, 12 Nov 2004 01:16:31 +0100 User-Agent: KMail/1.7.1 References: <200411112124.12616.max@love2party.net> <20041111215506.GA60227@webcom.it> In-Reply-To: <20041111215506.GA60227@webcom.it> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2998521.leMBpdJXmZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411120116.33771.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: freebsd-arch@freebsd.org cc: Andrea Campi Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 00:16:26 -0000 --nextPart2998521.leMBpdJXmZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 11 November 2004 22:55, Andrea Campi wrote: > On Thu, Nov 11, 2004 at 09:24:05PM +0100, Max Laier wrote: > > The attached patch (http://people.freebsd.org/~mlaier/in.c.patch) deriv= ed > > from WIDE via OpenBSD in.c, rev 1.21 improves the handling of automatic > > prefix routes. > > Sounds like a very useful change indeed. > > One comment though: > > @@ -743,26 +766,7 @@ > > return (0); > > flags |=3D RTF_HOST; > > } > > - > > - /*- > > - * Don't add host routes for interface addresses of > > - * 0.0.0.0 --> 0.255.255.255 netmask 255.0.0.0. This makes it > > - * possible to assign several such address pairs with consistent > > - * results (no host route) and is required by BOOTP. > > - * > > - * XXX: This is ugly ! There should be a way for the caller to > > - * say that they don't want a host route. > > - */ > > - if (ia->ia_addr.sin_addr.s_addr !=3D INADDR_ANY || > > - ia->ia_netmask !=3D IN_CLASSA_NET || > > - ia->ia_dstaddr.sin_addr.s_addr !=3D htonl(IN_CLASSA_HOST)) { > > - if ((error =3D rtinit(&ia->ia_ifa, (int)RTM_ADD, flags)) !=3D 0) { > > - ia->ia_addr =3D oldaddr; > > - return (error); > > - } > > - ia->ia_flags |=3D IFA_ROUTE; > > - } > > - > > + error =3D in_addprefix(ia, flags); > > /* > > * If the interface supports multicast, join the "all hosts" > > * multicast group on that interface. > > Are you sure you want to go on if you got an error? Regardless, you should > probably have an empty line after in_addrprefix. Not sure how to deal with the error case. All errors we should get are memo= ry=20 related (as we check carefully that the rtinit will success). This means th= at=20 the following in_addmulti will sleep if we hit it (in_addmulti mallocs with= =20 M_WAITOK) ... so I guess you are right and it's the least intrusive if we d= o=20 return. > > + TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { > > + if (rtinitflags(ia)) > > + p =3D ia->ia_dstaddr.sin_addr; > > + else { > > The if() is misindented. Right, thanks. Patch at: http://people.freebsd.org/~mlaier/in.c.patch updated accordingly. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart2998521.leMBpdJXmZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBlADhXyyEoT62BG0RAiqXAJ9vmIRYQO8Trr94o1cFZK3J7dv1CgCeOJcx yym8dnddM9LXO8FJPiWPt/c= =fe8I -----END PGP SIGNATURE----- --nextPart2998521.leMBpdJXmZ-- From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 03:13:15 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3183A16A4CE; Fri, 12 Nov 2004 03:13:15 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C9A843D1D; Fri, 12 Nov 2004 03:13:15 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id iAC3DJGI004851; Thu, 11 Nov 2004 19:13:19 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id iAC3DIPO004850; Thu, 11 Nov 2004 19:13:18 -0800 Date: Thu, 11 Nov 2004 19:13:18 -0800 From: Brooks Davis To: Max Laier Message-ID: <20041112031318.GC1809@odin.ac.hmc.edu> References: <200411112124.12616.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: <200411112124.12616.max@love2party.net> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-net@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 03:13:15 -0000 --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 11, 2004 at 09:24:05PM +0100, Max Laier wrote: > All, >=20 > I know I have sent this a couple of times before, but never got anywhere.= This=20 > time I am set to commit! >=20 > The attached patch (http://people.freebsd.org/~mlaier/in.c.patch) derived= from=20 > WIDE via OpenBSD in.c, rev 1.21 improves the handling of automatic prefix= =20 > routes. >=20 > Right now you can't have two legs into the same network. If you want to, = you=20 > must give on of the interfaces a host address only (netmask /32). This wa= y it=20 > is not possible to hand over the route if one of the interfaces is=20 > "removed" (however this is done in the special case). >=20 > The patch allows to add more than on IPv4 address with the same prefix. I= n the=20 > case that there is a route already, we leave it alone and add the new add= ress=20 > without the IFA_ROUTE flag. When we remove an address later on, that has = a=20 > route associated, we try to find an alternative address to use for the ro= ute=20 > and hand it over. >=20 > This is required for CARP, but should be helpful for other situations as = well. I have no objections so this change. Does this help or hurt our quest to be able to usefully bind to 0.0.0.0? It would be really nice if we could eventually do this so we could stop running bpf on 90+% of all machines just so we could use DHCP. -- Brooks --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBlCpNXY6L6fI4GtQRAipzAKCdvYyPyE3Sts/yUbdDB+/4PKClMwCgh1Be nuaMa9WAlet2jsCi4/WCx/k= =p6N3 -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu-- From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 03:28:32 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7A1C16A4D0; Fri, 12 Nov 2004 03:28:32 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52F4F43D48; Fri, 12 Nov 2004 03:28:32 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 9782D65339; Fri, 12 Nov 2004 03:28:30 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 51672-01; Fri, 12 Nov 2004 03:28:30 +0000 (GMT) Received: from empiric.dek.spc.org (dhcp120.icir.org [192.150.187.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id D00006530A; Fri, 12 Nov 2004 03:28:28 +0000 (GMT) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id A0A436482; Thu, 11 Nov 2004 19:28:17 -0800 (PST) Date: Thu, 11 Nov 2004 19:28:17 -0800 From: Bruce M Simpson To: Brooks Davis Message-ID: <20041112032817.GB7195@dhcp120.icir.org> Mail-Followup-To: Brooks Davis , Max Laier , freebsd-net@freebsd.org, freebsd-arch@freebsd.org References: <200411112124.12616.max@love2party.net> <20041112031318.GC1809@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20041112031318.GC1809@odin.ac.hmc.edu> cc: Max Laier cc: freebsd-arch@freebsd.org cc: freebsd-net@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 03:28:33 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 11, 2004 at 07:13:18PM -0800, Brooks Davis wrote: > I have no objections so this change. Does this help or hurt our quest > to be able to usefully bind to 0.0.0.0? It would be really nice if we > could eventually do this so we could stop running bpf on 90+% of all > machines just so we could use DHCP. Nope, that's a job for my IP_SENDIF change (as yet unimplemented). This change, however, may make things somewhat easier for interfaces configured with the same broadcast address; IP_ONESBCAST currently relies on the fact that an interface is numbered and has a network broadcast address to do what it does, but I can see that changing or perhaps even becoming obsolete if IP_SENDIF is implemented. It's a trivial change to implement SO_BINDTODEVICE on top for Linux compatibility. Regards, BMS --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFBlC3RueUpAYYNtTsRAiiDAJwMwK5OhSdsz50ahK5KQQ3ls2m/6gCeJPun /VC+Qe3JIrNyYPYv6NFROAo= =ctzK -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp-- From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 08:30:43 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CDF116A4CE; Fri, 12 Nov 2004 08:30:43 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7526043D2D; Fri, 12 Nov 2004 08:30:42 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAC8Ueho084326; Fri, 12 Nov 2004 10:30:41 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 04757-19; Fri, 12 Nov 2004 10:30:36 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAC8UEqs084054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Nov 2004 10:30:14 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id iAC8UE0w051003; Fri, 12 Nov 2004 10:30:14 +0200 (EET) (envelope-from ru) Date: Fri, 12 Nov 2004 10:30:14 +0200 From: Ruslan Ermilov To: Max Laier Message-ID: <20041112083014.GB41844@ip.net.ua> References: <200411112124.12616.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GID0FwUMdk1T2AWN" Content-Disposition: inline In-Reply-To: <200411112124.12616.max@love2party.net> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: freebsd-net@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 08:30:43 -0000 --GID0FwUMdk1T2AWN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Max, On Thu, Nov 11, 2004 at 09:24:05PM +0100, Max Laier wrote: > I know I have sent this a couple of times before, but never got anywhere.= This=20 > time I am set to commit! >=20 Hey, you did it! ;) > The attached patch (http://people.freebsd.org/~mlaier/in.c.patch) derived= from=20 > WIDE via OpenBSD in.c, rev 1.21 improves the handling of automatic prefix= =20 > routes. >=20 > Right now you can't have two legs into the same network. If you want to, = you=20 > must give on of the interfaces a host address only (netmask /32). This wa= y it=20 > is not possible to hand over the route if one of the interfaces is=20 > "removed" (however this is done in the special case). >=20 > The patch allows to add more than on IPv4 address with the same prefix. I= n the=20 > case that there is a route already, we leave it alone and add the new add= ress=20 > without the IFA_ROUTE flag. When we remove an address later on, that has = a=20 > route associated, we try to find an alternative address to use for the ro= ute=20 > and hand it over. >=20 I cannot give your patch a thorough review at the moment, but I like the algorithm, and I don't see how it can hurt anything. > --- ../dist/sys/netinet/in.c Sat Nov 6 21:01:08 2004 > +++ sys/netinet/in.c Mon Nov 8 02:05:17 2004 > @@ -654,14 +684,7 @@ > register struct ifnet *ifp; > register struct in_ifaddr *ia; > { > - > - if ((ia->ia_flags & IFA_ROUTE) =3D=3D 0) > - return; > - if (ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT)) > - rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST); > - else > - rtinit(&(ia->ia_ifa), (int)RTM_DELETE, 0); > - ia->ia_flags &=3D ~IFA_ROUTE; > + in_scrubprefix(ia); > } > =20 Looks like "ifp" argument is no longer needed for in_ifscrub(), perhaps it should be killed then. Also, there are a lot of style bugs (besides those that others have already mentioned), the most annoying is comments -- they should be written as per style(9) (make them look like the real sentences). Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --GID0FwUMdk1T2AWN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBlHSWqRfpzJluFF4RAsJbAJ9MrlyCTjeeC7Db9kC5iZ/xBrt8KQCeIdRy 3pYQvaSeF7SeF+iohADcOmM= =4Ken -----END PGP SIGNATURE----- --GID0FwUMdk1T2AWN-- From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 08:36:39 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1FBB16A4CE; Fri, 12 Nov 2004 08:36:39 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4DE843D3F; Fri, 12 Nov 2004 08:36:38 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAC8acMs086192; Fri, 12 Nov 2004 10:36:38 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 06169-01; Fri, 12 Nov 2004 10:36:36 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id iAC8aaSV086183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Nov 2004 10:36:36 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id iAC8aa9c051052; Fri, 12 Nov 2004 10:36:36 +0200 (EET) (envelope-from ru) Date: Fri, 12 Nov 2004 10:36:36 +0200 From: Ruslan Ermilov To: Max Laier Message-ID: <20041112083636.GC41844@ip.net.ua> References: <200411112124.12616.max@love2party.net> <20041111215506.GA60227@webcom.it> <200411120116.33771.max@love2party.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+nBD6E3TurpgldQp" Content-Disposition: inline In-Reply-To: <200411120116.33771.max@love2party.net> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at ip.net.ua cc: freebsd-net@freebsd.org cc: Andrea Campi cc: freebsd-arch@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 08:36:39 -0000 --+nBD6E3TurpgldQp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 12, 2004 at 01:16:31AM +0100, Max Laier wrote: > On Thursday 11 November 2004 22:55, Andrea Campi wrote: > > On Thu, Nov 11, 2004 at 09:24:05PM +0100, Max Laier wrote: > > > The attached patch (http://people.freebsd.org/~mlaier/in.c.patch) der= ived > > > from WIDE via OpenBSD in.c, rev 1.21 improves the handling of automat= ic > > > prefix routes. > > > > Sounds like a very useful change indeed. > > > > One comment though: > > > @@ -743,26 +766,7 @@ > > > return (0); > > > flags |=3D RTF_HOST; > > > } > > > - > > > - /*- > > > - * Don't add host routes for interface addresses of > > > - * 0.0.0.0 --> 0.255.255.255 netmask 255.0.0.0. This makes it > > > - * possible to assign several such address pairs with consistent > > > - * results (no host route) and is required by BOOTP. > > > - * > > > - * XXX: This is ugly ! There should be a way for the caller to > > > - * say that they don't want a host route. > > > - */ > > > - if (ia->ia_addr.sin_addr.s_addr !=3D INADDR_ANY || > > > - ia->ia_netmask !=3D IN_CLASSA_NET || > > > - ia->ia_dstaddr.sin_addr.s_addr !=3D htonl(IN_CLASSA_HOST)) { > > > - if ((error =3D rtinit(&ia->ia_ifa, (int)RTM_ADD, flags)) !=3D 0) { > > > - ia->ia_addr =3D oldaddr; > > > - return (error); > > > - } > > > - ia->ia_flags |=3D IFA_ROUTE; > > > - } > > > - > > > + error =3D in_addprefix(ia, flags); > > > /* > > > * If the interface supports multicast, join the "all hosts" > > > * multicast group on that interface. > > > > Are you sure you want to go on if you got an error? Regardless, you sho= uld > > probably have an empty line after in_addrprefix. >=20 > Not sure how to deal with the error case. All errors we should get are me= mory=20 > related (as we check carefully that the rtinit will success). This means = that=20 > the following in_addmulti will sleep if we hit it (in_addmulti mallocs wi= th=20 > M_WAITOK) ... so I guess you are right and it's the least intrusive if we= do=20 > return. >=20 The old code did: if ((error =3D rtinit()) !=3D 0) return (error); Why the new code should behave differently, I fail to see? in_addprefix() is just a wrapper around rtinit(), after all. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --+nBD6E3TurpgldQp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBlHYUqRfpzJluFF4RAgy6AJ4qwETEoghRRzlWwtnipxrcIhU9SQCgiDGY A3PGCLtB+a+fLw3TCwlLfmc= =a0HD -----END PGP SIGNATURE----- --+nBD6E3TurpgldQp-- From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 10:37:29 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B53D716A4CE; Fri, 12 Nov 2004 10:37:29 +0000 (GMT) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A03F43D31; Fri, 12 Nov 2004 10:37:29 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id iACAbPpS034045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 12 Nov 2004 13:37:26 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id iACAbOUR072821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Nov 2004 13:37:25 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id iACAbOle072820; Fri, 12 Nov 2004 13:37:24 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Fri, 12 Nov 2004 13:37:23 +0300 From: Gleb Smirnoff To: green@freebsd.org, julian@freebsd.org Message-ID: <20041112103723.GA72779@cell.sick.ru> References: <20041109082903.GA42446@cell.sick.ru> <20041109205703.GB48632@cell.sick.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20041109205703.GB48632@cell.sick.ru> User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20041013, clamav-milter version 0.75l on 127.0.0.1 X-Virus-Status: Clean cc: net@freebsd.org Subject: Re: ng_ksocket as divert socket is broken X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 10:37:29 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Brian, I have finally resolved this problem. In case when ng_ksocket acts as divert socket, we get diverted packets returned from 'pseudo-userland' with their tags on them. In ip_divert.c rev 1.100 you do unconditional m_tag_prepend() of a new tag with cookie equal 0, and this sends packet back to ipfw rule 0. The packed is looped forever. Attached patch solves this problem (also fixing incorrect KASSERT, which blocked this functionality on invarianted kernels). I've also added M_ZERO to malloc args, removing explicit zeroing of fields. If there are no objections, I'll commit it ASAP. On Tue, Nov 09, 2004 at 11:57:03PM +0300, Gleb Smirnoff wrote: T> Brian, T> T> doing a serie of tests I have found that this commit T> has introduced regression described below: T> T> http://lists.freebsd.org/pipermail/cvs-src/2004-October/032888.html T> T> Now I'm working on this, but I'd be glad if you join. T> T> On Tue, Nov 09, 2004 at 11:29:03AM +0300, Gleb Smirnoff wrote: T> T> I've recently noticed a regression between RELENG_5 and CURRENT. T> T> In CURRENT ng_ksocket is unable to work as divert socket. Since T> T> you have touched divert code recently I'm asking you. Today I'm T> T> going to dig deeply there, but probably you can give some ideas T> T> without investigation. T> T> T> T> A test for this functionality looks like this: T> T> T> T> /usr/sbin/ngctl -f- <<-SEQ T> T> mkpeer echo dummy dummy T> T> name .:dummy echo_div T> T> mkpeer echo_div: ksocket echo inet/raw/divert T> T> name echo_div:echo div_sock T> T> rmhook dummy T> T> msg div_sock: bind inet/0.0.0.0:8888 T> T> SEQ T> T> T> T> ipfw add 1000 divert 8888 all from any to any via fxp0 T> T> T> T> And packets should flow thru fxp0 in both directions. Do not T> T> try lo0, there are some problems in there. T> T> T> T> You also need this patch (going to commit it soon), if you are T> T> running INVARIANTS: T> T> T> T> --- ip_divert.c 25 Oct 2004 20:02:34 -0000 1.106 T> T> +++ ip_divert.c 9 Nov 2004 08:27:24 -0000 T> T> @@ -277,7 +277,7 @@ T> T> struct divert_tag *dt; T> T> int error = 0; T> T> T> T> - KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null")); T> T> + m->m_pkthdr.rcvif = NULL; T> T> T> T> if (control) T> T> m_freem(control); /* XXX */ T> T> -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="ip_divert.c.diff" Index: ip_divert.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/ip_divert.c,v retrieving revision 1.107 diff -u -r1.107 ip_divert.c --- ip_divert.c 8 Nov 2004 14:44:53 -0000 1.107 +++ ip_divert.c 12 Nov 2004 10:28:11 -0000 @@ -277,21 +277,22 @@ struct divert_tag *dt; int error = 0; - KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null")); + m->m_pkthdr.rcvif = NULL; if (control) m_freem(control); /* XXX */ - mtag = m_tag_get(PACKET_TAG_DIVERT, - sizeof(struct divert_tag), M_NOWAIT); - if (mtag == NULL) { - error = ENOBUFS; - goto cantsend; - } - dt = (struct divert_tag *)(mtag+1); - dt->info = 0; - dt->cookie = 0; - m_tag_prepend(m, mtag); + if ((mtag = m_tag_find(m, PACKET_TAG_DIVERT, NULL)) == NULL) { + mtag = m_tag_get(PACKET_TAG_DIVERT, sizeof(struct divert_tag), + M_NOWAIT | M_ZERO); + if (mtag == NULL) { + error = ENOBUFS; + goto cantsend; + } + dt = (struct divert_tag *)(mtag+1); + m_tag_prepend(m, mtag); + } else + dt = (struct divert_tag *)(mtag+1); /* Loopback avoidance and state recovery */ if (sin) { --EeQfGwPcQSOJBaQU-- From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 14:51:34 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3725B16A4CE for ; Fri, 12 Nov 2004 14:51:34 +0000 (GMT) Received: from r2d2.bromirski.net (r2d2.bromirski.net [217.153.57.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9091D43D1D for ; Fri, 12 Nov 2004 14:51:33 +0000 (GMT) (envelope-from lbromirski@mr0vka.eu.org) Received: from [127.0.0.1] (unknown [195.117.157.3]) by r2d2.bromirski.net (Postfix) with ESMTP id CBED8108D6E for ; Fri, 12 Nov 2004 15:59:40 +0100 (CET) Message-ID: <4194CDF9.3000609@mr0vka.eu.org> Date: Fri, 12 Nov 2004 15:51:37 +0100 From: =?ISO-8859-2?Q?=A3ukasz_Bromirski?= User-Agent: Mozilla Thunderbird 0.8 (Windows/20041019) X-Accept-Language: en-us, en MIME-Version: 1.0 To: net@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Scan-Module: SMTP[mks_vir 2004.10.22 (2004.10.07)] Subject: OpenBGPd? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 14:51:34 -0000 Hi, Is anyone working on a port of OpenBGPd, or current version of Quagga (0.97.3)? -- this space was intentionally left blank | Łukasz Bromirski you can insert your favourite quote here | lukasz:bromirski,net _________________________________________________________________ List sprawdzony skanerem poczty mks_vir ( http://www.mks.com.pl ) From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 14:59:10 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1C7E16A4CE for ; Fri, 12 Nov 2004 14:59:10 +0000 (GMT) Received: from vampire.homelinux.org (p548082DF.dip.t-dialin.net [84.128.130.223]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8644143D31 for ; Fri, 12 Nov 2004 14:59:09 +0000 (GMT) (envelope-from mlaier@vampire.homelinux.org) Received: (qmail 92219 invoked by uid 1001); 12 Nov 2004 14:58:14 -0000 Date: Fri, 12 Nov 2004 15:58:14 +0100 From: Max Laier To: Ruslan Ermilov Message-ID: <20041112145814.GA92163@router.laiers.local> References: <200411112124.12616.max@love2party.net> <20041112083014.GB41844@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041112083014.GB41844@ip.net.ua> User-Agent: Mutt/1.4.2.1i cc: Max Laier cc: freebsd-net@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: in.c autoadding prefix route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 14:59:10 -0000 On Fri, Nov 12, 2004 at 10:30:14AM +0200, Ruslan Ermilov wrote: > Hi Max, > > On Thu, Nov 11, 2004 at 09:24:05PM +0100, Max Laier wrote: > > I know I have sent this a couple of times before, but never got anywhere. This > > time I am set to commit! > > > Hey, you did it! ;) > > > The attached patch (http://people.freebsd.org/~mlaier/in.c.patch) derived from > > WIDE via OpenBSD in.c, rev 1.21 improves the handling of automatic prefix > > routes. > > > > Right now you can't have two legs into the same network. If you want to, you > > must give on of the interfaces a host address only (netmask /32). This way it > > is not possible to hand over the route if one of the interfaces is > > "removed" (however this is done in the special case). > > > > The patch allows to add more than on IPv4 address with the same prefix. In the > > case that there is a route already, we leave it alone and add the new address > > without the IFA_ROUTE flag. When we remove an address later on, that has a > > route associated, we try to find an alternative address to use for the route > > and hand it over. > > > I cannot give your patch a thorough review at the moment, but I like the > algorithm, and I don't see how it can hurt anything. > > > --- ../dist/sys/netinet/in.c Sat Nov 6 21:01:08 2004 > > +++ sys/netinet/in.c Mon Nov 8 02:05:17 2004 > > @@ -654,14 +684,7 @@ > > register struct ifnet *ifp; > > register struct in_ifaddr *ia; > > { > > - > > - if ((ia->ia_flags & IFA_ROUTE) == 0) > > - return; > > - if (ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT)) > > - rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST); > > - else > > - rtinit(&(ia->ia_ifa), (int)RTM_DELETE, 0); > > - ia->ia_flags &= ~IFA_ROUTE; > > + in_scrubprefix(ia); > > } > > > Looks like "ifp" argument is no longer needed for in_ifscrub(), > perhaps it should be killed then. As in_ifscrub() isn't static in in.c I think it must be considered kernel API and hence I will wait with this cleanup 'till after the MFC. I otherwise agree that it should be done. > Also, there are a lot of style bugs (besides those that others > have already mentioned), the most annoying is comments -- they > should be written as per style(9) (make them look like the real > sentences). I updated the patch at: http://people.freebsd.org/~mlaier/in.c.patch with new comments. Can you be more specific about the other style(9) violations, as I don't seem to find them. K&R was choosen as the rest of in.c is K&R still and I think style(9) requires that the overall style of a file is maintained. Thanks. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 21:07:29 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DB6C16A4CE for ; Fri, 12 Nov 2004 21:07:29 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 076B343D2F for ; Fri, 12 Nov 2004 21:07:29 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id F1853651FA; Fri, 12 Nov 2004 21:07:27 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 64928-02; Fri, 12 Nov 2004 21:07:27 +0000 (GMT) Received: from empiric.dek.spc.org (adsl-64-171-184-73.dsl.snfc21.pacbell.net [64.171.184.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 1BFCF651EB; Fri, 12 Nov 2004 21:07:27 +0000 (GMT) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 2F4EE66A7; Fri, 12 Nov 2004 13:07:16 -0800 (PST) Date: Fri, 12 Nov 2004 13:07:16 -0800 From: Bruce M Simpson To: ?ukasz Bromirski Message-ID: <20041112210716.GC830@empiric.icir.org> References: <4194CDF9.3000609@mr0vka.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4194CDF9.3000609@mr0vka.eu.org> cc: net@freebsd.org Subject: Re: OpenBGPd? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 21:07:29 -0000 On Fri, Nov 12, 2004 at 03:51:37PM +0100, ?ukasz Bromirski wrote: > Is anyone working on a port of OpenBGPd, or current version of Quagga > (0.97.3)? I'm not, but I intend to commit a port of XORP immediately after the next point release. BMS From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 00:58:31 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B633A16A4CE for ; Sat, 13 Nov 2004 00:58:31 +0000 (GMT) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71E9F43D1F for ; Sat, 13 Nov 2004 00:58:31 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id EFE95C968; Fri, 12 Nov 2004 19:58:30 -0500 (EST) Received: by canoe.dclg.ca (Postfix, from userid 101) id 06FFB64AA; Fri, 12 Nov 2004 19:58:28 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16789.23604.767942.781443@canoe.dclg.ca> Date: Fri, 12 Nov 2004 19:58:28 -0500 To: freebsd-net@freebsd.org X-Mailer: VM 7.17 under 21.5 (beta17) "chayote" (+CVS-20040321) XEmacs Lucid Subject: Trendnet TU-ET100C X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 00:58:31 -0000 Has anyone seen, or is anyone working on a driver for the TrendNet TU-ET100C ... which is a USB to Ethernet product. Alternatively, is anyone working on a USB to Ethernet driver that's not yet in the tree? Alternatively again, do USB drivers recognise themselves via product numbers and is there a chance that there's a known chipset in there? How might I tell? Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can only be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================ From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 12:19:24 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78ECB16A4CE for ; Sat, 13 Nov 2004 12:19:24 +0000 (GMT) Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id EADEA43D1D for ; Sat, 13 Nov 2004 12:19:21 +0000 (GMT) (envelope-from jhay@icomtek.csir.co.za) Received: from zibbi.icomtek.csir.co.za (localhost [127.0.0.1]) iADCJJZV059737 for ; Sat, 13 Nov 2004 14:19:19 +0200 (SAST) (envelope-from jhay@zibbi.icomtek.csir.co.za) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.12.10/8.12.10/Submit) id iADCJJl5059736 for freebsd-net@freebsd.org; Sat, 13 Nov 2004 14:19:19 +0200 (SAST) (envelope-from jhay) Date: Sat, 13 Nov 2004 14:19:18 +0200 From: John Hay To: freebsd-net@freebsd.org Message-ID: <20041113121918.GA59462@zibbi.icomtek.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: multicast socket behaviour on IPv4 and IPv6 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 12:19:24 -0000 Hi Guys, While debugging a misbehaving program, I found that on FreeBSD, if you bind() a udp socket to a multicast address, so that you can receive on it, and you then mistakenly use it to send, the behaviour between IPv4 and IPv6 differ. On IPv6 you get a error EOPNOTSUPP, which is understandable, but on IPv4 the packet is actually send with the source address being the multicast address. Is that the expected behaviour? Looking through the code, I see that in IPv6 there is a lot of sanity checks in the output routine, but very little to check the source address in the IPv4 output routine. John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 14:13:40 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0E1E16A4CE for ; Sat, 13 Nov 2004 14:13:40 +0000 (GMT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67E1343D49 for ; Sat, 13 Nov 2004 14:13:39 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [193.64.42.134] (h86.vuokselantie10.fi [193.64.42.134]) by silver.he.iki.fi (8.13.1/8.11.4) with ESMTP id iADEDaId013464; Sat, 13 Nov 2004 16:13:36 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <41961690.8040406@he.iki.fi> Date: Sat, 13 Nov 2004 16:13:36 +0200 From: Petri Helenius User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-2?Q?=A3ukasz_Bromirski?= References: <4194CDF9.3000609@mr0vka.eu.org> In-Reply-To: <4194CDF9.3000609@mr0vka.eu.org> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit cc: net@freebsd.org Subject: Re: OpenBGPd? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 14:13:40 -0000 Łukasz Bromirski wrote: > Hi, > > Is anyone working on a port of OpenBGPd, or current version of Quagga > (0.97.3)? > openbgpd compiles fairly painlessly on 5.3. Making it work on 5.2.1 was definetly more work. Pete From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 14:53:55 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC8E316A4CE; Sat, 13 Nov 2004 14:53:55 +0000 (GMT) Received: from 69-172-29-112.clvdoh.adelphia.net (69-172-29-112.clvdoh.adelphia.net [69.172.29.112]) by mx1.FreeBSD.org (Postfix) with SMTP id 16C4643D2D; Sat, 13 Nov 2004 14:53:53 +0000 (GMT) (envelope-from fpadfreebsd-net@freebsd.org) Received: from 216.136.204.125 (localhost [127.0.0.1]) by 219.145.224.172 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id for freebsd-net@freebsd.org; Sat, 13 Nov 2004 08:51:56 -0600 Received: from [216.136.204.125] (Forwarded-For: [219.145.224.172]) by 216.136.204.125 (mshttpd); Sat, 13 Nov 2004 08:51:56 -0600 Date: Sat, 13 Nov 2004 08:51:56 -0600 From: fpadfreebsd-net@freebsd.org <"Tina Schultz"@FreeBSD.ORG> To: freebsd-net@freebsd.org Message-id: X-Mailer: iPlanet Messenger Express 5.2 HotFix 1.21 (built Sep 8 2003) Content-language: en Content-transfer-encoding: 7Bit Content-disposition: inline MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Chea.pest Phenter.mine on the Internet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-net@freebsd.org List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 14:53:56 -0000 Freebsd-net coastal stylites accession eukaryote reducible mockingbird spyglass lodgepole rhododendron spawn [1][ad.gif?684] [2]bye bye rafferty dhabi blurry winkle visionary paramus bleach puppy selenite feathery quirinal diathesis circle lacerta arpeggio breed inaccuracy periphrastic nor flag anorexia fruehauf fence participant atmospheric handel adenosine armonk tree exhume confer pterodactyl homeland broody chunky am atrophic clamshell arachnid indiscernible aeneid advantageous blockage cambodia thalia oceanic senor slap maze enhance hewitt foxhound embower irreducible oft defuse neoclassic reparation abbreviate opec congregate adulthood vat sheriff flop spade demountable regrettable clonic great omen yttrium perimeter nodal lummox gopher irving elucidate deputy resuming nationwide pitchblende shriek conklin centipede batch annuli abscissa crux epimorphism col juke lavoisier tubular courtyard decorous is couldn't swank libya bergman codfish consequential pappas quetzal deaden bender referent delinquent nowise guilt squeeze anglicanism buttock hookworm abigail dutiful sketchpad sp ot cleric cobblestone edible quakeress chic paunchy trivalent suburbia intimidate pillsbury surround guesswork stadium titanate reciprocal cometary kidney age dovetail depute laban occurring calcareous sulphur shadbush malton atone atalanta avow brandish amaze armstrong allergic hereto chink sheraton fetal inalterable fight repudiate salmonella await asynchronous volvo malady nebula juke afire abreast point squeal bivouac hellgrammite rhenish advocacy declaim abdominal prolific anagram arequipa adult sol brahms swelter meyer indoctrinate ashman beautify buret codify cowboy millionth schneider scripture archbishop want cocklebur eigenvalue due philodendron escheat rainfall trouser lyman innkeeper mealy arcane cohesive datum yell barbell yellowknife tie rum battelle conklin denumerable cocktail knowles territorial brunswick baste concur amid caliber telltale dare diffident optoisolate salish betelgeuse hexadecimal swank scabrous therefore insofar derogate daffy catlike adventu rous emanate buildup visor dryad coolant snappish acidulous incisive supernovae columnar splotch tactician snobbery uniaxial archetypical harvard handsome intoxicate sage conklin do arboreal quick teammate gadolinium quinine adequate vexation jawbone cultivable ellwood resistible boardinghouse date elliptic kingpin fell aisle bridegroom accusatory jogging chromatograph varistor compulsory ward pasteur calculus asleep doe indifferent practise salvo la inscrutable cacao worst rave activate among moneymake tarpon complexion transship topaz conciliate anchorage risky madsen worrisome bisque bagley fill wert assemblage tuck meteorite chin bloodstone coccidiosis gilmore stiff colorimeter antisemitic archangel usher cut wrack deputy scoria calder cry ambidextrous year boeotian pumpkin convex adjust auerbach cool immaculate impart References 1. http://AqWyqLDdWpivfUN.lzogfefdf.info/?138 2. http://zjqsl.lavnfjefs.info/bye/?138/ From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 15:36:39 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5D3116A4CE for ; Sat, 13 Nov 2004 15:36:39 +0000 (GMT) Received: from pan.gwi.net (pan.gwi.net [207.5.128.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 121A843D1F for ; Sat, 13 Nov 2004 15:36:39 +0000 (GMT) (envelope-from kurlon@gwi.net) Received: from [192.168.1.5] (66-55-199-20.gwi.net [66.55.199.20]) by pan.gwi.net (8.12.9p2/8.12.9) with ESMTP id iADFab7C041944 for ; Sat, 13 Nov 2004 10:36:38 -0500 (EST) (envelope-from kurlon@gwi.net) Mime-Version: 1.0 (Apple Message framework v619) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-net@freebsd.org From: Josh Coombs Date: Sat, 13 Nov 2004 10:36:37 -0500 X-Mailer: Apple Mail (2.619) Subject: Netgraph node with inet and ethernet hooks? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 15:36:39 -0000 I'm trying to find a way to get PPPoE half-bridging functionality working with FreeBSD, similar to what Cisco routers and many older ISDN routers can/could do. Basically, I'm trying to get the ip/subnet assigned to the ppp link usable on an ethernet interface. So, on the radius side, you have (format is off, I know...) user dsluser, prefix=P fixed-address = 10.0.0.1 fixed-netmask = 255.255.255.0 Normally, when mpd connects up, 10.0.0.1 will be assigned with a /32 netmask to ng0 or whatever netgraph iface node is created for the job. Warning, bad ascii table: +-----+ |xl1 | |ether| | | +-----+ |orphans | ethernet| +--------+ |0000000b| |pppoe | | | +--------+ |mpd983_pppoe | link0 | +--------+ +------------+ +--------+ |00000005|bypass |mpd983_pppoe|VJC Support |00000009| |socket |-------|00000007 |------------|vjc | | | bypass|ppp | VJC Support| | +--------+ +------------+ +--------+ |demand |inet | | | ppp| | +--------+ | |00000008| |--------------|bpf | mpd| | +--------+ |iface | inet| +--------+ |ng0 | |00000006| |iface | +--------+ Having spent a couple nights trying to get myself up to speed with netgraph, it seems if I can get a node that takes inet (ip) in, and spits out ethernet, I can then attach from the bpf node direct to an existing ethernet interface. Looking around, I can't find a node type that accomplishes this. Does such a connector exist? If not, is the closest logical option to stick a ng_socket between the bpf and ethernet nodes, and do the ethernet [en,de]capsulation in userland? Joshua Coombs From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 16:00:09 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 349EC16A4CE for ; Sat, 13 Nov 2004 16:00:09 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9447843D58 for ; Sat, 13 Nov 2004 16:00:08 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id A8FBE1FF92F; Sat, 13 Nov 2004 17:00:07 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id ABD5A1FF90C; Sat, 13 Nov 2004 17:00:05 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id C277A15602; Sat, 13 Nov 2004 15:59:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id B771C15389; Sat, 13 Nov 2004 15:59:34 +0000 (UTC) Date: Sat, 13 Nov 2004 15:59:34 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Josh Coombs In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-net@freebsd.org Subject: Re: Netgraph node with inet and ethernet hooks? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 16:00:09 -0000 On Sat, 13 Nov 2004, Josh Coombs wrote: > I'm trying to find a way to get PPPoE half-bridging functionality > working with FreeBSD, similar to what Cisco routers and many older ISDN > routers can/could do. Basically, I'm trying to get the ip/subnet > assigned to the ppp link usable on an ethernet interface. I am going to assume the FreeBSD should be the NAS and not the CPE. > So, on the radius side, you have (format is off, I know...) > > user dsluser, prefix=P > fixed-address = 10.0.0.1 > fixed-netmask = 255.255.255.0 what I though that Cisco, etc. are actually doing is: user dsluser, prefix=P fixed-address = 10.0.0.0 fixed-netmask = 255.255.255.0 to take the first IP out of the subnet and assign it to the remote end: Cisco: int Lo1 192.168.199.17 int Vt1 ip unnumbered Loopback1 so the link would look like: NAS: CPE: Cisco <- 192.168.199.17 PtP 10.0.0.1 -> DSL router ^ ^ \-------------/ IPCP handshake And further the cisco adds a route like route add 10.0.0.0/24 10.0.0.1 But I still call that a HACK. Use a transfer IP for the customer (static or out of a pool) for IPCP PtP link and route the /24 to this IP then. user dsluser, prefix=P Framed-IP-Address = "172.16.36.1", Framed-IP-Netmask = "255.255.255.255", Framed-Route = "10.0.0.0/24 172.16.36.1" you need one single extra IP for that but it's a lot "cleaner" and should always work w/o problems. -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 16:12:09 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DD0B16A4CE; Sat, 13 Nov 2004 16:12:08 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 854DE43D31; Sat, 13 Nov 2004 16:12:08 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CT0VT-0003Ie-00; Sat, 13 Nov 2004 17:12:07 +0100 Received: from [217.227.147.81] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CT0VT-0006U2-00; Sat, 13 Nov 2004 17:12:07 +0100 From: Max Laier To: freebsd-net@freebsd.org Date: Sat, 13 Nov 2004 17:12:13 +0100 User-Agent: KMail/1.7.1 References: <4194CDF9.3000609@mr0vka.eu.org> <41961690.8040406@he.iki.fi> In-Reply-To: <41961690.8040406@he.iki.fi> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1816423.yr3di69NTJ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411131712.22388.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: net@freebsd.org Subject: Re: OpenBGPd? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 16:12:09 -0000 --nextPart1816423.yr3di69NTJ Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 13 November 2004 15:13, Petri Helenius wrote: > =A3ukasz Bromirski wrote: > > Hi, > > > > Is anyone working on a port of OpenBGPd, or current version of Quagga > > (0.97.3)? > > openbgpd compiles fairly painlessly on 5.3. Making it work on 5.2.1 was > definetly more work. Do you mind to submitt it as a port? =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1816423.yr3di69NTJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBljJmXyyEoT62BG0RArtcAJ0TNN/WDpFnmuZRpmGtiOuGXxoBbQCfQyer d2uwTNoIxNwFSxhVYzdO+fI= =+brU -----END PGP SIGNATURE----- --nextPart1816423.yr3di69NTJ-- From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 16:12:09 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DD0B16A4CE; Sat, 13 Nov 2004 16:12:08 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 854DE43D31; Sat, 13 Nov 2004 16:12:08 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CT0VT-0003Ie-00; Sat, 13 Nov 2004 17:12:07 +0100 Received: from [217.227.147.81] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CT0VT-0006U2-00; Sat, 13 Nov 2004 17:12:07 +0100 From: Max Laier To: freebsd-net@freebsd.org Date: Sat, 13 Nov 2004 17:12:13 +0100 User-Agent: KMail/1.7.1 References: <4194CDF9.3000609@mr0vka.eu.org> <41961690.8040406@he.iki.fi> In-Reply-To: <41961690.8040406@he.iki.fi> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1816423.yr3di69NTJ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411131712.22388.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 cc: net@freebsd.org Subject: Re: OpenBGPd? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 16:12:09 -0000 --nextPart1816423.yr3di69NTJ Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 13 November 2004 15:13, Petri Helenius wrote: > =A3ukasz Bromirski wrote: > > Hi, > > > > Is anyone working on a port of OpenBGPd, or current version of Quagga > > (0.97.3)? > > openbgpd compiles fairly painlessly on 5.3. Making it work on 5.2.1 was > definetly more work. Do you mind to submitt it as a port? =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1816423.yr3di69NTJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBljJmXyyEoT62BG0RArtcAJ0TNN/WDpFnmuZRpmGtiOuGXxoBbQCfQyer d2uwTNoIxNwFSxhVYzdO+fI= =+brU -----END PGP SIGNATURE----- --nextPart1816423.yr3di69NTJ-- From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 16:51:38 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E67D216A4CE for ; Sat, 13 Nov 2004 16:51:38 +0000 (GMT) Received: from pan.gwi.net (pan.gwi.net [207.5.128.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6381F43D5A for ; Sat, 13 Nov 2004 16:51:38 +0000 (GMT) (envelope-from kurlon@gwi.net) Received: from [192.168.1.5] (66-55-199-20.gwi.net [66.55.199.20]) by pan.gwi.net (8.12.9p2/8.12.9) with ESMTP id iADGpa7C048022; Sat, 13 Nov 2004 11:51:37 -0500 (EST) (envelope-from kurlon@gwi.net) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <4836893C-3594-11D9-98D1-00039348130C@gwi.net> Content-Transfer-Encoding: 7bit From: Josh Coombs Date: Sat, 13 Nov 2004 11:51:36 -0500 To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.619) cc: freebsd-net@freebsd.org Subject: Re: Netgraph node with inet and ethernet hooks? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 16:51:39 -0000 On Nov 13, 2004, at 10:59 AM, Bjoern A. Zeeb wrote: > On Sat, 13 Nov 2004, Josh Coombs wrote: > >> I'm trying to find a way to get PPPoE half-bridging functionality >> working with FreeBSD, similar to what Cisco routers and many older >> ISDN >> routers can/could do. Basically, I'm trying to get the ip/subnet >> assigned to the ppp link usable on an ethernet interface. > > I am going to assume the FreeBSD should be the NAS and not the CPE. Correct, the CPE is any DSL modem doing RFC1483 bridging, the FreeBSD box is doing PPPoE and linking that to the LAN. > Cisco: > int Lo1 > 192.168.199.17 > int Vt1 > ip unnumbered Loopback1 > > so the link would look like: > > NAS: CPE: > Cisco <- 192.168.199.17 PtP 10.0.0.1 -> DSL router > ^ ^ > \-------------/ > IPCP handshake > > And further the cisco adds a route like > route add 10.0.0.0/24 10.0.0.1 > > But I still call that a HACK. Use a transfer IP for the customer > (static or out of a pool) for IPCP PtP link and route the /24 to > this IP then. > > user dsluser, prefix=P > Framed-IP-Address = "172.16.36.1", > Framed-IP-Netmask = "255.255.255.255", > Framed-Route = "10.0.0.0/24 172.16.36.1" > > you need one single extra IP for that but it's a lot "cleaner" and > should always work w/o problems. > The setup above, using a transfer IP was one of the first things we tried. This setup only works if your dslam will accept and advertise framed-route's handed out via radius. Turns out we have atleast one model that won't. It strictly operates based on IP-Address and Netmask to determine what it advertises out. The other roadblock, was most consumer CPE/Routers and broadband routers have no way to turn off NAT but still do routing. So, this is why I started investigating doing this under FreeBSD so I can package up a suggested system, and offer it if customers balk at the price of Cisco 837's. On Zyxels, the only conf besides basic ppp on the ISDN interface, was to enable 'half-bridge' mode. At that point whatever IP was assigned via ppp became the ip assigned to the LAN interface. LAN systems could then hardcode ip's within the assigned subnet, and point to the ip assigned via ppp as the gateway. Joshua Coombs From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 17:00:59 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDE2E16A4CE for ; Sat, 13 Nov 2004 17:00:59 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 500A543D39 for ; Sat, 13 Nov 2004 17:00:59 +0000 (GMT) (envelope-from xinizul@gmail.com) Received: by wproxy.gmail.com with SMTP id 71so166494wra for ; Sat, 13 Nov 2004 09:00:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=j0iR0/ajKlxQu9dvoMqOJmgqfKzzoH+Z/VbYN4JPRDyzC4YRgEpNombMnDmEo/yehrlEeav1AXA89Lm4VQiN4DwNlutnod3oKnpqyj2uNJF/dsyDuEdW9xRI31SzCl/QNcS2vOJUNA+HUZayT//ypZkKPOslK49iJaQqaqvEPAc= Received: by 10.54.18.27 with SMTP id 27mr305585wrr; Sat, 13 Nov 2004 09:00:58 -0800 (PST) Received: by 10.54.37.69 with HTTP; Sat, 13 Nov 2004 09:00:58 -0800 (PST) Message-ID: <4d073056041113090078fbb537@mail.gmail.com> Date: Sat, 13 Nov 2004 18:00:58 +0100 From: Xinizul Xinizul To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Asus WiiFi@Home help please X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Xinizul Xinizul List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 17:00:59 -0000 Hello all: I'm a newbie trying to configure my Asus WIFI@Home PCI like card. I have a 3Com Wireless router, currently conected through my ethernet card Since FreeBSD does not recognize my wireless card :-( I've used the ndis tools to import the drivers: Rt2400.INF, rt2400.sys (I have another rt2400.cat file I don't know what it is) The problem is that I am not able to make it work: 1) First of all: ifconfig ndis0 inet 192.168.2.3 netmask 255.255.255.0 ssid Asus_3Com Create the following record: ndis0: flags=8843 mtu 1500 inet6 fe80::20e:a6ff:feb0:2411%ndis0 prefixlen 64 scopeid 0x5 ether 00:0e:a6:b0:24:11 media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) status: associated ssid Asus_3Com 1:Asus_3Com channel 6 authmode OPEN powersavemode OFF powersavesleep 100 rtsthreshold 2312 protmode CTS wepmode OFF weptxkey 1 I'm not able to set the inet IP parameter correctly !!! it just ignores me (probably because the 192.268.2.3 doesn't exists) When I use the IP related to my ethernet card: 192.168.2.2 it : 1) Not works ... 2) it freezes my computer. It would be nice if somebody could tell me how to create this new IP for my wirless card. I would be thankful if anybody could help me ti install correctly the wirless network. Another question: I downloaded the sourcecode of the driver from the vendor but it is not ready to compile under FreeBSD , Has someone compiled it ? Thanks a lot, Xinizul From owner-freebsd-net@FreeBSD.ORG Sat Nov 13 17:18:16 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CADF016A4CE for ; Sat, 13 Nov 2004 17:18:16 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 588A643D31 for ; Sat, 13 Nov 2004 17:18:16 +0000 (GMT) (envelope-from xinizul@gmail.com) Received: by wproxy.gmail.com with SMTP id 57so553147wri for ; Sat, 13 Nov 2004 09:18:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=i3jGPOg47kRvmC1d3WzyRD/vXtLQA05AAJZD6CvuWAzreWf3WXR8RjqiNCfzeT1SnWIvO2eVbZm3saV8D75344r7qIighOR8PkXUPT74QtMAYteX84LSjrNRsHKTlUIjrL5wyg6wbuJ9+zJYXPGPQ/L7Oze5Jn7MdaqvyZOAz4E= Received: by 10.54.18.78 with SMTP id 78mr348576wrr; Sat, 13 Nov 2004 09:18:15 -0800 (PST) Received: by 10.54.37.69 with HTTP; Sat, 13 Nov 2004 09:18:15 -0800 (PST) Message-ID: <4d07305604111309183e1efcfc@mail.gmail.com> Date: Sat, 13 Nov 2004 18:18:15 +0100 From: Xinizul Xinizul To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Net setup failing at startup X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Xinizul Xinizul List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2004 17:18:16 -0000 Hello all, Just a simple question. When booting my FreeBSD 5.3 it launches the dhclient application and seems all was ok. But once finished the startup It seems the internet connection was not properly set. I am connected to an ADSL provider and I have not a static IP. Then I have always to configure it through the sysinstall application. Afterwards it works nice. But everytime I reboot the "devy" I have to repeat the process through sysinstall. Since I'm not a network expert I will be very thankful to anybody that could help me. It'd be also very nice if somebody could give me a link to some free Network Adiminstration book or documentation (better if based on FreeBSD) just to learn. (In fact I've installed FreeBSD to start learning how to manage a Unix OS, not a Unix-like OS as linux ;-). Thanks a lot, Xinizul