From owner-freebsd-net Sun Jun 24 6:49:53 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail2.home.nl (mail2.home.nl [213.51.129.226]) by hub.freebsd.org (Postfix) with ESMTP id D470437B401 for ; Sun, 24 Jun 2001 06:49:50 -0700 (PDT) (envelope-from nascar24@home.nl) Received: from testuser ([213.51.193.168]) by mail2.home.nl (InterMail vM.4.01.03.00 201-229-121) with SMTP id <20010624144931.ITRC6179.mail2.home.nl@testuser> for ; Sun, 24 Jun 2001 15:49:31 +0100 Message-ID: <002101c0fcb0$a97f9bd0$0900a8c0@testuser> From: "Marcel Dijk" To: Subject: FXP / site2site Date: Sun, 24 Jun 2001 15:22:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello, Is it possible to configure proftpd in such a way that it supports site-to-site transports (FXP)? Marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sun Jun 24 22:46:57 2001 Delivered-To: freebsd-net@freebsd.org Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by hub.freebsd.org (Postfix) with ESMTP id 978CF37B401 for ; Sun, 24 Jun 2001 22:46:54 -0700 (PDT) (envelope-from cjc@earthlink.net) Received: from blossom.cjclark.org (dialup-209.247.139.131.Dial1.SanJose1.Level3.net [209.247.139.131]) by albatross.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id WAA13945 for ; Sun, 24 Jun 2001 22:46:52 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.4/8.11.3) id f5P5mHL15340 for freebsd-net@freebsd.org; Sun, 24 Jun 2001 22:48:17 -0700 (PDT) (envelope-from cjc) Date: Sun, 24 Jun 2001 22:48:17 -0700 From: "Crist J. Clark" To: freebsd-net@freebsd.org Subject: hping2 Headaches Message-ID: <20010624224817.L11961@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I am having a hell of a time getting hping2 (from ports) make sense to me. Can someone hint me in as to what is going on here? I'm running hping2 in debugger and I get to where it puts the packet on the wire in 'send_ip()' in sendip.c, result = sendto(sockraw, packet, packetsize, 0, (struct sockaddr*)&remote, sizeof(remote)); Now, 'packet' is a pretty standard TCP/IP packet. I am trying to craft a RST with certain seq. and ack. numbers. The source port number will be at bytes 20 and 21 in such a packet (20 for the IP header and source port is the first two bytes from the TCP header). So, in gdb(1), I check those values, (gdb) x/2b packet + 20 0x8062014: 0x04 0xab And it reports the values I wanted (1195 decimal). (I'll skip the problem reading values from the command line which makes entering the seq. and ack. painful, I understand why that does not work.) However, I'm watching what actually comes out of the interface (tun0) with tcpdump(8), 22:32:22.335423 209.247.139.131.13811 > 207.217.77.22.119: R 2147483647:2147483647(0) win 512 0x0000 4500 0028 50c0 0000 4006 afa5 d1f7 8b83 E..(P...@....... 0x0010 cfd9 4d16 35f3 0077 7fff ffff 17a4 c243 ..M.5..w.......C 0x0020 5004 0200 a324 0000 P....$.. But is sendto(2) messing up sending it or tcpdump(8) messing up reading/displaying it? And this works find when I send it over an Ethernet device (dc0). At least both the sender and receiver report the same, correct thing from tcpdump(8). Not quite sure what to check next. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 6:42:56 2001 Delivered-To: freebsd-net@freebsd.org Received: from mine.kame.net (kame195.kame.net [203.178.141.195]) by hub.freebsd.org (Postfix) with ESMTP id C7EA337B406; Mon, 25 Jun 2001 06:42:52 -0700 (PDT) (envelope-from sakane@kame.net) Received: from localhost (PPP2543.tokyo-ip.dti.ne.jp [211.132.91.43]) by mine.kame.net (8.11.1/3.7W) with ESMTP id f5PELMY12556; Mon, 25 Jun 2001 23:21:22 +0900 (JST) To: brad@wcubed.net Cc: freebsd-net@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Problems with IPsec tunnel In-Reply-To: Your message of "Fri, 22 Jun 2001 14:35:16 -0600 (MDT)" References: X-Mailer: Cue version 0.6 (010413-1707/sakane) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Message-Id: <20010622232504U.sakane@kame.net> Date: Fri, 22 Jun 2001 23:25:04 +0900 From: Shoichi Sakane X-Dispatcher: imput version 20000228(IM140) Lines: 4 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Can you tell me if I will run into any problems running NAT on my gateways? I have never used NAT with IPSec. You should tell this mailing list your problem. Because there are probably people who have same problem of you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 8:42:45 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail.datausa.com (mail.datausa.com [207.174.131.1]) by hub.freebsd.org (Postfix) with ESMTP id 6C5AF37B40B; Mon, 25 Jun 2001 08:42:41 -0700 (PDT) (envelope-from brad@wcubed.net) Received: from localhost (brad@localhost) by mail.datausa.com (8.9.3/8.9.1) with ESMTP id JAA04149; Mon, 25 Jun 2001 09:35:04 -0600 (MDT) Date: Mon, 25 Jun 2001 09:35:04 -0600 (MDT) From: Brad Waite X-Sender: brad@mail.datausa.com To: Shoichi Sakane Cc: freebsd-net@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Problems with IPsec tunnel In-Reply-To: <20010622232504U.sakane@kame.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Soichi, As it turns out, NAT works fine. Thanks for all your help. -Brad On Fri, 22 Jun 2001, Shoichi Sakane wrote: > > Can you tell me if I will run into any problems running NAT on my gateways? > > I have never used NAT with IPSec. You should tell this mailing list your > problem. Because there are probably people who have same problem of you. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 12: 3:13 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail.chem.msu.ru (mail.chem.msu.ru [195.208.208.19]) by hub.freebsd.org (Postfix) with ESMTP id 49D7E37B40B; Mon, 25 Jun 2001 12:03:02 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su ([158.250.32.97]) by mail.chem.msu.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id NHPRVFB2; Mon, 25 Jun 2001 22:58:21 +0400 Received: (from yar@localhost) by comp.chem.msu.su (8.11.1/8.11.1) id f5PJ2ux13205; Mon, 25 Jun 2001 23:02:56 +0400 (MSD) (envelope-from yar) Date: Mon, 25 Jun 2001 23:02:55 +0400 From: Yar Tikhiy To: audit@freebsd.org, net@freebsd.org Subject: Long ether frames & MTU Message-ID: <20010625230255.A11496@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi there, While more and more Ethernet NIC drivers start supporting long frames (>1518 bytes), the user/admin still cannot raise MTU on an Ethernet interface above the 1500 byte limit due to outdated code in net/if_ethersubr.c Please review the following patch that removes the limitation, and also substitutes predefined symbolic names for some numeric constants. -- Yar --- if_ethersubr.c Wed Mar 14 01:00:32 2001 +++ /home/yar/if_ethersubr.c Mon Jun 25 22:45:25 2001 @@ -677,8 +677,8 @@ if_attach(ifp); ifp->if_type = IFT_ETHER; - ifp->if_addrlen = 6; - ifp->if_hdrlen = 14; + ifp->if_addrlen = ETHER_ADDR_LEN; + ifp->if_hdrlen = ETHER_HDR_LEN; ifp->if_mtu = ETHERMTU; ifp->if_resolvemulti = ether_resolvemulti; if (ifp->if_baudrate == 0) @@ -805,7 +805,7 @@ /* * Set the interface MTU. */ - if (ifr->ifr_mtu > ETHERMTU) { + if (ifr->ifr_mtu > ETHERMTU + ifp->if_hdrlen - ETHER_HDR_LEN) { error = EINVAL; } else { ifp->if_mtu = ifr->ifr_mtu; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 12:27:25 2001 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 11B9B37B406; Mon, 25 Jun 2001 12:27:18 -0700 (PDT) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f5PJPgs08421; Mon, 25 Jun 2001 14:25:42 -0500 (CDT) (envelope-from jlemon) Date: Mon, 25 Jun 2001 14:25:42 -0500 From: Jonathan Lemon To: Yar Tikhiy Cc: audit@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: Long ether frames & MTU Message-ID: <20010625142542.Z33375@prism.flugsvamp.com> References: <20010625230255.A11496@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20010625230255.A11496@comp.chem.msu.su> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Jun 25, 2001 at 11:02:55PM +0400, Yar Tikhiy wrote: > Hi there, > > While more and more Ethernet NIC drivers start supporting long > frames (>1518 bytes), the user/admin still cannot raise MTU on an > Ethernet interface above the 1500 byte limit due to outdated code > in net/if_ethersubr.c > > Please review the following patch that removes the limitation, and > also substitutes predefined symbolic names for some numeric constants. > > -- > Yar > > --- if_ethersubr.c Wed Mar 14 01:00:32 2001 > +++ /home/yar/if_ethersubr.c Mon Jun 25 22:45:25 2001 > @@ -677,8 +677,8 @@ > > if_attach(ifp); > ifp->if_type = IFT_ETHER; > - ifp->if_addrlen = 6; > - ifp->if_hdrlen = 14; > + ifp->if_addrlen = ETHER_ADDR_LEN; > + ifp->if_hdrlen = ETHER_HDR_LEN; > ifp->if_mtu = ETHERMTU; > ifp->if_resolvemulti = ether_resolvemulti; > if (ifp->if_baudrate == 0) > @@ -805,7 +805,7 @@ > /* > * Set the interface MTU. > */ > - if (ifr->ifr_mtu > ETHERMTU) { > + if (ifr->ifr_mtu > ETHERMTU + ifp->if_hdrlen - ETHER_HDR_LEN) { I'm not at all sure how this change will help anything, unless each driver alters if_hdrlen. My inclination would be to just leave the code alone, at the standard 1500 MTU. Drivers which actually are able to handle a larger mtu (e.g: 9000 byte Jumbograms) already have to do their own checks, and thus don't call this function. See, for example, any of the gigabit drivers. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 14:56:50 2001 Delivered-To: freebsd-net@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 0E1BE37B406; Mon, 25 Jun 2001 14:56:44 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id HAA08754; Tue, 26 Jun 2001 07:56:29 +1000 (EST) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01K57RGPE3XSVFADV7@cim.alcatel.com.au>; Tue, 26 Jun 2001 07:56:15 +1000 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f5PLuOW82464; Tue, 26 Jun 2001 07:56:24 +1000 (EST envelope-from jeremyp) Content-return: prohibited Date: Tue, 26 Jun 2001 07:56:24 +1000 From: Peter Jeremy Subject: Re: Long ether frames & MTU In-reply-to: <20010625142542.Z33375@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Mon, Jun 25, 2001 at 02:25:42PM -0500 To: Jonathan Lemon Cc: Yar Tikhiy , audit@FreeBSD.ORG, net@FreeBSD.ORG Mail-Followup-To: Jonathan Lemon , Yar Tikhiy , audit@FreeBSD.ORG, net@FreeBSD.ORG Message-id: <20010626075624.D95583@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <20010625230255.A11496@comp.chem.msu.su> <20010625142542.Z33375@prism.flugsvamp.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2001-Jun-25 14:25:42 -0500, Jonathan Lemon wrote: >On Mon, Jun 25, 2001 at 11:02:55PM +0400, Yar Tikhiy wrote: >> Hi there, >> >> While more and more Ethernet NIC drivers start supporting long >> frames (>1518 bytes), the user/admin still cannot raise MTU on an >> Ethernet interface above the 1500 byte limit due to outdated code >> in net/if_ethersubr.c [patch removed] >I'm not at all sure how this change will help anything, unless each >driver alters if_hdrlen. One benefit is for 802.1Q VLAN support - the existence of lots of hard-wired values that restrict frames to 1518 bytes makes configuring VLAN's a pain. It would be nice if attaching a vlan(4) to a driver that handled 1522 byte frames resulted in a 1500 byte MTU on the vlan. > Drivers which actually are able >to handle a larger mtu (e.g: 9000 byte Jumbograms) already have to do >their own checks, and thus don't call this function. IMHO, it would be nicer if more of the checking was centralised, rather than each driver repeating the same checks. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 15:25: 3 2001 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 8D52337B407; Mon, 25 Jun 2001 15:24:55 -0700 (PDT) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f5PMNIb14733; Mon, 25 Jun 2001 17:23:18 -0500 (CDT) (envelope-from jlemon) Date: Mon, 25 Jun 2001 17:23:18 -0500 From: Jonathan Lemon To: Jonathan Lemon , Yar Tikhiy , audit@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: Long ether frames & MTU Message-ID: <20010625172318.C33375@prism.flugsvamp.com> References: <20010625230255.A11496@comp.chem.msu.su> <20010625142542.Z33375@prism.flugsvamp.com> <20010626075624.D95583@gsmx07.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20010626075624.D95583@gsmx07.alcatel.com.au> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, Jun 26, 2001 at 07:56:24AM +1000, Peter Jeremy wrote: > On 2001-Jun-25 14:25:42 -0500, Jonathan Lemon wrote: > >On Mon, Jun 25, 2001 at 11:02:55PM +0400, Yar Tikhiy wrote: > >> Hi there, > >> > >> While more and more Ethernet NIC drivers start supporting long > >> frames (>1518 bytes), the user/admin still cannot raise MTU on an > >> Ethernet interface above the 1500 byte limit due to outdated code > >> in net/if_ethersubr.c > [patch removed] > > >I'm not at all sure how this change will help anything, unless each > >driver alters if_hdrlen. > > One benefit is for 802.1Q VLAN support - the existence of lots of > hard-wired values that restrict frames to 1518 bytes makes configuring > VLAN's a pain. It would be nice if attaching a vlan(4) to a driver that > handled 1522 byte frames resulted in a 1500 byte MTU on the vlan. Maybe I'm being dense here, but even with 1522 byte frames, the MTU of the device should still be 1500. MTU in this context applies to IP, so it wouldn't include either the vlan header or the ethernet header. E.g.: there is this check in vlan_config(): if (p->if_data.ifi_hdrlen == sizeof(struct ether_vlan_header)) ifv->ifv_if.if_mtu = p->if_mtu; else ifv->ifv_if.if_mtu = p->if_data.ifi_mtu - EVL_ENCAPLEN; So if the underlying device is willing to support long frames (which is indicated by hacking in a longer headerlen), the vlan MTU is 1500, and the device MTU is 1500. If the underlying device does not support long frames, then the vlan MTU is reduced appropriately. > > Drivers which actually are able > >to handle a larger mtu (e.g: 9000 byte Jumbograms) already have to do > >their own checks, and thus don't call this function. > > IMHO, it would be nicer if more of the checking was centralised, rather > than each driver repeating the same checks. It might be cleaner if the call to ether_ioctl() passed both the proposed MTU and the maximum MTU that the driver is willing to support. However, that would require quite a bit of code restructuring and modifications to existing drivers. I'm not sure it would provide any benefits, as the code in question is a simply a single 'if' statement. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 15:43:59 2001 Delivered-To: freebsd-net@freebsd.org Received: from aries.ai.net (aries.ai.net [205.134.163.4]) by hub.freebsd.org (Postfix) with ESMTP id C742837B40B; Mon, 25 Jun 2001 15:43:48 -0700 (PDT) (envelope-from deepak@ai.net) Received: from blood (adsl-138-88-48-248.bellatlantic.net [138.88.48.248]) by aries.ai.net (8.9.3/8.9.3) with SMTP id SAA18109; Mon, 25 Jun 2001 18:44:49 -0400 (EDT) (envelope-from deepak@ai.net) Reply-To: From: "Deepak Jain" To: , "freebsd-hackers@FreeBSD. ORG" Subject: fastforwarding? Date: Mon, 25 Jun 2001 18:47:41 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org sysctl -A |grep forward net.inet.ip.forwarding: 1 net.inet.ip.fastforwarding: 0 machdep.forward_irq_enabled: 1 machdep.forward_signal_enabled: 1 machdep.forward_roundrobin_enabled: 1 What does the fastforwarding option do that the normal forwarding option doesn't? Thanks, Deepak Jain AiNET To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 18:11:56 2001 Delivered-To: freebsd-net@freebsd.org Received: from imo-m03.mx.aol.com (imo-m03.mx.aol.com [64.12.136.6]) by hub.freebsd.org (Postfix) with ESMTP id D8E9F37B405 for ; Mon, 25 Jun 2001 18:11:53 -0700 (PDT) (envelope-from FastPathNow@netscape.net) Received: from FastPathNow@netscape.net by imo-m03.mx.aol.com (mail_out_v30.22.) id n.2c.18ff13d (16216) for ; Mon, 25 Jun 2001 21:11:45 -0400 (EDT) Received: from netscape.com (aimmail02.aim.aol.com [205.188.144.194]) by air-in01.mx.aol.com (v78_r3.8) with ESMTP; Mon, 25 Jun 2001 21:11:45 -0400 Date: Mon, 25 Jun 2001 21:11:45 -0400 From: FastPathNow@netscape.net To: freebsd-net@freebsd.org Subject: TCPS_HAVERCVDFIN not considering all possible conditions? Mime-Version: 1.0 Message-ID: <45D08C2C.558913DD.375A6AF3@netscape.net> X-Mailer: Franklin Webmailer 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Would appreciate comments on this: Currently in tcp_fsm.h its defined as : #define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT) when IMHO it should be: (to consider all possible cases of having recd a FIN?) #define TCPS_HAVERCVDFIN(s) ( ((s) >= TCPS_TIME_WAIT) || ((s) == TCPS_CLOSE_WAIT) || ((s) == TCPS_LAST_ACK) || ((s) == TCPS_CLOSING) ) -AG __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 23:29:31 2001 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id D6CBF37B40D for ; Mon, 25 Jun 2001 23:29:09 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id IAA94869; Tue, 26 Jun 2001 08:24:13 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200106260624.IAA94869@info.iet.unipi.it> Subject: Re: TCPS_HAVERCVDFIN not considering all possible conditions? In-Reply-To: <45D08C2C.558913DD.375A6AF3@netscape.net> from "FastPathNow@netscape.net" at "Jun 25, 2001 09:11:45 pm" To: FastPathNow@netscape.net Date: Tue, 26 Jun 2001 08:24:13 +0200 (CEST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org this macro suggests that it would be better to define tcp states as a set of individual bits, so one does not have to do arithmetics on state IDs. cheers luigi > Currently in tcp_fsm.h its defined as : > #define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT) > > when IMHO it should be: (to consider all possible cases of having recd a FIN?) > > #define TCPS_HAVERCVDFIN(s) ( ((s) >= TCPS_TIME_WAIT) || ((s) == TCPS_CLOSE_WAIT) || ((s) == TCPS_LAST_ACK) || ((s) == TCPS_CLOSING) ) > > -AG > > __________________________________________________________________ > Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Mon Jun 25 23:36:19 2001 Delivered-To: freebsd-net@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 24D0637B405; Mon, 25 Jun 2001 23:36:04 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f5Q6Zjf52352; Tue, 26 Jun 2001 09:35:45 +0300 (EEST) (envelope-from ru) Date: Tue, 26 Jun 2001 09:35:45 +0300 From: Ruslan Ermilov To: Deepak Jain Cc: net@FreeBSD.org, hackers@FreeBSD.org Subject: Re: fastforwarding? Message-ID: <20010626093545.D49992@sunbay.com> Mail-Followup-To: Deepak Jain , net@FreeBSD.org, hackers@FreeBSD.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from deepak@ai.net on Mon, Jun 25, 2001 at 06:47:41PM -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Jun 25, 2001 at 06:47:41PM -0400, Deepak Jain wrote: > sysctl -A |grep forward > net.inet.ip.forwarding: 1 > net.inet.ip.fastforwarding: 0 > machdep.forward_irq_enabled: 1 > machdep.forward_signal_enabled: 1 > machdep.forward_roundrobin_enabled: 1 > > What does the fastforwarding option do that the normal forwarding option > doesn't? > See inet(4). Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 6:53:36 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail1.home.nl (mail1.home.nl [213.51.129.225]) by hub.freebsd.org (Postfix) with ESMTP id B621237B401 for ; Tue, 26 Jun 2001 06:53:32 -0700 (PDT) (envelope-from nascar24@home.nl) Received: from testuser ([213.51.193.168]) by mail1.home.nl (InterMail vM.4.01.03.00 201-229-121) with SMTP id <20010626135331.ESMG22865.mail1.home.nl@testuser> for ; Tue, 26 Jun 2001 15:53:31 +0200 Message-ID: <02e401c0fe43$85437b30$0900a8c0@testuser> From: "Marcel Dijk" To: References: <20010625230255.A11496@comp.chem.msu.su> <20010625142542.Z33375@prism.flugsvamp.com> <20010626075624.D95583@gsmx07.alcatel.com.au> <20010625172318.C33375@prism.flugsvamp.com> Subject: MRTG Date: Tue, 26 Jun 2001 15:25:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello, I've installed the MRTG port that comes with FreeBSD 4.2. I've read the documentation and entered the following command: ./cfgmaker --global 'WorkDir: /usr/home/www/lan-stats' --global 'Options[_]: bits,growright' --output /usr/home/www/lan-stats/mrtg.cfg community@localhost I then get a whole load of errors, but every error has this lline at the beginnen of the error message: SNMP Error: no response received Does this mean that my machine doesn't have SNMP installed? And if so, where can I get it? TIA, Marcel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 7:27:42 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail.numachi.com (numachi.numachi.com [198.175.254.2]) by hub.freebsd.org (Postfix) with SMTP id 5840837B401 for ; Tue, 26 Jun 2001 07:27:39 -0700 (PDT) (envelope-from reichert@natto.numachi.com) Received: (qmail 24249 invoked by uid 3001); 26 Jun 2001 14:27:34 -0000 Received: from natto.numachi.com (198.175.254.216) by numachi.numachi.com with SMTP; 26 Jun 2001 14:27:34 -0000 Received: (qmail 90028 invoked by uid 1001); 26 Jun 2001 14:27:34 -0000 Date: Tue, 26 Jun 2001 10:27:34 -0400 From: Brian Reichert To: Marcel Dijk Cc: net@FreeBSD.ORG Subject: Re: MRTG Message-ID: <20010626102734.I23601@numachi.com> References: <20010625230255.A11496@comp.chem.msu.su> <20010625142542.Z33375@prism.flugsvamp.com> <20010626075624.D95583@gsmx07.alcatel.com.au> <20010625172318.C33375@prism.flugsvamp.com> <02e401c0fe43$85437b30$0900a8c0@testuser> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <02e401c0fe43$85437b30$0900a8c0@testuser>; from nascar24@home.nl on Tue, Jun 26, 2001 at 03:25:51PM +0200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, Jun 26, 2001 at 03:25:51PM +0200, Marcel Dijk wrote: > SNMP Error: > no response received > Does this mean that my machine doesn't have SNMP installed? I would expect that means that the remote machine you're trying to collect statistics from is not running SNMP. > TIA, > > Marcel -- Brian 'you Bastard' Reichert 37 Crystal Ave. #303 Daytime number: (603) 434-6842 Derry NH 03038-1713 USA Intel architecture: the left-hand path To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 10:48:43 2001 Delivered-To: freebsd-net@freebsd.org Received: from imo-d04.mx.aol.com (imo-d04.mx.aol.com [205.188.157.36]) by hub.freebsd.org (Postfix) with ESMTP id 6538A37B405 for ; Tue, 26 Jun 2001 10:48:36 -0700 (PDT) (envelope-from FastPathNow@netscape.net) Received: from FastPathNow@netscape.net by imo-d04.mx.aol.com (mail_out_v30.22.) id x.19.18960e3 (16222); Tue, 26 Jun 2001 13:47:59 -0400 (EDT) Received: from netscape.com (aimmail02.aim.aol.com [205.188.144.194]) by air-in01.mx.aol.com (v78_r3.8) with ESMTP; Tue, 26 Jun 2001 13:47:59 -0400 Date: Tue, 26 Jun 2001 13:47:59 -0400 From: FastPathNow@netscape.net To: luigi@info.iet.unipi.it Cc: freebsd-net@freebsd.org Subject: Re: TCPS_HAVERCVDFIN not considering all possible conditions? Mime-Version: 1.0 Message-ID: <70F9DB7F.6DE86C34.375A6AF3@netscape.net> References: <200106260624.IAA94869@info.iet.unipi.it> X-Mailer: Franklin Webmailer 1.0 Content-Type: text/plain; charset="ISO-8859-1" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Luigi, A slightly more concise way of making the same change would be as follows: #define TCPS_HAVERCVDFIN(s) ( (s) >= TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2) ) With the bit mask based scheme you have suggested, it might also be possible to do interesting things things like state tracking for individal connections, such that every time we move into the next state instead of doing something like tp->t_state = TCPS_SYN_RCVD, we can have something like tp->t_state |= TCPS_SYN_RCVD . The only useful purpose that I can think of would be have a history of the past states in the t_state variable. Even without this ORing change, it would still make writing macros such as the above easier Regards -AG Luigi Rizzo wrote: > > this macro suggests that it would be better to > define tcp states as a set of individual bits, so > one does not have to do arithmetics on state IDs. > >     cheers >     luigi > > > Currently in tcp_fsm.h its defined as : > > #define TCPS_HAVERCVDFIN(s)     ((s) >= TCPS_TIME_WAIT) > > > > when IMHO it should be: (to consider all possible cases of having recd a FIN?) > > > > #define TCPS_HAVERCVDFIN(s)     ( ((s) >= TCPS_TIME_WAIT) || ((s) == TCPS_CLOSE_WAIT) || ((s) == TCPS_LAST_ACK) || ((s) == TCPS_CLOSING)  ) > > > > -AG > > > > __________________________________________________________________ > > Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-net" in the body of the message > > > > __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 10:50:21 2001 Delivered-To: freebsd-net@freebsd.org Received: from hotmail.com (oe19.pav1.hotmail.com [64.4.30.123]) by hub.freebsd.org (Postfix) with ESMTP id E5E7937B406 for ; Tue, 26 Jun 2001 10:50:13 -0700 (PDT) (envelope-from jack_xiao99@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 26 Jun 2001 10:50:13 -0700 X-Originating-IP: [216.95.234.92] From: "Jack" To: Subject: SKIP and ISAKMP Date: Tue, 26 Jun 2001 13:46:16 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_02B1_01C0FE46.5F7A24A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: X-OriginalArrivalTime: 26 Jun 2001 17:50:13.0552 (UTC) FILETIME=[73943300:01C0FE68] Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_02B1_01C0FE46.5F7A24A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I want to run SKIP and ISAKMP on the same netcard. After doing some = tests, I think it's impossible but I am not sure. I need your = comfirmation. Thanks a lot. Jack ------=_NextPart_000_02B1_01C0FE46.5F7A24A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I want to run SKIP and ISAKMP on the = same netcard.=20 After doing some tests, I think it's impossible but I am not sure. I = need your=20 comfirmation. Thanks a lot.

Jack
------=_NextPart_000_02B1_01C0FE46.5F7A24A0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 10:56:45 2001 Delivered-To: freebsd-net@freebsd.org Received: from guard.polynet.lviv.ua (Guard.PolyNet.Lviv.UA [217.9.2.1]) by hub.freebsd.org (Postfix) with SMTP id 00AEA37B406 for ; Tue, 26 Jun 2001 10:56:39 -0700 (PDT) (envelope-from akorud@polynet.lviv.ua) Received: (qmail 75898 invoked from network); 26 Jun 2001 17:56:24 -0000 Received: from postoffice.lp.Lviv.ua (HELO polynet.lviv.ua) (192.168.0.6) by guard.lp.lviv.ua with SMTP; 26 Jun 2001 17:56:24 -0000 Received: (qmail 85364 invoked by uid 0); 26 Jun 2001 17:56:24 -0000 Received: (ofmipd diablo.lp.lviv.ua); 26 Jun 2001 17:56:02 -0000 Date: 26 Jun 2001 20:55:36 +0300 Message-ID: <003f01c0fe69$349030e0$1c00a8c0@lp.lviv.ua> From: "Andriy Korud" To: freebsd-net@freebsd.org Subject: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org unsubscribe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 11:42:18 2001 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id F2DB137B405 for ; Tue, 26 Jun 2001 11:42:13 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id UAA98582; Tue, 26 Jun 2001 20:37:10 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200106261837.UAA98582@info.iet.unipi.it> Subject: Re: TCPS_HAVERCVDFIN not considering all possible conditions? In-Reply-To: <70F9DB7F.6DE86C34.375A6AF3@netscape.net> from "FastPathNow@netscape.net" at "Jun 26, 2001 01:47:59 pm" To: FastPathNow@netscape.net Date: Tue, 26 Jun 2001 20:37:10 +0200 (CEST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [Charset ISO-8859-1 unsupported, filtering to ASCII...] > Luigi, > A slightly more concise way of making the same change would be as follows: > > #define TCPS_HAVERCVDFIN(s) ( (s) >= TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2) ) the problem is that a graph (which is what ultimately is a state diagram) does not generally have a total ordering so making comparisons other than == or != is the best way to induce programming errors. > be possible to do interesting things things like state tracking > for individal connections, such that every time we move into the > next state instead of doing something like tp->t_state = TCPS_SYN_RCVD, > we can have something like tp->t_state |= TCPS_SYN_RCVD . The only > useful purpose that I can think of would be have a history of the > past states in the t_state variable. > Even without this ORing change, it would still make writing macros such as the above easier No way! that would be even more wrong. One state is one bit, and state changes are strict assignments. The bit-set only makes it more efficient to test for set membership ( "state \in {S1, S2, S3 ...}" becomes ( tp->t_state & (S1|S2|S3) != 0 ) cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 12:26:36 2001 Delivered-To: freebsd-net@freebsd.org Received: from imo-d01.mx.aol.com (imo-d01.mx.aol.com [205.188.157.33]) by hub.freebsd.org (Postfix) with ESMTP id 6AA7C37B401 for ; Tue, 26 Jun 2001 12:26:31 -0700 (PDT) (envelope-from FastPathNow@netscape.net) Received: from FastPathNow@netscape.net by imo-d01.mx.aol.com (mail_out_v31.6.) id x.3.195f340 (16232); Tue, 26 Jun 2001 15:25:51 -0400 (EDT) Received: from netscape.com (aimmail10.aim.aol.com [205.188.144.202]) by air-in02.mx.aol.com (v78_r3.8) with ESMTP; Tue, 26 Jun 2001 15:25:51 -0400 Date: Tue, 26 Jun 2001 15:25:51 -0400 From: FastPathNow@netscape.net To: luigi@info.iet.unipi.it Cc: FastPathNow@netscape.net, freebsd-net@freebsd.org Subject: Re: TCPS_HAVERCVDFIN not considering all possible conditions? Mime-Version: 1.0 Message-ID: <1DEC8D97.1B5FD06C.375A6AF3@netscape.net> References: <200106261837.UAA98582@info.iet.unipi.it> X-Mailer: Franklin Webmailer 1.0 Content-Type: text/plain; charset="ISO-8859-1" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > > be possible to do interesting things things like state tracking > > for individal connections, such that every time we move into the > > next state instead of doing something like tp->t_state = TCPS_SYN_RCVD, > > we can have something like tp->t_state |= TCPS_SYN_RCVD . The only > > useful purpose that I can think of would be have a history of the > > past states in the t_state variable. > > > Even without this ORing change, it would still make writing macros such as the above easier > > No way! that would be even more wrong. > > One state is one bit, and state changes are strict assignments. > The bit-set only makes it more efficient to test for set membership > ( "state \in {S1, S2, S3 ...}" becomes ( tp->t_state & (S1|S2|S3) != 0 ) > >     cheers >     luigi When I mentioned the ORing change, I was implying that other portions of the code would also have to be in sync with this change. As in -- a simple switch statement like the follows will not be sufficient: switch(tp->t_state) { case TCPS_SYN_RCVD: } As far as every possible succeeding state for a connection that is part of the FSM is denoted by a higher bit, the highest set bit in the t_state variable will always have the current state of the connection. The exception to this is .. when you move into TCPS_CLOSED state, clear out all bits. So the states would look something like: #define TCPS_CLOSED 0 /* closed */ #define TCPS_LISTEN 1 /* listening for connection */ #define TCPS_SYN_SENT 2 /* active, have sent syn */ #define TCPS_SYN_RECEIVED 4 /* have send and received syn */ /* states < TCPS_ESTABLISHED are those where connections not established */ #define TCPS_ESTABLISHED 8 /* established */ ... So switch based code fragments such as the above can be modified to switch(HIGHEST_SET_BIT(tp->t_state)) { case TCPS_SYN_RCVD: } Maybe I am missing something here, but theoretically wouldnt such a scheme work?. With this sort of a bit masking scheme the check that you make would still be valid because each state by itself is uniquely identified by its own bit position. Regards -AG __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 14:45:29 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 5D49C37B401; Tue, 26 Jun 2001 14:43:16 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5QLhFt11927; Tue, 26 Jun 2001 14:43:15 -0700 Date: Tue, 26 Jun 2001 14:43:15 -0700 From: Brooks Davis To: net@freebsd.org, audit@freebsd.org Subject: review request: network interface cloning Message-ID: <20010626144313.A7909@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Please review the attached patch. It does the following: - implementes network interface cloning via ifconfig - adds cloning support to gif - removes gif dependencies from stf - makes gif and stf modular Notes: The cloning API isn't quite that of NetBSD because the NetBSD API only supported the creation of staticaly numbered interfaces which can lead to races and starvation in theory. This patch instead allows interfaces to implement wildcard interface creation via "ifconfig gif# create". Hajimu UMEMOTO found a bug related to deletion of gif IPv6 tunnels in certain situations. We're fairly certain it's in the IPv6 routing code rather then in gif. Since even with this bug, the world will be a better place with this patch, I've documented it in gif(4)'s BUGS section and suggest we commit anyway to get cloning into the system. -- Brooks P.S. The patch can also be found at: http://people.freebsd.org/~brooks/patches/gif.diff --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 Index: sbin/ifconfig/ifconfig.8 =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/sbin/ifconfig/ifconfig.8,v retrieving revision 1.42 diff -u -u -r1.42 ifconfig.8 --- sbin/ifconfig/ifconfig.8 2001/06/11 12:38:43 1.42 +++ sbin/ifconfig/ifconfig.8 2001/06/22 01:11:23 @@ -43,6 +43,7 @@ .Op Fl L .Op Fl m .Ar interface +.Op Cm create .Op Ar address_family .Oo .Ar address Ns Op Cm / Ns Ar prefixlength @@ -50,6 +51,9 @@ .Oc .Op Ar parameters .Nm +.Ar interface +.Cm destroy +.Nm .Fl a .Op Fl L .Op Fl d @@ -66,6 +70,7 @@ .Op Fl d .Op Fl m .Op Fl u +.Op Fl C .Sh DESCRIPTION .Nm Ifconfig is used to assign an address @@ -269,6 +274,18 @@ Unconfigure the physical source and destination address for IP tunnel interfaces previously configured with .Cm tunnel . +.It Cm create +Create the specified network pseudo-device. +.It Cm destroy +Destroy the specified network pseudo-device. +.It Cm plumb +Another name for the +.Fl create +parameter. Included for Solaris compatability. +.It Cm unplumb +Another name for the +.Fl destroy +parameter. Included for Solaris compatability. .It Cm vlan Ar vlan_tag If the interface is a vlan pseudo interface, set the vlan tag value to @@ -586,6 +603,12 @@ and .Fl u=20 (only list interfaces that are up). +.Pp +The +.Fl C +flag may be used to list all of the interface cloners available on +the system, with no additional information. Use of this flag is +mutually exclusive with all other flags and commands. .Pp Only the super-user may modify the configuration of a network interface. .Sh NOTES Index: sbin/ifconfig/ifconfig.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/sbin/ifconfig/ifconfig.c,v retrieving revision 1.63 diff -u -u -r1.63 ifconfig.c --- sbin/ifconfig/ifconfig.c 2001/06/11 12:38:43 1.63 +++ sbin/ifconfig/ifconfig.c 2001/06/22 01:12:06 @@ -135,6 +135,7 @@ struct afswtch; =20 int supmedia =3D 0; +int listcloners =3D 0; =20 #ifdef INET6 char addr_buf[MAXHOSTNAMELEN *2 + 1]; /*for getnameinfo()*/ @@ -144,6 +145,7 @@ void checkatrange __P((struct sockaddr_at *)); int ifconfig __P((int argc, char *const *argv, const struct afswtch *afp)); void notealias __P((const char *, int, int, const struct afswtch *afp)); +void list_cloners __P((void)); void printb __P((const char *s, unsigned value, const char *bits)); void rt_xaddrs __P((caddr_t, caddr_t, struct rt_addrinfo *)); void status __P((const struct afswtch *afp, int addrcount, @@ -175,8 +177,12 @@ #endif c_func setifipdst; c_func setifflags, setifmetric, setifmtu, setiflladdr; +c_func clone_destroy; =20 =20 +void clone_create __P((void)); + + #define NEXTARG 0xffffff #define NEXTARG2 0xfffffe =20 @@ -239,6 +245,13 @@ { "vlandev", NEXTARG, setvlandev }, { "-vlandev", NEXTARG, unsetvlandev }, #endif +#if 0 + /* XXX `create' special-cased below */ + {"create", 0, clone_create }, + {"plumb", 0, clone_create }, +#endif + {"destroy", 0, clone_destroy }, + {"unplumb", 0, clone_destroy }, #ifdef USE_IEEE80211 { "ssid", NEXTARG, set80211ssid }, { "nwid", NEXTARG, set80211ssid }, @@ -364,16 +377,20 @@ usage() { #ifndef INET6 - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: ifconfig interface address_family [address [dest_address]]", " [parameters]", + " ifconfig -C", + " ifconfig interface create", " ifconfig -a [-d] [-m] [-u] [address_family]", " ifconfig -l [-d] [-u] [address_family]", " ifconfig [-d] [-m] [-u]"); #else - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: ifconfig [-L] interface address_family [address [dest_address]]", " [parameters]", + " ifconfig -C", + " ifconfig interface create", " ifconfig -a [-L] [-d] [-m] [-u] [address_family]", " ifconfig -l [-d] [-u] [address_family]", " ifconfig [-L] [-d] [-m] [-u]"); @@ -402,7 +419,7 @@ =20 /* Parse leading line options */ all =3D downonly =3D uponly =3D namesonly =3D 0; - while ((c =3D getopt(argc, argv, "adlmu" + while ((c =3D getopt(argc, argv, "Cadlmu" #ifdef INET6 "L" #endif @@ -428,6 +445,9 @@ case 'm': /* show media choices in status */ supmedia =3D 1; break; + case 'C': + listcloners =3D 1; + break; default: usage(); break; @@ -436,6 +456,16 @@ argc -=3D optind; argv +=3D optind; =20 + if (listcloners) { + /* -C must be solitary */ + if (all || supmedia || uponly || downonly || namesonly || + argc > 0) + usage(); + =09 + list_cloners(); + exit(0); + } + /* -l cannot be used with -a or -m */ if (namesonly && (all || supmedia)) usage(); @@ -448,6 +478,7 @@ if (!namesonly && argc < 1) all =3D 1; =20 + /* -a and -l allow an address family arg to limit the output */ if (all || namesonly) { if (argc > 1) @@ -473,6 +504,18 @@ =20 /* check and maybe load support for this interface */ ifmaybeload(name); + + /* + * NOTE: We must special-case the `create' command right + * here as we would otherwise fail when trying to find + * the interface. + */ + if (argc > 0 && strcmp(argv[0], "create") =3D=3D 0) { + clone_create(); + argc--, argv++; + if (argc =3D=3D 0) + exit(0); + } } =20 /* Check for address family */ @@ -1861,7 +1904,8 @@ =20 /* turn interface and unit into module name */ strcpy(ifkind, "if_"); - for (cp =3D name, dp =3D ifkind + 3; (*cp !=3D 0) && !isdigit(*cp); cp++,= dp++) + for (cp =3D name, dp =3D ifkind + 3; + (*cp !=3D 0) && !isdigit(*cp) && *cp !=3D '#'; cp++, dp++) *dp =3D *cp; *dp =3D 0; =20 @@ -1887,4 +1931,82 @@ =20 /* not present, we should try to load it */ kldload(ifkind); +} + +void +list_cloners(void) +{ + struct if_clonereq ifcr; + char *cp, *buf; + int idx; + int s; + + s =3D socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) + err(1, "socket"); + + memset(&ifcr, 0, sizeof(ifcr)); + + if (ioctl(s, SIOCIFGCLONERS, &ifcr) < 0) + err(1, "SIOCIFGCLONERS for count"); + + buf =3D malloc(ifcr.ifcr_total * IFNAMSIZ); + if (buf =3D=3D NULL) + err(1, "unable to allocate cloner name buffer"); + + ifcr.ifcr_count =3D ifcr.ifcr_total; + ifcr.ifcr_buffer =3D buf; + + if (ioctl(s, SIOCIFGCLONERS, &ifcr) < 0) + err(1, "SIOCIFGCLONERS for names"); + + /* + * In case some disappeared in the mean time, clamp it down. + */ + if (ifcr.ifcr_count > ifcr.ifcr_total) + ifcr.ifcr_count =3D ifcr.ifcr_total; + + for (cp =3D buf, idx =3D 0; idx < ifcr.ifcr_count; idx++, cp +=3D IFNAMSI= Z) { + if (idx > 0) + putchar(' '); + printf("%s", cp); + } + + putchar('\n'); + free(buf); + return; +} + +void +clone_create() +{ + int s; + + s =3D socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) + err(1, "socket"); + + bzero(&ifr, sizeof(ifr)); + (void) strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCIFCREATE, &ifr) < 0) + err(1, "SIOCIFCREATE"); + + if (strcmp(name, ifr.ifr_name) !=3D 0) { + printf("%s\n", ifr.ifr_name); + strlcpy(name, ifr.ifr_name, sizeof(name)); + } + + close(s); +} + +void +clone_destroy(val, d, s, rafp) + const char *val; + int d; + int s; + const struct afswtch *rafp; +{ + (void) strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) + err(1, "SIOCIFDESTROY"); } Index: sys/conf/files =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/conf/files,v retrieving revision 1.535 diff -u -u -r1.535 files --- sys/conf/files 2001/06/22 06:34:40 1.535 +++ sys/conf/files 2001/06/23 06:40:44 @@ -893,7 +893,7 @@ net/if_ethersubr.c optional ether net/if_faith.c count faith net/if_fddisubr.c optional fddi -net/if_gif.c count gif +net/if_gif.c optional gif net/if_iso88025subr.c optional token net/if_loop.c optional loop net/if_media.c standard @@ -901,7 +901,7 @@ net/if_ppp.c count ppp net/if_sl.c optional sl net/if_spppsubr.c optional sppp -net/if_stf.c count stf +net/if_stf.c optional stf net/if_tun.c optional tun net/if_tap.c optional tap net/if_vlan.c count vlan Index: sys/i386/conf/GENERIC =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/i386/conf/GENERIC,v retrieving revision 1.312 diff -u -u -r1.312 GENERIC --- sys/i386/conf/GENERIC 2001/06/12 09:39:57 1.312 +++ sys/i386/conf/GENERIC 2001/06/18 22:04:21 @@ -210,7 +210,7 @@ device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" -device gif 4 # IPv6 and IPv4 tunneling +device gif # IPv6 and IPv4 tunneling device faith 1 # IPv6-to-IPv4 relaying (translation) =20 # The `bpf' device enables the Berkeley Packet Filter. Index: sys/ia64/conf/GENERIC =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/ia64/conf/GENERIC,v retrieving revision 1.10 diff -u -u -r1.10 GENERIC --- sys/ia64/conf/GENERIC 2001/05/29 18:49:03 1.10 +++ sys/ia64/conf/GENERIC 2001/06/09 00:55:41 @@ -140,7 +140,7 @@ device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" -device gif 4 # IPv6 and IPv4 tunneling +device gif # IPv6 and IPv4 tunneling device faith 1 # IPv6-to-IPv4 relaying/(translation) =20 # The `bpf' device enables the Berkeley Packet Filter. Index: sys/alpha/conf/GENERIC =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/alpha/conf/GENERIC,v retrieving revision 1.113 diff -u -u -r1.113 GENERIC --- sys/alpha/conf/GENERIC 2001/05/30 03:19:05 1.113 +++ sys/alpha/conf/GENERIC 2001/06/09 00:55:14 @@ -165,7 +165,7 @@ device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" -device gif 4 # IPv6 and IPv4 tunneling +device gif # IPv6 and IPv4 tunneling device faith 1 # IPv6-to-IPv4 relaying/(translation) =20 # The `bpf' device enables the Berkeley Packet Filter. Index: sys/net/if.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/net/if.c,v retrieving revision 1.109 diff -u -u -r1.109 if.c --- sys/net/if.c 2001/06/11 12:38:58 1.109 +++ sys/net/if.c 2001/06/22 00:11:09 @@ -56,6 +56,7 @@ #include #include #include +#include #include #include =20 @@ -96,6 +97,12 @@ extern void nd6_setmtu __P((struct ifnet *)); #endif =20 +struct if_clone *if_clone_lookup __P((const char *, int *)); +int if_clone_list __P((struct if_clonereq *)); + +LIST_HEAD(, if_clone) if_cloners =3D LIST_HEAD_INITIALIZER(if_cloners); +int if_cloners_count; + /* * Network interface utility routines. * @@ -350,6 +357,179 @@ } =20 /* + * Create a clone network interface. + */ +int +if_clone_create(name, len) + char *name; + int len; +{ + struct if_clone *ifc; + char *dp; + int wildcard =3D 0; + int unit; + int err; + + ifc =3D if_clone_lookup(name, &unit); + if (ifc =3D=3D NULL) + return (EINVAL); + + if (ifunit(name) !=3D NULL) + return (EEXIST); + + if (unit < 0) + wildcard =3D 1; + + err =3D (*ifc->ifc_create)(ifc, &unit); + if (err !=3D 0) + return (err); + + /* In the wildcard case, we need to update the name. */ + if (wildcard) { + for (dp =3D name; *dp !=3D '#'; dp++); + if (snprintf(dp, len - (dp-name), "%d", unit) > + len - (dp-name) - 1) { + /* + * This can only be a programmer error and + * there's no straightforward way to recover if + * it happens. + */ + panic("interface name too long"); + } + =09 + } + + return (0); +} + +/* + * Destroy a clone network interface. + */ +int +if_clone_destroy(name) + const char *name; +{ + struct if_clone *ifc; + struct ifnet *ifp; + + ifc =3D if_clone_lookup(name, NULL); + if (ifc =3D=3D NULL) + return (EINVAL); + + ifp =3D ifunit(name); + if (ifp =3D=3D NULL) + return (ENXIO); + + if (ifc->ifc_destroy =3D=3D NULL) + return (EOPNOTSUPP); + + (*ifc->ifc_destroy)(ifp); + return (0); +} + +/* + * Look up a network interface cloner. + */ +struct if_clone * +if_clone_lookup(name, unitp) + const char *name; + int *unitp; +{ + struct if_clone *ifc; + const char *cp; + int i; + + for (ifc =3D LIST_FIRST(&if_cloners); ifc !=3D NULL;) { + for (cp =3D name, i =3D 0; i < ifc->ifc_namelen; i++, cp++) { + if (ifc->ifc_name[i] !=3D *cp) + goto next_ifc; + } + goto found_name; + next_ifc: + ifc =3D LIST_NEXT(ifc, ifc_list); + } + + /* No match. */ + return (NULL); + + found_name: + if (*cp =3D=3D '#' && *(cp+1) =3D=3D '\0') { + i =3D -1; + } else { + for (i =3D 0; *cp !=3D '\0'; cp++) { + if (*cp < '0' || *cp > '9') { + /* Bogus unit number. */ + return (NULL); + } + i =3D (i * 10) + (*cp - '0'); + } + } + + if (unitp !=3D NULL) + *unitp =3D i; + return (ifc); +} + +/* + * Register a network interface cloner. + */ +void +if_clone_attach(ifc) + struct if_clone *ifc; +{ + + LIST_INSERT_HEAD(&if_cloners, ifc, ifc_list); + if_cloners_count++; +} + +/* + * Unregister a network interface cloner. + */ +void +if_clone_detach(ifc) + struct if_clone *ifc; +{ + + LIST_REMOVE(ifc, ifc_list); + if_cloners_count--; +} + +/* + * Provide list of interface cloners to userspace. + */ +int +if_clone_list(ifcr) + struct if_clonereq *ifcr; +{ + char outbuf[IFNAMSIZ], *dst; + struct if_clone *ifc; + int count, error =3D 0; + + ifcr->ifcr_total =3D if_cloners_count; + if ((dst =3D ifcr->ifcr_buffer) =3D=3D NULL) { + /* Just asking how many there are. */ + return (0); + } + + if (ifcr->ifcr_count < 0) + return (EINVAL); + + count =3D (if_cloners_count < ifcr->ifcr_count) ? + if_cloners_count : ifcr->ifcr_count; + + for (ifc =3D LIST_FIRST(&if_cloners); ifc !=3D NULL && count !=3D 0; + ifc =3D LIST_NEXT(ifc, ifc_list), count--, dst +=3D IFNAMSIZ) { + strncpy(outbuf, ifc->ifc_name, IFNAMSIZ); + outbuf[IFNAMSIZ - 1] =3D '\0'; /* sanity */ + error =3D copyout(outbuf, dst, IFNAMSIZ); + if (error) + break; + } + + return (error); +} + +/* * Locate an interface based on a complete address. */ /*ARGSUSED*/ @@ -687,10 +867,10 @@ * interface structure pointer. */ struct ifnet * -ifunit(char *name) +ifunit(const char *name) { char namebuf[IFNAMSIZ + 1]; - char *cp; + const char *cp; struct ifnet *ifp; int unit; unsigned len, m; @@ -781,6 +961,20 @@ return (ifconf(cmd, data)); } ifr =3D (struct ifreq *)data; + + switch (cmd) { + case SIOCIFCREATE: + case SIOCIFDESTROY: + if ((error =3D suser(p)) !=3D 0) + return (error); + return ((cmd =3D=3D SIOCIFCREATE) ? + if_clone_create(ifr->ifr_name, sizeof(ifr->ifr_name)) : + if_clone_destroy(ifr->ifr_name)); +=09 + case SIOCIFGCLONERS: + return (if_clone_list((struct if_clonereq *)data)); + } + ifp =3D ifunit(ifr->ifr_name); if (ifp =3D=3D 0) return (ENXIO); Index: sys/net/if.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/net/if.h,v retrieving revision 1.61 diff -u -u -r1.61 if.h --- sys/net/if.h 2001/02/21 06:39:56 1.61 +++ sys/net/if.h 2001/06/22 06:03:23 @@ -37,6 +37,8 @@ #ifndef _NET_IF_H_ #define _NET_IF_H_ =20 +#include + /* * does not depend on on most other systems. This * helps userland compatibility. (struct timeval ifi_lastchange) @@ -45,6 +47,40 @@ #include #endif =20 +struct ifnet; + +/* + * Length of interface external name, including terminating '\0'. + * Note: this is the same size as a generic device's external name. + */ +#define IFNAMSIZ 16 +#define IF_NAMESIZE IFNAMSIZ + +/* + * Structure describing a `cloning' interface. + */ +struct if_clone { + LIST_ENTRY(if_clone) ifc_list; /* on list of cloners */ + const char *ifc_name; /* name of device, e.g. `gif' */ + size_t ifc_namelen; /* length of name */ + + int (*ifc_create)(struct if_clone *, int *); + void (*ifc_destroy)(struct ifnet *); +}; + +#define IF_CLONE_INITIALIZER(name, create, destroy) \ + { { 0 }, name, sizeof(name) - 1, create, destroy } + +/* + * Structure used to query names of interface cloners. + */ + +struct if_clonereq { + int ifcr_total; /* total cloners (out) */ + int ifcr_count; /* room for this many in user buffer */ + char *ifcr_buffer; /* buffer for cloner names */ +}; + /* * Structure describing information about an interface * which may be of interest to management entities. @@ -151,8 +187,6 @@ * remainder may be interface specific. */ struct ifreq { -#define IFNAMSIZ 16 -#define IF_NAMESIZE IFNAMSIZ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ union { struct sockaddr ifru_addr; Index: sys/net/if_var.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/net/if_var.h,v retrieving revision 1.33 diff -u -u -r1.33 if_var.h --- sys/net/if_var.h 2001/03/28 09:17:55 1.33 +++ sys/net/if_var.h 2001/06/22 00:00:59 @@ -401,7 +401,7 @@ /*void ifinit __P((void));*/ /* declared in systm.h for main() */ int ifioctl __P((struct socket *, u_long, caddr_t, struct proc *)); int ifpromisc __P((struct ifnet *, int)); -struct ifnet *ifunit __P((char *)); +struct ifnet *ifunit __P((const char *)); struct ifnet *if_withname __P((struct sockaddr *)); =20 int if_poll_recv_slow __P((struct ifnet *ifp, int *quotap)); @@ -422,6 +422,12 @@ struct ifmultiaddr *ifmaof_ifpforaddr __P((struct sockaddr *, struct ifnet *)); int if_simloop __P((struct ifnet *ifp, struct mbuf *m, int af, int hlen)); + +void if_clone_attach __P((struct if_clone *)); +void if_clone_detach __P((struct if_clone *)); + +int if_clone_create __P((char *, int)); +int if_clone_destroy __P((const char *)); =20 #endif /* _KERNEL */ =20 Index: sys/net/if_gif.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/net/if_gif.c,v retrieving revision 1.11 diff -u -u -r1.11 if_gif.c --- sys/net/if_gif.c 2001/06/19 15:53:51 1.11 +++ sys/net/if_gif.c 2001/06/25 20:21:24 @@ -44,6 +44,9 @@ #include #include #include +#include +#include /* XXX: Shouldn't really be required! */ +#include #include =20 #include @@ -58,6 +61,8 @@ #ifdef INET #include #include +#include +#include #endif /* INET */ =20 #ifdef INET6 @@ -74,29 +79,47 @@ #include #include =20 -#include "gif.h" -#include "bpf.h" -#define NBPFILTER NBPF - #include + +#define GIFNAME "gif" +#define GIFDEV "if_gif" +#define GIF_MAXUNIT 0x7fff /* ifp->if_unit is only 15 bits */ + +static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); +static struct rman gifunits[1]; +TAILQ_HEAD(gifhead, gif_softc) gifs =3D TAILQ_HEAD_INITIALIZER(gifs); =20 -#if NGIF > 0 +int gif_clone_create __P((struct if_clone *, int *)); +void gif_clone_destroy __P((struct ifnet *)); =20 -void gifattach __P((void *)); +struct if_clone gif_cloner =3D + IF_CLONE_INITIALIZER("gif", gif_clone_create, gif_clone_destroy); + +static int gifmodevent __P((module_t, int, void *)); +void gif_delete_tunnel __P((struct gif_softc *)); static int gif_encapcheck __P((const struct mbuf *, int, int, void *)); + #ifdef INET -extern struct protosw in_gif_protosw; +extern struct domain inetdomain; +struct ipprotosw in_gif_protosw =3D +{ SOCK_RAW, &inetdomain, 0/*IPPROTO_IPV[46]*/, PR_ATOMIC|PR_ADDR, + in_gif_input, rip_output, 0, rip_ctloutput, + 0, + 0, 0, 0, 0, + &rip_usrreqs +}; +#endif +#ifdef INET6 +extern struct domain6 inet6domain; +struct ip6protosw in6_gif_protosw =3D +{ SOCK_RAW, &inet6domain, 0/*IPPROTO_IPV[46]*/, PR_ATOMIC|PR_ADDR, + in6_gif_input, rip6_output, 0, rip6_ctloutput, + 0, + 0, 0, 0, 0, + &rip6_usrreqs +}; #endif -#ifdef INET6 -extern struct ip6protosw in6_gif_protosw; -#endif =20 -/* - * gif global variable definitions - */ -static int ngif; /* number of interfaces */ -static struct gif_softc *gif =3D 0; - #ifndef MAX_GIF_NEST /* * This macro controls the upper limitation on nesting of gif tunnels. @@ -110,64 +133,158 @@ #endif static int max_gif_nesting =3D MAX_GIF_NEST; =20 -void -gifattach(dummy) - void *dummy; +int +gif_clone_create(ifc, unit) + struct if_clone *ifc; + int *unit; { + struct resource *r; struct gif_softc *sc; - int i; =20 - ngif =3D NGIF; - gif =3D sc =3D malloc(ngif * sizeof(struct gif_softc), M_DEVBUF, M_WAITOK= ); - bzero(sc, ngif * sizeof(struct gif_softc)); - for (i =3D 0; i < ngif; sc++, i++) { - sc->gif_if.if_name =3D "gif"; - sc->gif_if.if_unit =3D i; - - sc->encap_cookie4 =3D sc->encap_cookie6 =3D NULL; -#ifdef INET - sc->encap_cookie4 =3D encap_attach_func(AF_INET, -1, - gif_encapcheck, &in_gif_protosw, sc); - if (sc->encap_cookie4 =3D=3D NULL) { - printf("%s: attach failed\n", if_name(&sc->gif_if)); - continue; - } + if (*unit > GIF_MAXUNIT) + return (ENXIO); + + if (*unit < 0) { + r =3D rman_reserve_resource(gifunits, 0, GIF_MAXUNIT, 1, + RF_ALLOCATED | RF_ACTIVE, NULL); + if (r =3D=3D NULL) + return (ENOSPC); + *unit =3D rman_get_start(r); + } else { + r =3D rman_reserve_resource(gifunits, *unit, *unit, 1, + RF_ALLOCATED | RF_ACTIVE, NULL); + if (r =3D=3D NULL) + return (EEXIST); + } +=09 + sc =3D malloc (sizeof(struct gif_softc), M_GIF, M_WAITOK); + bzero(sc, sizeof(struct gif_softc)); + + sc->gif_if.if_softc =3D sc; + sc->gif_if.if_name =3D GIFNAME; + sc->gif_if.if_unit =3D *unit; + sc->r_unit =3D r; + + sc->encap_cookie4 =3D sc->encap_cookie6 =3D NULL; +#ifdef INET + sc->encap_cookie4 =3D encap_attach_func(AF_INET, -1, + gif_encapcheck, (struct protosw*)&in_gif_protosw, sc); + if (sc->encap_cookie4 =3D=3D NULL) { + printf("%s: unable to attach encap4\n", if_name(&sc->gif_if)); + free(sc, M_GIF); + return (EIO); /* XXX */ + } #endif #ifdef INET6 - sc->encap_cookie6 =3D encap_attach_func(AF_INET6, -1, - gif_encapcheck, (struct protosw *)&in6_gif_protosw, sc); - if (sc->encap_cookie6 =3D=3D NULL) { - if (sc->encap_cookie4) { - encap_detach(sc->encap_cookie4); - sc->encap_cookie4 =3D NULL; - } - printf("%s: attach failed\n", if_name(&sc->gif_if)); - continue; + sc->encap_cookie6 =3D encap_attach_func(AF_INET6, -1, + gif_encapcheck, (struct protosw *)&in6_gif_protosw, sc); + if (sc->encap_cookie6 =3D=3D NULL) { + if (sc->encap_cookie4) { + encap_detach(sc->encap_cookie4); + sc->encap_cookie4 =3D NULL; } + printf("%s: unable to attach encap6\n", if_name(&sc->gif_if)); + free(sc, M_GIF); + return (EIO); /* XXX */ + } #endif =20 - sc->gif_if.if_mtu =3D GIF_MTU; - sc->gif_if.if_flags =3D IFF_POINTOPOINT | IFF_MULTICAST; + sc->gif_if.if_mtu =3D GIF_MTU; + sc->gif_if.if_flags =3D IFF_POINTOPOINT | IFF_MULTICAST; #if 0 - /* turn off ingress filter */ - sc->gif_if.if_flags |=3D IFF_LINK2; + /* turn off ingress filter */ + sc->gif_if.if_flags |=3D IFF_LINK2; #endif - sc->gif_if.if_ioctl =3D gif_ioctl; - sc->gif_if.if_output =3D gif_output; - sc->gif_if.if_type =3D IFT_GIF; - sc->gif_if.if_snd.ifq_maxlen =3D IFQ_MAXLEN; - if_attach(&sc->gif_if); -#if NBPFILTER > 0 -#ifdef HAVE_OLD_BPF - bpfattach(&sc->gif_if, DLT_NULL, sizeof(u_int)); -#else - bpfattach(&sc->gif_if.if_bpf, &sc->gif_if, DLT_NULL, sizeof(u_int)); + sc->gif_if.if_ioctl =3D gif_ioctl; + sc->gif_if.if_output =3D gif_output; + sc->gif_if.if_type =3D IFT_GIF; + sc->gif_if.if_snd.ifq_maxlen =3D IFQ_MAXLEN; + if_attach(&sc->gif_if); + bpfattach(&sc->gif_if, DLT_NULL, sizeof(u_int)); + TAILQ_INSERT_TAIL(&gifs, sc, gif_link); + return (0); +} + +void +gif_clone_destroy(ifp) + struct ifnet *ifp; +{ + int err; + struct gif_softc *sc =3D ifp->if_softc; + + gif_delete_tunnel(sc); + TAILQ_REMOVE(&gifs, sc, gif_link); + if (sc->encap_cookie4 !=3D NULL) { + err =3D encap_detach(sc->encap_cookie4); + KASSERT(err =3D=3D 0, ("Unexpected error detaching encap_cookie4")); + } + if (sc->encap_cookie6 !=3D NULL) { + err =3D encap_detach(sc->encap_cookie6); + KASSERT(err =3D=3D 0, ("Unexpected error detaching encap_cookie6")); + } + + bpfdetach(ifp); + if_detach(ifp); + + err =3D rman_release_resource(sc->r_unit); + KASSERT(err =3D=3D 0, ("Unexpected error freeing resource")); + + free(sc, M_GIF); +} + +static int +gifmodevent(mod, type, data) + module_t mod; + int type; + void *data; +{ + int err; + + switch (type) { + case MOD_LOAD: + gifunits->rm_type =3D RMAN_ARRAY; + gifunits->rm_descr =3D "configurable if_gif units"; + err =3D rman_init(gifunits); + if (err !=3D 0) + return (err); + err =3D rman_manage_region(gifunits, 0, GIF_MAXUNIT); + if (err !=3D 0) { + printf("%s: gifunits: rman_manage_region: Failed %d\n", + GIFNAME, err); + rman_fini(gifunits); + return (err); + } + if_clone_attach(&gif_cloner); + +#ifdef INET6 + ip6_gif_hlim =3D GIF_HLIM; #endif + + break; + case MOD_UNLOAD: + if_clone_detach(&gif_cloner); + + while (!TAILQ_EMPTY(&gifs)) + gif_clone_destroy(&TAILQ_FIRST(&gifs)->gif_if); + + err =3D rman_fini(gifunits); + if (err !=3D 0) + return (err); +#ifdef INET6 + ip6_gif_hlim =3D 0; #endif + break; } + return 0; } + +static moduledata_t gif_mod =3D { + "if_gif", + gifmodevent, + 0 +}; =20 -PSEUDO_SET(gifattach, if_gif); +DECLARE_MODULE(if_gif, gif_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); =20 static int gif_encapcheck(m, off, proto, arg) @@ -261,7 +378,6 @@ goto end; } =20 -#if NBPFILTER > 0 if (ifp->if_bpf) { /* * We need to prepend the address family as @@ -277,13 +393,8 @@ m0.m_len =3D 4; m0.m_data =3D (char *)⁡ =09 -#ifdef HAVE_OLD_BPF bpf_mtap(ifp, &m0); -#else - bpf_mtap(ifp->if_bpf, &m0); -#endif } -#endif ifp->if_opackets++;=09 ifp->if_obytes +=3D m->m_pkthdr.len; =20 @@ -333,7 +444,6 @@ =20 m->m_pkthdr.rcvif =3D gifp; =09 -#if NBPFILTER > 0 if (gifp->if_bpf) { /* * We need to prepend the address family as @@ -349,13 +459,8 @@ m0.m_len =3D 4; m0.m_data =3D (char *)&af1; =09 -#ifdef HAVE_OLD_BPF bpf_mtap(gifp, &m0); -#else - bpf_mtap(gifp->if_bpf, &m0); -#endif } -#endif /*NBPFILTER > 0*/ =20 /* * Put the packet to the network layer input queue according to the @@ -408,8 +513,8 @@ int error =3D 0, size; struct sockaddr *dst, *src; struct sockaddr *sa; - int i; int s; + struct ifnet *ifp2; struct gif_softc *sc2; =09 switch (cmd) { @@ -523,8 +628,10 @@ break; } =20 - for (i =3D 0; i < ngif; i++) { - sc2 =3D gif + i; + TAILQ_FOREACH(ifp2, &ifnet, if_link) { + if (strcmp(ifp2->if_name, GIFNAME) !=3D 0) + continue; + sc2 =3D ifp2->if_softc; if (sc2 =3D=3D sc) continue; if (!sc2->gif_pdst || !sc2->gif_psrc) @@ -697,5 +804,21 @@ } bad: return error; +} + +void +gif_delete_tunnel(sc) + struct gif_softc *sc; +{ + /* XXX: NetBSD protects this function with splsoftnet() */ + + if (sc->gif_psrc) { + free((caddr_t)sc->gif_psrc, M_IFADDR); + sc->gif_psrc =3D NULL; + } + if (sc->gif_pdst) { + free((caddr_t)sc->gif_pdst, M_IFADDR); + sc->gif_pdst =3D NULL; + } + /* change the IFF_UP flag as well? */ } -#endif /*NGIF > 0*/ Index: sys/net/if_gif.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/net/if_gif.h,v retrieving revision 1.4 diff -u -u -r1.4 if_gif.h --- sys/net/if_gif.h 2001/06/11 12:38:58 1.4 +++ sys/net/if_gif.h 2001/06/25 20:16:12 @@ -60,6 +60,8 @@ int gif_flags; const struct encaptab *encap_cookie4; const struct encaptab *encap_cookie6; + struct resource *r_unit; /* resource allocated for this unit */ + TAILQ_ENTRY(gif_softc) gif_link; /* all gif's are linked */ }; =20 #define gif_ro gifsc_gifscr.gifscr_ro Index: sys/net/if_stf.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/net/if_stf.c,v retrieving revision 1.7 diff -u -u -r1.7 if_stf.c --- sys/net/if_stf.c 2001/06/11 12:38:58 1.7 +++ sys/net/if_stf.c 2001/06/25 20:11:52 @@ -98,12 +98,12 @@ #include #include #include +#include #include #include =20 #include #include -#include #include #include =20 @@ -113,23 +113,7 @@ =20 #include =20 -#include "bpf.h" -#define NBPFILTER NBPF -#include "stf.h" -#include "gif.h" /*XXX*/ - -#if NBPFILTER > 0 #include -#endif - -#if NGIF > 0 -#include -#endif - -#if NSTF > 0 -#if NSTF !=3D 1 -# error only single stf interface allowed -#endif =20 #define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) =3D=3D 0x2002) #define GET_V4(x) ((struct in_addr *)(&(x)->s6_addr16[1])) @@ -145,17 +129,20 @@ }; =20 static struct stf_softc *stf; -static int nstf; =20 -#if NGIF > 0 -extern int ip_gif_ttl; /*XXX*/ -#else -static int ip_gif_ttl =3D 40; /*XXX*/ -#endif +static MALLOC_DEFINE(M_STF, "stf", "6to4 Tunnel Interface"); +static int ip_stf_ttl =3D 40; =20 -extern struct protosw in_stf_protosw; +extern struct domain inetdomain; +struct ipprotosw in_stf_protosw =3D +{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR, + in_stf_input, rip_output, 0, rip_ctloutput, + 0, + 0, 0, 0, 0, + &rip_usrreqs +}; =20 -void stfattach __P((void *)); +static int stfmodevent __P((module_t, int, void *)); static int stf_encapcheck __P((const struct mbuf *, int, int, void *)); static struct in6_ifaddr *stf_getsrcifa6 __P((struct ifnet *)); static int stf_output __P((struct ifnet *, struct mbuf *, struct sockaddr = *, @@ -167,31 +154,31 @@ static void stf_rtrequest __P((int, struct rtentry *, struct sockaddr *)); static int stf_ioctl __P((struct ifnet *, u_long, caddr_t)); =20 -void -stfattach(dummy) - void *dummy; +static int +stfmodevent(mod, type, data) + module_t mod; + int type; + void *data; { struct stf_softc *sc; - int i; + int err; const struct encaptab *p; + + switch (type) { + case MOD_LOAD: + stf =3D malloc(sizeof(struct stf_softc), M_STF, M_WAITOK); + bzero(stf, sizeof(struct stf_softc)); + sc =3D stf; =20 - nstf =3D NSTF; - stf =3D malloc(nstf * sizeof(struct stf_softc), M_DEVBUF, M_WAITOK); - bzero(stf, nstf * sizeof(struct stf_softc)); - sc =3D stf; - - /* XXX just in case... */ - for (i =3D 0; i < nstf; i++) { - sc =3D &stf[i]; bzero(sc, sizeof(*sc)); sc->sc_if.if_name =3D "stf"; - sc->sc_if.if_unit =3D i; + sc->sc_if.if_unit =3D 0; =20 p =3D encap_attach_func(AF_INET, IPPROTO_IPV6, stf_encapcheck, &in_stf_protosw, sc); if (p =3D=3D NULL) { printf("%s: attach failed\n", if_name(&sc->sc_if)); - continue; + return (ENOMEM); } sc->encap_cookie =3D p; =20 @@ -206,18 +193,33 @@ #endif sc->sc_if.if_snd.ifq_maxlen =3D IFQ_MAXLEN; if_attach(&sc->sc_if); -#if NBPFILTER > 0 #ifdef HAVE_OLD_BPF bpfattach(&sc->sc_if, DLT_NULL, sizeof(u_int)); #else bpfattach(&sc->sc_if.if_bpf, &sc->sc_if, DLT_NULL, sizeof(u_int)); #endif -#endif + break; + case MOD_UNLOAD: + sc =3D stf; + bpfdetach(&sc->sc_if); + if_detach(&sc->sc_if); + err =3D encap_detach(sc->encap_cookie); + KASSERT(err =3D=3D 0, ("Unexpected error detaching encap_cookie")); + free(sc, M_STF); + break; } + + return (0); } =20 -PSEUDO_SET(stfattach, if_stf); +static moduledata_t stf_mod =3D { + "if_stf", + stfmodevent, + 0 +}; =20 +DECLARE_MODULE(if_stf, stf_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); + static int stf_encapcheck(m, off, proto, arg) const struct mbuf *m; @@ -389,7 +391,7 @@ &ip->ip_src, sizeof(ip->ip_src)); bcopy(in4, &ip->ip_dst, sizeof(ip->ip_dst)); ip->ip_p =3D IPPROTO_IPV6; - ip->ip_ttl =3D ip_gif_ttl; /*XXX*/ + ip->ip_ttl =3D ip_stf_ttl; ip->ip_len =3D m->m_pkthdr.len; /*host order*/ if (ifp->if_flags & IFF_LINK1) ip_ecn_ingress(ECN_ALLOWED, &ip->ip_tos, &tos); @@ -583,7 +585,6 @@ =20 m->m_pkthdr.rcvif =3D ifp; =09 -#if NBPFILTER > 0 if (ifp->if_bpf) { /* * We need to prepend the address family as @@ -605,7 +606,6 @@ bpf_mtap(ifp->if_bpf, &m0); #endif } -#endif /*NBPFILTER > 0*/ =20 /* * Put the packet to the network layer input queue according to the @@ -679,5 +679,3 @@ =20 return error; } - -#endif /* NSTF > 0 */ Index: sys/netinet/in_gif.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/netinet/in_gif.c,v retrieving revision 1.10 diff -u -u -r1.10 in_gif.c --- sys/netinet/in_gif.c 2001/06/11 12:39:00 1.10 +++ sys/netinet/in_gif.c 2001/06/22 19:21:57 @@ -67,17 +67,9 @@ =20 #include =09 =20 -#include "gif.h" - -#include - #include =20 -#if NGIF > 0 int ip_gif_ttl =3D GIF_TTL; -#else -int ip_gif_ttl =3D 0; -#endif SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, &ip_gif_ttl, 0, ""); =20 @@ -210,25 +202,15 @@ } =20 void -#if __STDC__ -in_gif_input(struct mbuf *m, ...) -#else -in_gif_input(m, va_alist) +in_gif_input(m, off, proto) struct mbuf *m; - va_dcl -#endif + int off; + int proto; { - int off, proto; struct ifnet *gifp =3D NULL; struct ip *ip; - va_list ap; int af; u_int8_t otos; - - va_start(ap, m); - off =3D va_arg(ap, int); - proto =3D va_arg(ap, int); - va_end(ap); =20 ip =3D mtod(m, struct ip *); =20 Index: sys/netinet/in_gif.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/netinet/in_gif.h,v retrieving revision 1.4 diff -u -u -r1.4 in_gif.h --- sys/netinet/in_gif.h 2000/07/04 16:35:05 1.4 +++ sys/netinet/in_gif.h 2001/06/22 19:19:23 @@ -37,7 +37,7 @@ =20 extern int ip_gif_ttl; =20 -void in_gif_input __P((struct mbuf *, ...)); +void in_gif_input __P((struct mbuf *, int off, int proto)); int in_gif_output __P((struct ifnet *, int, struct mbuf *, struct rtentry = *)); int gif_encapcheck4 __P((const struct mbuf *, int, int, void *)); =20 Index: sys/netinet/in_proto.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/netinet/in_proto.c,v retrieving revision 1.56 diff -u -u -r1.56 in_proto.c --- sys/netinet/in_proto.c 2001/06/11 12:39:00 1.56 +++ sys/netinet/in_proto.c 2001/06/11 17:41:06 @@ -78,16 +78,6 @@ #include #endif /* IPSEC */ =20 -#include "gif.h" -#if NGIF > 0 -#include -#endif - -#include "stf.h" -#if NSTF > 0 -#include -#endif - #ifdef IPXIP #include #endif @@ -212,26 +202,6 @@ &rip_usrreqs }, }; - -#if NGIF > 0 -struct ipprotosw in_gif_protosw =3D -{ SOCK_RAW, &inetdomain, 0/*IPPROTO_IPV[46]*/, PR_ATOMIC|PR_ADDR, - in_gif_input, rip_output, 0, rip_ctloutput, - 0, - 0, 0, 0, 0, - &rip_usrreqs -}; -#endif /*NGIF*/ - -#if NSTF > 0 -struct ipprotosw in_stf_protosw =3D -{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR, - in_stf_input, rip_output, 0, rip_ctloutput, - 0, - 0, 0, 0, 0, - &rip_usrreqs -}; -#endif /*NSTF*/ =20 extern int in_inithead __P((void **, int)); =20 Index: sys/netinet6/in6.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/netinet6/in6.c,v retrieving revision 1.12 diff -u -u -r1.12 in6.c --- sys/netinet6/in6.c 2001/06/11 12:39:05 1.12 +++ sys/netinet6/in6.c 2001/06/11 17:00:35 @@ -105,11 +105,6 @@ #include #endif =20 -#include "gif.h" -#if NGIF > 0 -#include -#endif - #include =20 MALLOC_DEFINE(M_IPMADDR, "in6_multi", "internet multicast address"); Index: sys/netinet6/in6_proto.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/netinet6/in6_proto.c,v retrieving revision 1.14 diff -u -u -r1.14 in6_proto.c --- sys/netinet6/in6_proto.c 2001/06/11 12:39:05 1.14 +++ sys/netinet6/in6_proto.c 2001/06/11 17:01:55 @@ -128,11 +128,6 @@ =20 #include =20 -#include "gif.h" -#if NGIF > 0 -#include -#endif - #include =20 /* @@ -251,16 +246,6 @@ }, }; =20 -#if NGIF > 0 -struct ip6protosw in6_gif_protosw =3D -{ SOCK_RAW, &inet6domain, 0/*IPPROTO_IPV[46]*/, PR_ATOMIC|PR_ADDR, - in6_gif_input, rip6_output, 0, rip6_ctloutput, - 0, - 0, 0, 0, 0, - &rip6_usrreqs -}; -#endif /*NGIF*/ - extern int in6_inithead __P((void **, int)); =20 struct domain inet6domain =3D @@ -299,11 +284,7 @@ int ip6_dad_count =3D 1; /* DupAddrDetectionTransmits */ u_int32_t ip6_flow_seq; int ip6_auto_flowlabel =3D 1; -#if NGIF > 0 -int ip6_gif_hlim =3D GIF_HLIM; -#else int ip6_gif_hlim =3D 0; -#endif int ip6_use_deprecated =3D 1; /* allow deprecated addr (RFC2462 5.5.4) */ int ip6_rr_prune =3D 5; /* router renumbering prefix * walk list every 5 sec. */ Index: sys/netinet6/ip6_input.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/netinet6/ip6_input.c,v retrieving revision 1.27 diff -u -u -r1.27 ip6_input.c --- sys/netinet6/ip6_input.c 2001/06/11 12:39:05 1.27 +++ sys/netinet6/ip6_input.c 2001/06/11 16:58:56 @@ -121,7 +121,6 @@ #include =20 #include "faith.h" -#include "gif.h" =20 #include =20 Index: sys/sys/sockio.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/sys/sockio.h,v retrieving revision 1.18 diff -u -u -r1.18 sockio.h --- sys/sys/sockio.h 2001/06/11 20:34:19 1.18 +++ sys/sys/sockio.h 2001/06/21 21:22:58 @@ -100,4 +100,8 @@ #define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set link level addr */ =20 +#define SIOCIFCREATE _IOWR('i', 122, struct ifreq) /* create clone if */ +#define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */ +#define SIOCIFGCLONERS _IOWR('i', 120, struct if_clonereq) /* get cloners = */ + #endif /* !_SYS_SOCKIO_H_ */ Index: sys/modules/Makefile =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/modules/Makefile,v retrieving revision 1.186 diff -u -u -r1.186 Makefile --- sys/modules/Makefile 2001/06/14 15:15:54 1.186 +++ sys/modules/Makefile 2001/06/22 01:10:08 @@ -8,7 +8,8 @@ =20 SUBDIR=3D 3dfx accf_data accf_http agp aha amr an aue \ cam ccd cd9660 coda cue dc de dgm digi ed fdescfs fs fxp if_disc if_ef \ - if_ppp if_sl if_tap if_tun ip6fw ipfilter ipfw ispfw joy kue lge \ + if_gif if_ppp if_sl if_stf if_tap if_tun \ + ip6fw ipfilter ipfw ispfw joy kue lge \ libmchain linux lnc md mii mlx msdosfs ncp netgraph nfs nge ntfs \ nullfs nwfs pcn portalfs procfs ${_random} \ rl rp sf sis sk sn snp sound sppp ste sym syscons sysvipc ti tl twe \ --- sys/modules/if_gif/Makefile.orig Fri Jun 8 19:00:25 2001 +++ sys/modules/if_gif/Makefile Fri Jun 8 19:04:43 2001 @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../neti= net6 + +KMOD=3D if_gif +SRCS=3D if_gif.c in_gif.c in6_gif.c opt_inet.h opt_inet6.h opt_mrouting.h +NOMAN=3D + +opt_inet.h: + echo "#define INET 1" > ${.TARGET} + +opt_inet6.h: + echo "#define INET6 1" > ${.TARGET} + +opt_mrouting.h: + echo "#define MROUTING 1" > ${.TARGET} + +.include --- sys/modules/if_stf/Makefile.orig Mon Jun 11 11:34:03 2001 +++ sys/modules/if_stf/Makefile Mon Jun 11 11:36:30 2001 @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../net + +KMOD=3D if_stf +SRCS=3D if_stf.c opt_inet.h opt_inet6.h +NOMAN=3D + +opt_inet.h: + echo "#define INET 1" > ${.TARGET} + +opt_inet6.h: + echo "#define INET6 1" > ${.TARGET} + +.include Index: etc/rc.network =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/etc/rc.network,v retrieving revision 1.99 diff -u -u -r1.99 rc.network --- etc/rc.network 2001/06/16 15:48:43 1.99 +++ etc/rc.network 2001/06/22 01:29:04 @@ -766,7 +766,7 @@ continue ;; *) - ifconfig $i tunnel ${peers} + ifconfig $i create tunnel ${peers} ;; esac done Index: share/man/man4/gif.4 =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/share/man/man4/gif.4,v retrieving revision 1.9 diff -u -r1.9 gif.4 --- share/man/man4/gif.4 2001/06/11 12:38:48 1.9 +++ share/man/man4/gif.4 2001/06/25 20:42:04 @@ -35,7 +35,7 @@ .Nm gif .Nd generic tunnel interface .Sh SYNOPSIS -.Cd "device gif" Op Ar count +.Cd "device gif" .Sh DESCRIPTION The .Nm @@ -210,3 +210,19 @@ .Dv IFF_LINK0 flag. The behavior was obsoleted and is no longer supported. +.Pp +In some cases, when +.Cm ifconfig gifN destroy +is executed, an IPv6 default route is removed. +This problem occures when the following conditions are met: +.Bl -dash -offset indent -compact +.It +The host doesn't accept RA (i.e. net.inet6.ip6.accept_rtadv=3D0), +.It +the default route is installed manually, and +.It +.Cm ifconfig gifN destroy +is executed. +.El +It is thought that this is not actually a bug in gif, but rather lies +somewhere around a manipulation of an IPv6 routing table. --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OQHwXY6L6fI4GtQRAjnsAKC3laFZY6DXqns41zRclOrTtYKPLwCfRxrn NZRRjCE/ol1qSUMwRxh+mkg= =uDfo -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Tue Jun 26 19: 0:59 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 5BAE037B405; Tue, 26 Jun 2001 19:00:54 -0700 (PDT) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id SAA19985; Tue, 26 Jun 2001 18:52:05 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.3/8.11.3) id f5R1okI61139; Tue, 26 Jun 2001 18:50:46 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200106270150.f5R1okI61139@arch20m.dellroad.org> Subject: Going on vacation.. To: developers@freebsd.org, freebsd-net@freebsd.org Date: Tue, 26 Jun 2001 18:50:46 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org FYI, I'll be on vacation during the month of July and pretty much out of email contact... see you in August. Cheers, -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 0: 7:53 2001 Delivered-To: freebsd-net@freebsd.org Received: from sentry.granch.com (sentry.granch.com [212.109.197.55]) by hub.freebsd.org (Postfix) with ESMTP id 3510937B405 for ; Wed, 27 Jun 2001 00:07:46 -0700 (PDT) (envelope-from shelton@sentry.granch.com) Received: (from shelton@localhost) by sentry.granch.com (8.11.4/8.11.4) id f5R778v04665; Wed, 27 Jun 2001 14:07:08 +0700 (NOVST) (envelope-from shelton) Content-Type: text/plain; charset="koi8-r" From: "Rashid N. Achilov" Organization: Granch Ltd. To: Mike Silbersack Subject: Re: Securing the root account Date: Wed, 27 Jun 2001 14:07:08 +0700 X-Mailer: KMail [version 1.2] Cc: "Orville R. Weyrich.Jr" , References: <20010622152509.P18143-100000@achilles.silby.com> In-Reply-To: <20010622152509.P18143-100000@achilles.silby.com> MIME-Version: 1.0 Message-Id: <01062714070805.02148@sentry.granch.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Saturday 23 June 2001 03:25, Mike Silbersack wrote: > On Fri, 22 Jun 2001, Mike Silbersack wrote: > > On Fri, 22 Jun 2001, Rashid N. Achilov wrote: > > > Nicest SSH client for Windows is "SSH for Windows" :-) It called so. > > > http://winssh.narod.ru/files/ssh-1.1.1.zip. Textmode, SSH2 support, > > > freeware(!), multiconsole (up to 9 sessions in one window). mc and > > > F-keys > > > > I'll check it out, downloading now. (The secondary download site listed > > on the main page works much better from here, FWIW.) > > Hm, it looks pretty much like putty to me, doesn't support scrollback as > far as I can tell. I'll stick with SecureCRT. > "Jedem das seine" as tell our German friends :-) I don't like GUI clients. Textmode and multiconsole support are more important for me...(Most suited SSH client for me living at ftp://ftp.itk.ru/pub/telnet, it support SSH2, but doesn't work under WinNT :-( , previous version (1.3) work under WinNT, but doesn't support SSH2 :-( ) -- With Best Regards. Rashid N. Achilov (RNA1-RIPE), Web: http://granch.ru/~shelton Granch Ltd. system administrator, e-mail: achilov@granch.ru PGP: 83 CD E2 A7 37 4A D5 81 D6 D6 52 BF C9 2F 85 AF 97 BE CB 0A To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 1:12:54 2001 Delivered-To: freebsd-net@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id EC59B37B401; Wed, 27 Jun 2001 01:12:27 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f5R8C0u11775; Wed, 27 Jun 2001 11:12:00 +0300 (EEST) (envelope-from ru) Date: Wed, 27 Jun 2001 11:12:00 +0300 From: Ruslan Ermilov To: Brooks Davis Cc: net@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: review request: network interface cloning Message-ID: <20010627111159.E2097@sunbay.com> Mail-Followup-To: Brooks Davis , net@FreeBSD.ORG, audit@FreeBSD.ORG References: <20010626144313.A7909@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010626144313.A7909@Odin.AC.HMC.Edu>; from brooks@one-eyed-alien.net on Tue, Jun 26, 2001 at 02:43:15PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, Jun 26, 2001 at 02:43:15PM -0700, Brooks Davis wrote: > Please review the attached patch. It does the following: > > - implementes network interface cloning via ifconfig > - adds cloning support to gif > - removes gif dependencies from stf > - makes gif and stf modular > > Notes: > > The cloning API isn't quite that of NetBSD because the NetBSD API only > supported the creation of staticaly numbered interfaces which can lead > to races and starvation in theory. This patch instead allows interfaces > to implement wildcard interface creation via "ifconfig gif# create". > > Hajimu UMEMOTO found a bug related to deletion of gif IPv6 tunnels in > certain situations. We're fairly certain it's in the IPv6 routing code > rather then in gif. Since even with this bug, the world will be a better > place with this patch, I've documented it in gif(4)'s BUGS section and > suggest we commit anyway to get cloning into the system. > > -- Brooks > > P.S. The patch can also be found at: > > http://people.freebsd.org/~brooks/patches/gif.diff > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > > > Index: sbin/ifconfig/ifconfig.8 > +.It Cm plumb > +Another name for the > +.Fl create > +parameter. Included for Solaris compatability. > +.It Cm unplumb > +Another name for the > +.Fl destroy > +parameter. Included for Solaris compatability. Please don't use hard sentence breaks. Always start new sentence at new line. Should not the "compatability" be spelled as "compatibility"? > +.Fl C > +flag may be used to list all of the interface cloners available on > +the system, with no additional information. Use of this flag is > +mutually exclusive with all other flags and commands. Get rid of hard-sentence break. > Index: sbin/ifconfig/ifconfig.c > - while ((c = getopt(argc, argv, "adlmu" > + while ((c = getopt(argc, argv, "Cadlmu" > #ifdef INET6 > "L" > #endif > @@ -428,6 +445,9 @@ > case 'm': /* show media choices in status */ > supmedia = 1; > break; > + case 'C': > + listcloners = 1; > + break; > default: > usage(); > break; Especially with the long getopt() list, it might be a good idea to put `case' statements in the same order as they were in getopt() call. > @@ -448,6 +478,7 @@ > if (!namesonly && argc < 1) > all = 1; > > + > /* -a and -l allow an address family arg to limit the output */ > if (all || namesonly) { > if (argc > 1) Unnecessary newline. > +void > +list_cloners(void) > +{ > + struct if_clonereq ifcr; > + char *cp, *buf; > + int idx; > + int s; > + > + s = socket(AF_INET, SOCK_DGRAM, 0); > + if (s < 0) > + err(1, "socket"); > + Syscalls return -1 on error, not <0. > + putchar('\n'); > + free(buf); > + return; > +} void functions do not need `return' at the end. > +void > +clone_create() > +{ > + int s; > + > + s = socket(AF_INET, SOCK_DGRAM, 0); > + if (s < 0) > + err(1, "socket"); > + > + bzero(&ifr, sizeof(ifr)); You need to decide, memset(3) or bzero(3). :-) > +void > +clone_destroy(val, d, s, rafp) > + const char *val; > + int d; > + int s; > + const struct afswtch *rafp; > +{ > + (void) strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); > + if (ioctl(s, SIOCIFDESTROY, &ifr) < 0) > + err(1, "SIOCIFDESTROY"); > } > Missing newline after `{'. > Index: sys/net/if.c [...] > /* > + * Create a clone network interface. > + */ > +int > +if_clone_create(name, len) > + char *name; > + int len; > +{ > + struct if_clone *ifc; > + char *dp; > + int wildcard = 0; How about moving the initialization part below? > + int unit; > + int err; > + > + ifc = if_clone_lookup(name, &unit); > + if (ifc == NULL) > + return (EINVAL); > + > + if (ifunit(name) != NULL) > + return (EEXIST); > + > + if (unit < 0) > + wildcard = 1; wildcard = (unit < 0); > + > + err = (*ifc->ifc_create)(ifc, &unit); > + if (err != 0) > + return (err); > + if (err) return (err); is more traditional :-) > + /* In the wildcard case, we need to update the name. */ > + if (wildcard) { > + for (dp = name; *dp != '#'; dp++); > + if (snprintf(dp, len - (dp-name), "%d", unit) > > + len - (dp-name) - 1) { > + /* > + * This can only be a programmer error and > + * there's no straightforward way to recover if > + * it happens. > + */ > + panic("interface name too long"); Probably worth including the function name in the panic() string. > +/* > + * Look up a network interface cloner. > + */ > +struct if_clone * > +if_clone_lookup(name, unitp) > + const char *name; > + int *unitp; > +{ > + struct if_clone *ifc; > + const char *cp; > + int i; > + > + for (ifc = LIST_FIRST(&if_cloners); ifc != NULL;) { > + for (cp = name, i = 0; i < ifc->ifc_namelen; i++, cp++) { > + if (ifc->ifc_name[i] != *cp) > + goto next_ifc; > + } > + goto found_name; > + next_ifc: > + ifc = LIST_NEXT(ifc, ifc_list); > + } > + > + /* No match. */ > + return (NULL); > + return ((struct if_clone *)NULL); IMO looks better. > Index: sys/sys/sockio.h > =================================================================== > RCS file: /home/ncvs/src/sys/sys/sockio.h,v > retrieving revision 1.18 > diff -u -u -r1.18 sockio.h > --- sys/sys/sockio.h 2001/06/11 20:34:19 1.18 > +++ sys/sys/sockio.h 2001/06/21 21:22:58 > @@ -100,4 +100,8 @@ > #define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ > #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set link level addr */ > > +#define SIOCIFCREATE _IOWR('i', 122, struct ifreq) /* create clone if */ > +#define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */ > +#define SIOCIFGCLONERS _IOWR('i', 120, struct if_clonereq) /* get cloners */ > + > #endif /* !_SYS_SOCKIO_H_ */ These should be documented in netintro(4). > Index: share/man/man4/gif.4 > +In some cases, when > +.Cm ifconfig gifN destroy > +is executed, an IPv6 default route is removed. > +This problem occures when the following conditions are met: "occurs"? > +.Bl -dash -offset indent -compact > +.It > +The host doesn't accept RA (i.e. net.inet6.ip6.accept_rtadv=0), Please use the full form of contractions, i.e., "does not". > +.It > +the default route is installed manually, and > +.It > +.Cm ifconfig gifN destroy > +is executed. .Nm ifconfig Ar gifN Cm destroy > +It is thought that this is not actually a bug in gif, but rather lies It is thought that this is not actually a bug in .Nm , but rather lies Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 9:18:12 2001 Delivered-To: freebsd-net@freebsd.org Received: from fubar.net-ninja.com (cc260960-a.mdlvly1.tn.home.com [65.14.125.177]) by hub.freebsd.org (Postfix) with ESMTP id 912F537B401 for ; Wed, 27 Jun 2001 09:18:09 -0700 (PDT) (envelope-from sz@cdc.net) Received: by fubar.net-ninja.com (Postfix, from userid 100) id 9DA5A88C71; Wed, 27 Jun 2001 12:17:48 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by fubar.net-ninja.com (Postfix) with ESMTP id 84D0743AD8 for ; Wed, 27 Jun 2001 12:17:48 -0400 (EDT) Date: Wed, 27 Jun 2001 12:17:48 -0400 (EDT) From: Eric Parker X-X-Sender: To: Subject: Problem with Cisco Aironet 340 series 11mbs Wireless Card Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I did eventually get the Cisco Aironet 340 card working in FreeBSD 4.3, but I am having a couple of problems. First, I am missing something about boot up. I was under the impression that if I create a file called /etc/start_if.an0 that it will be executed during boot up. I have the following in that file: #!/bin/sh /usr/sbin/ancontrol -i an0 -s 2 /usr/sbin/ancontrol -i an0 -v 0 -a 00:40:96:48:A3:F1 /usr/sbin/ancontrol -i an0 -v 0 -k 0xkey_here /usr/sbin/ancontrol -i an0 -K 2 /usr/sbin/ancontrol -i an0 -W 1 /usr/sbin/ancontrol -i an0 -v 0 -n xxSSID /usr/sbin/ancontrol -i an0 -o 1 /usr/sbin/ancontrol -i an0 -c 6 This works if I run it by hand, sets up the card just as it should be, but how do I get it to run it on boot up? I currently have it listed in rc.local to get take care of it. The second issue is the biggest one. For some reason I have high latency when pinging my gateway. With the wireless card, I get ping replies between 200 and 400 ms while I get around 10 ms with a regular ethernet card. Am I missing a setting somewhere? I have a dual boot system and the pings are normal under Windows 2000, so it's not the card. Any help would be greatly appreciated! ------ Eric Parker Network Engineer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 9:37:34 2001 Delivered-To: freebsd-net@freebsd.org Received: from skeezix.n0qds.org (skeezix.n0qds.org [204.246.69.106]) by hub.freebsd.org (Postfix) with ESMTP id 8665337B405 for ; Wed, 27 Jun 2001 09:37:30 -0700 (PDT) (envelope-from gregp@n0qds.org) Received: by skeezix.n0qds.org (Postfix, from userid 501) id 4BBB4CA; Wed, 27 Jun 2001 11:37:25 -0500 (CDT) Date: Wed, 27 Jun 2001 11:37:25 -0500 From: Greg Putrich To: Eric Parker Cc: freebsd-net@freebsd.org Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card Message-ID: <20010627113724.D61306@skeezix.n0qds.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from sz@cdc.net on Wed, Jun 27, 2001 at 12:17:48PM -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Eric Parker said: > about boot up. I was under the impression that if I create a file called > /etc/start_if.an0 that it will be executed during boot up. I have the > following in that file: > > This works if I run it by hand, sets up the card just as it should > be, but how do I get it to run it on boot up? I currently have it listed > in rc.local to get take care of it. Toss it in /usr/local/etc/rc.d, or leave it where it is and call it from /etc/pccard.conf in the section for the Aironet card. > The second issue is the biggest one. For some reason I have high > latency when pinging my gateway. With the wireless card, I get ping > replies between 200 and 400 ms while I get around 10 ms with a regular > ethernet card. Am I missing a setting somewhere? I have a dual boot > system and the pings are normal under Windows 2000, so it's not the card. > Any help would be greatly appreciated! Unfortunately, I can't help here. I have the card working on 4.1.1, but that machine is unavailable at the moment (which reminds me to get it back). Under 4.1.1, ping replies were normal and didn't see ping times that long. -- -------------------------------------------------------------------------- Greg Putrich - Internet: gregp@n0qds.org [sk] "I will not be pushed, filed, stamped, indexed, briefed, debriefed, or numbered. My life is my own." - No. 6 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 10:12:50 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail.chem.msu.ru (mail.chem.msu.ru [195.208.208.19]) by hub.freebsd.org (Postfix) with ESMTP id 8415D37B401; Wed, 27 Jun 2001 10:12:43 -0700 (PDT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su ([158.250.32.97]) by mail.chem.msu.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id NHPRVH4D; Wed, 27 Jun 2001 21:07:48 +0400 Received: (from yar@localhost) by comp.chem.msu.su (8.11.1/8.11.1) id f5RHCWQ61872; Wed, 27 Jun 2001 21:12:32 +0400 (MSD) (envelope-from yar) Date: Wed, 27 Jun 2001 21:12:32 +0400 From: Yar Tikhiy To: Jonathan Lemon Cc: audit@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: Long ether frames & MTU Message-ID: <20010627211231.B52886@comp.chem.msu.su> References: <20010625230255.A11496@comp.chem.msu.su> <20010625142542.Z33375@prism.flugsvamp.com> <20010626075624.D95583@gsmx07.alcatel.com.au> <20010625172318.C33375@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010625172318.C33375@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Mon, Jun 25, 2001 at 05:23:18PM -0500 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Jun 25, 2001 at 05:23:18PM -0500, Jonathan Lemon wrote: > On Tue, Jun 26, 2001 at 07:56:24AM +1000, Peter Jeremy wrote: > > On 2001-Jun-25 14:25:42 -0500, Jonathan Lemon wrote: > > >On Mon, Jun 25, 2001 at 11:02:55PM +0400, Yar Tikhiy wrote: > > >> > > >> While more and more Ethernet NIC drivers start supporting long > > >> frames (>1518 bytes), the user/admin still cannot raise MTU on an > > >> Ethernet interface above the 1500 byte limit due to outdated code > > >> in net/if_ethersubr.c > > [patch removed] > > > > >I'm not at all sure how this change will help anything, unless each > > >driver alters if_hdrlen. > > > > One benefit is for 802.1Q VLAN support - the existence of lots of > > hard-wired values that restrict frames to 1518 bytes makes configuring > > VLAN's a pain. It would be nice if attaching a vlan(4) to a driver that > > handled 1522 byte frames resulted in a 1500 byte MTU on the vlan. > > Maybe I'm being dense here, but even with 1522 byte frames, the MTU > of the device should still be 1500. MTU in this context applies to IP, > so it wouldn't include either the vlan header or the ethernet header. You have a point there! I mistook the layer 3 (IP, IPX etc) MTU for the physical MTU of the ethernet NIC, which is rather high by default for many adapter types, unlike MRU. To run VLANs, one don't need to increase the IP MTU on the trunk interface. So I recall the patch, sorry. -- Yar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 10:25:15 2001 Delivered-To: freebsd-net@freebsd.org Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (Postfix) with ESMTP id 6E60637B406 for ; Wed, 27 Jun 2001 10:25:10 -0700 (PDT) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (#6@localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.11.3/8.11.3) with ESMTP id f5RHP4I55640; Wed, 27 Jun 2001 13:25:04 -0400 (EDT) (envelope-from louie@whizzo.transsys.com) Message-Id: <200106271725.f5RHP4I55640@whizzo.transsys.com> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Eric Parker Cc: freebsd-net@FreeBSD.ORG X-Image-URL: http://www.transsys.com/louie/images/louie-mail.jpg From: "Louis A. Mamakos" Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card References: In-reply-to: Your message of "Wed, 27 Jun 2001 12:17:48 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 27 Jun 2001 13:25:04 -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > /usr/sbin/ancontrol -i an0 -s 2 . . . > The second issue is the biggest one. For some reason I have high > latency when pinging my gateway. With the wireless card, I get ping > replies between 200 and 400 ms while I get around 10 ms with a regular > ethernet card. Am I missing a setting somewhere? I have a dual boot > system and the pings are normal under Windows 2000, so it's not the card. > Any help would be greatly appreciated! Turn off power savings mode to improve the responsiveness. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 11: 7: 2 2001 Delivered-To: freebsd-net@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id 6EDFB37B407; Wed, 27 Jun 2001 11:06:54 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:Uim4Ksh19a0M6sT0FkwwIprS8JZHwSn73PirERPuhLj+rFHz/0qOu2VUMVdB0xOP@localhost [::1]) (authenticated as ume with CRAM-MD5) by peace.mahoroba.org (8.11.4/8.11.4/peace) with ESMTP/inet6 id f5RI6PC76136; Thu, 28 Jun 2001 03:06:25 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Thu, 28 Jun 2001 03:06:22 +0900 (JST) Message-Id: <20010628.030622.104053637.ume@mahoroba.org> To: brooks@one-eyed-alien.net Cc: net@freebsd.org, audit@freebsd.org Subject: Re: review request: network interface cloning From: Hajimu UMEMOTO In-Reply-To: <20010626144313.A7909@Odin.AC.HMC.Edu> References: <20010626144313.A7909@Odin.AC.HMC.Edu> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Tue, 26 Jun 2001 14:43:15 -0700 >>>>> Brooks Davis said: brooks> Hajimu UMEMOTO found a bug related to deletion of gif IPv6 tunnels in brooks> certain situations. We're fairly certain it's in the IPv6 routing code brooks> rather then in gif. Since even with this bug, the world will be a better brooks> place with this patch, I've documented it in gif(4)'s BUGS section and brooks> suggest we commit anyway to get cloning into the system. At last, I found it. I just committed the fix. Please remove the description from gif(4) manpage. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet6/nd6.c.diff?r1=1.10&r2=1.11 -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 11:12:32 2001 Delivered-To: freebsd-net@freebsd.org Received: from coopcomp.com (coopcomp.com [161.58.219.43]) by hub.freebsd.org (Postfix) with ESMTP id 3585B37B407 for ; Wed, 27 Jun 2001 11:12:29 -0700 (PDT) (envelope-from seichert@coopcomp.com) Received: from gourdy.coopcomp.com (gourdy.coopcomp.com [64.81.249.34]) by coopcomp.com (8.11.2) id f5RICSn05045; Wed, 27 Jun 2001 12:12:28 -0600 (MDT) Received: by gourdy.coopcomp.com (sSMTP sendmail emulation); Wed, 27 Jun 2001 11:12:22 -0700 Date: Wed, 27 Jun 2001 11:12:22 -0700 From: Stuart Eichert To: net@freebsd.org Subject: Am I missing something? Message-ID: <20010627111222.A9434@gourdy.coopcomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In the past (under FreeBSD 3.0 and 3.3) I implemented a new networking protocol, that ran over Ethernet(and nothing else for that matter). I put a new ETHERTYPE into ethernet.h(0x0801 for the record). In addition I modified the switch statements in if_ethersubr.c:ether_output and if_ethersubr.c:ether_input to recognize this type and act accordingly. In addition I modified sys/socket.h to add an additional address family and protocol family for my protocol. From there I implemented the protocol in a separate directory, made some changes in the conf directory and then I was able to compile a new kernel with support for my protocol. This is cool and all (and yes I have updated it to work in 4.3), but I don't like the idea that anyone who wants to try out this protocol and any associated programs has to recompile an entire kernel. I would much prefer to create a kernel module that someone can load, test, and then unload. I don't think that I can do this however, because of the ethernet routines in if_ethersubr.c. These routines do not allow for the dynamic addition of new ETHERTYPES. I guess one could screw around with netgraph or tap(though I really know next to nothing about them), but that would not allow me to plug the protocol in below the socket layer. Is there no way to make a kernel module that will allow for the dynamic addition of ethernet protocols or am I just missing something? -- ------------ Stuart Eichert Cooperative Computers, Inc. seichert@coopcomp.com (650)938-0730 x 15 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 11:15:49 2001 Delivered-To: freebsd-net@freebsd.org Received: from starfruit.itojun.org (openbsd-0.lcs.mit.edu [18.26.4.157]) by hub.freebsd.org (Postfix) with ESMTP id CD21B37B405 for ; Wed, 27 Jun 2001 11:15:46 -0700 (PDT) (envelope-from itojun@itojun.org) Received: from itojun.org (localhost [127.0.0.1]) by starfruit.itojun.org (Postfix) with ESMTP id E958A7C2; Thu, 28 Jun 2001 03:10:51 +0900 (JST) To: Brooks Davis Cc: net@freebsd.org In-reply-to: brooks's message of Tue, 26 Jun 2001 14:43:15 MST. <20010626144313.A7909@Odin.AC.HMC.Edu> X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: review request: network interface cloning From: Jun-ichiro itojun Hagino Date: Thu, 28 Jun 2001 03:10:51 +0900 Message-Id: <20010627181051.E958A7C2@starfruit.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >The cloning API isn't quite that of NetBSD because the NetBSD API only >supported the creation of staticaly numbered interfaces which can lead >to races and starvation in theory. This patch instead allows interfaces >to implement wildcard interface creation via "ifconfig gif# create". not sure if gif# has a good usage model. if you type "ifconfig gif# create" you have little idea about the new interface name, hence you can't configure it after the command (think of the case where you put the command into /etc/rc.local). itojun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 11:26:59 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 780D937B401 for ; Wed, 27 Jun 2001 11:26:55 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5RIQmk20951; Wed, 27 Jun 2001 11:26:48 -0700 Date: Wed, 27 Jun 2001 11:26:48 -0700 From: Brooks Davis To: Jun-ichiro itojun Hagino Cc: net@FreeBSD.ORG Subject: Re: review request: network interface cloning Message-ID: <20010627112648.B12739@Odin.AC.HMC.Edu> References: <20010626144313.A7909@Odin.AC.HMC.Edu> <20010627181051.E958A7C2@starfruit.itojun.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="QKdGvSO+nmPlgiQ/" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010627181051.E958A7C2@starfruit.itojun.org>; from itojun@iijlab.net on Thu, Jun 28, 2001 at 03:10:51AM +0900 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --QKdGvSO+nmPlgiQ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 28, 2001 at 03:10:51AM +0900, Jun-ichiro itojun Hagino wrote: > >The cloning API isn't quite that of NetBSD because the NetBSD API only > >supported the creation of staticaly numbered interfaces which can lead > >to races and starvation in theory. This patch instead allows interfaces > >to implement wildcard interface creation via "ifconfig gif# create". >=20 > not sure if gif# has a good usage model. if you type "ifconfig gif# > create" you have little idea about the new interface name, hence you > can't configure it after the command (think of the case where you put > the command into /etc/rc.local). It is printed to stdout. Since status is not printed on creation, it is the only thing on stdout so it is easy to hand in a script: newgif=3D`ifconfig gif# create` ifconfig $newgif 10.0.0.1 10.0.0.2 For programmers, notification is done by modifying the name in the ifreq used to create the new interface. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --QKdGvSO+nmPlgiQ/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OiVnXY6L6fI4GtQRAvozAJ9pN/3BolGQY4We+QHvsiE0HW8lGwCgoWV+ Xjjy/3BF1lHMmQymTeO7C0U= =QECQ -----END PGP SIGNATURE----- --QKdGvSO+nmPlgiQ/-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 11:30:15 2001 Delivered-To: freebsd-net@freebsd.org Received: from starfruit.itojun.org (openbsd-0.lcs.mit.edu [18.26.4.157]) by hub.freebsd.org (Postfix) with ESMTP id F015537B405 for ; Wed, 27 Jun 2001 11:30:12 -0700 (PDT) (envelope-from itojun@itojun.org) Received: from itojun.org (localhost [127.0.0.1]) by starfruit.itojun.org (Postfix) with ESMTP id DCB857C2; Thu, 28 Jun 2001 03:25:11 +0900 (JST) To: Brooks Davis Cc: net@FreeBSD.ORG In-reply-to: brooks's message of Wed, 27 Jun 2001 11:26:48 MST. <20010627112648.B12739@Odin.AC.HMC.Edu> X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: review request: network interface cloning From: Jun-ichiro itojun Hagino Date: Thu, 28 Jun 2001 03:25:11 +0900 Message-Id: <20010627182511.DCB857C2@starfruit.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >It is printed to stdout. Since status is not printed on creation, it is >the only thing on stdout so it is easy to hand in a script: i see. thanks. >newgif=3D`ifconfig gif# create` >ifconfig $newgif 10.0.0.1 10.0.0.2 you may need to have backslash before #... :-) itojun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 11:38:14 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id D2EB237B416 for ; Wed, 27 Jun 2001 11:38:06 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5RIc3l22423; Wed, 27 Jun 2001 11:38:03 -0700 Date: Wed, 27 Jun 2001 11:38:03 -0700 From: Brooks Davis To: Jun-ichiro itojun Hagino Cc: net@FreeBSD.ORG Subject: Re: review request: network interface cloning Message-ID: <20010627113803.C12739@Odin.AC.HMC.Edu> References: <20010627112648.B12739@Odin.AC.HMC.Edu> <20010627182511.DCB857C2@starfruit.itojun.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="IpbVkmxF4tDyP/Kb" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010627182511.DCB857C2@starfruit.itojun.org>; from itojun@iijlab.net on Thu, Jun 28, 2001 at 03:25:11AM +0900 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --IpbVkmxF4tDyP/Kb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 28, 2001 at 03:25:11AM +0900, Jun-ichiro itojun Hagino wrote: > >newgif=3D3D`ifconfig gif# create` > >ifconfig $newgif 10.0.0.1 10.0.0.2 >=20 > you may need to have backslash before #... :-) Not in /bin/sh anyway (I just tested it). I think the `` part protects the #. There might be some corner cases, but I'm not sure. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --IpbVkmxF4tDyP/Kb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OigLXY6L6fI4GtQRAnDlAKCRlabbCqLFOlr2I4KOCcze+sjmzQCfVkJJ S6DGbHLtfItYnjLgwKIA1U8= =i/MM -----END PGP SIGNATURE----- --IpbVkmxF4tDyP/Kb-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 11:57:51 2001 Delivered-To: freebsd-net@freebsd.org Received: from fubar.net-ninja.com (cc260960-a.mdlvly1.tn.home.com [65.14.125.177]) by hub.freebsd.org (Postfix) with ESMTP id 7D7F737B406 for ; Wed, 27 Jun 2001 11:57:49 -0700 (PDT) (envelope-from sz@cdc.net) Received: by fubar.net-ninja.com (Postfix, from userid 100) id B7D4188C71; Wed, 27 Jun 2001 14:57:25 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by fubar.net-ninja.com (Postfix) with ESMTP id A04C743AD8; Wed, 27 Jun 2001 14:57:25 -0400 (EDT) Date: Wed, 27 Jun 2001 14:57:25 -0400 (EDT) From: Eric Parker X-X-Sender: To: "Louis A. Mamakos" Cc: Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card In-Reply-To: <200106271725.f5RHP4I55640@whizzo.transsys.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > > /usr/sbin/ancontrol -i an0 -s 2 > . > . > . > > > The second issue is the biggest one. For some reason I have high > > latency when pinging my gateway. With the wireless card, I get ping > > replies between 200 and 400 ms while I get around 10 ms with a regular > > ethernet card. Am I missing a setting somewhere? I have a dual boot > > system and the pings are normal under Windows 2000, so it's not the card. > > Any help would be greatly appreciated! > > Turn off power savings mode to improve the responsiveness. > > louie Perfect, that was it! Thanks a lot, that dropped the ping by 200ms+ ------ Eric Parker Network Engineer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:10: 9 2001 Delivered-To: freebsd-net@freebsd.org Received: from fubar.net-ninja.com (cc260960-a.mdlvly1.tn.home.com [65.14.125.177]) by hub.freebsd.org (Postfix) with ESMTP id 22CBE37B406 for ; Wed, 27 Jun 2001 12:10:01 -0700 (PDT) (envelope-from sz@cdc.net) Received: by fubar.net-ninja.com (Postfix, from userid 100) id 639B488C71; Wed, 27 Jun 2001 15:09:40 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by fubar.net-ninja.com (Postfix) with ESMTP id 4ACAE43AD8; Wed, 27 Jun 2001 15:09:40 -0400 (EDT) Date: Wed, 27 Jun 2001 15:09:40 -0400 (EDT) From: Eric Parker X-X-Sender: To: Greg Putrich Cc: Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card In-Reply-To: <20010627113724.D61306@skeezix.n0qds.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Eric Parker said: > > about boot up. I was under the impression that if I create a file called > > /etc/start_if.an0 that it will be executed during boot up. I have the > > following in that file: > > > > This works if I run it by hand, sets up the card just as it should > > be, but how do I get it to run it on boot up? I currently have it listed > > in rc.local to get take care of it. > > Toss it in /usr/local/etc/rc.d, or leave it where it is and call it from > /etc/pccard.conf in the section for the Aironet card. I tried that, no dice. It appears that the problem is that the interface card isn't initalized yet to accept the ancontrol commands. I had to write a script that sleeps for 5 seconds during boot up, then runs the commands. It just seems that I am missing something, because I would think the start up scripts could handle that. My way works, I would just like to find the 'correct' way to make it work. > > The second issue is the biggest one. For some reason I have high > > latency when pinging my gateway. With the wireless card, I get ping > > replies between 200 and 400 ms while I get around 10 ms with a regular > > ethernet card. Am I missing a setting somewhere? I have a dual boot > > system and the pings are normal under Windows 2000, so it's not the card. > > Any help would be greatly appreciated! > > Unfortunately, I can't help here. I have the card working on 4.1.1, but > that machine is unavailable at the moment (which reminds me to get it back). > > Under 4.1.1, ping replies were normal and didn't see ping times that long. It was the power saving mode, which Louis A. Mamakos (thanks again!) was ale to help me with. The whole boot up thing still boggles me though... ------ Eric Parker Network Engineer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:14:14 2001 Delivered-To: freebsd-net@freebsd.org Received: from light.imasy.or.jp (light.imasy.or.jp [202.227.24.4]) by hub.freebsd.org (Postfix) with ESMTP id 95C1237B409 for ; Wed, 27 Jun 2001 12:14:09 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: (from uucp@localhost) by light.imasy.or.jp (8.11.3+3.4W/8.11.3/light) with UUCP id f5RJDtE05432; Thu, 28 Jun 2001 04:13:55 +0900 (JST) (envelope-from ume@mahoroba.org) Received: from peace.mahoroba.org (IDENT:QWKhclrrtooIFwuP4SLt6MpfBDb/xKJYYa/5YmmpJfeT5XssSLTAVQ08Fk8bG65W@peace.mahoroba.org [2001:200:301:0:200:f8ff:fe05:3eae]) (authenticated as ume with CRAM-MD5) by mail.mahoroba.org (8.11.4/8.11.4/chaos) with ESMTP/inet6 id f5RJDXm20249; Thu, 28 Jun 2001 04:13:33 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Thu, 28 Jun 2001 04:13:30 +0900 (JST) Message-Id: <20010628.041330.89015911.ume@mahoroba.org> To: brooks@one-eyed-alien.net Cc: itojun@iijlab.net, net@FreeBSD.ORG Subject: Re: review request: network interface cloning From: Hajimu UMEMOTO In-Reply-To: <20010627113803.C12739@Odin.AC.HMC.Edu> References: <20010627112648.B12739@Odin.AC.HMC.Edu> <20010627182511.DCB857C2@starfruit.itojun.org> <20010627113803.C12739@Odin.AC.HMC.Edu> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Wed, 27 Jun 2001 11:38:03 -0700 >>>>> Brooks Davis said: brooks> On Thu, Jun 28, 2001 at 03:25:11AM +0900, Jun-ichiro itojun Hagino wrote: > >newgif=3D`ifconfig gif# create` > >ifconfig $newgif 10.0.0.1 10.0.0.2 > > you may need to have backslash before #... :-) brooks> Not in /bin/sh anyway (I just tested it). I think the `` part protects brooks> the #. There might be some corner cases, but I'm not sure. Just my thought. Isn't it sufficent without `#', like `ifconfig gif create'? -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:15:33 2001 Delivered-To: freebsd-net@freebsd.org Received: from skeezix.n0qds.org (skeezix.n0qds.org [204.246.69.106]) by hub.freebsd.org (Postfix) with ESMTP id 02FF137B40C for ; Wed, 27 Jun 2001 12:15:30 -0700 (PDT) (envelope-from gregp@n0qds.org) Received: by skeezix.n0qds.org (Postfix, from userid 501) id C639CCA; Wed, 27 Jun 2001 14:15:28 -0500 (CDT) Date: Wed, 27 Jun 2001 14:15:28 -0500 From: Greg Putrich To: Eric Parker Cc: freebsd-net@freebsd.org Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card Message-ID: <20010627141528.A62758@skeezix.n0qds.org> References: <20010627113724.D61306@skeezix.n0qds.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from sz@cdc.net on Wed, Jun 27, 2001 at 03:09:40PM -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Eric Parker said: > I tried that, no dice. It appears that the problem is that the > interface card isn't initalized yet to accept the ancontrol commands. Hmmm... I put an ifconfig an0 up in the first line and that let things go just fine. I call the script out of pccard.conf. Not sure why sleeping for 5 secs works... my card would pretty much ignore ancontrol until I brought the if up. Think things may have changed a little in 4.3. -- -------------------------------------------------------------------------- Greg Putrich - Internet: gregp@n0qds.org [sk] "I will not be pushed, filed, stamped, indexed, briefed, debriefed, or numbered. My life is my own." - No. 6 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:30:55 2001 Delivered-To: freebsd-net@freebsd.org Received: from sneakerz.org (sneakerz.org [216.33.66.254]) by hub.freebsd.org (Postfix) with ESMTP id EFF8837B405 for ; Wed, 27 Jun 2001 12:30:52 -0700 (PDT) (envelope-from bright@sneakerz.org) Received: by sneakerz.org (Postfix, from userid 1092) id 5F92C5D010; Wed, 27 Jun 2001 14:30:42 -0500 (CDT) Date: Wed, 27 Jun 2001 14:30:42 -0500 From: Alfred Perlstein To: Stuart Eichert Cc: net@freebsd.org Subject: Re: Am I missing something? Message-ID: <20010627143042.F74703@sneakerz.org> References: <20010627111222.A9434@gourdy.coopcomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010627111222.A9434@gourdy.coopcomp.com>; from seichert@coopcomp.com on Wed, Jun 27, 2001 at 11:12:22AM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * Stuart Eichert [010627 13:12] wrote: > In the past (under FreeBSD 3.0 and 3.3) I implemented a new networking > protocol, that ran over Ethernet(and nothing else for that matter). I > put a new ETHERTYPE into ethernet.h(0x0801 for the record). In addition > I modified the switch statements in if_ethersubr.c:ether_output and > if_ethersubr.c:ether_input to recognize this type and act accordingly. > In addition I modified sys/socket.h to add an additional address family > and protocol family for my protocol. From there I implemented the protocol > in a separate directory, made some changes in the conf directory and then > I was able to compile a new kernel with support for my protocol. > > This is cool and all (and yes I have updated it to work in 4.3), but I don't > like the idea that anyone who wants to try out this protocol and any associated > programs has to recompile an entire kernel. I would much prefer to create > a kernel module that someone can load, test, and then unload. I don't think > that I can do this however, because of the ethernet routines in if_ethersubr.c. > These routines do not allow for the dynamic addition of new ETHERTYPES. > I guess one could screw around with netgraph or tap(though I really know next > to nothing about them), but that would not allow me to plug the protocol > in below the socket layer. > > Is there no way to make a kernel module that will allow for the > dynamic addition of ethernet protocols or am I just missing something? Why not provide a patch that allows one to add callbacks to the list? for ether_output under the default case you would walk the list looking for your type, since for the most part packets will be in AF_INET and when no callbacks are registered the array will be short, transmit should be cheap. For recieve if you look in the default case you can see ng_ether_input_orphan_p being used to input packets that don't match a known type. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:37: 7 2001 Delivered-To: freebsd-net@freebsd.org Received: from skeezix.n0qds.org (skeezix.n0qds.org [204.246.69.106]) by hub.freebsd.org (Postfix) with ESMTP id 334B137B409 for ; Wed, 27 Jun 2001 12:37:05 -0700 (PDT) (envelope-from gregp@n0qds.org) Received: by skeezix.n0qds.org (Postfix, from userid 501) id 4F764CA; Wed, 27 Jun 2001 14:37:04 -0500 (CDT) Date: Wed, 27 Jun 2001 14:37:04 -0500 From: Greg Putrich To: Marcelo Leal Cc: freebsd-net@freebsd.org Subject: FreeBSD as DHCP server Message-ID: <20010627143703.B62758@skeezix.n0qds.org> References: <3B3A349E.FEAF1946@myway.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B3A349E.FEAF1946@myway.com.br>; from leal@myway.com.br on Wed, Jun 27, 2001 at 04:31:42PM -0300 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Sure can. I've been using it for years as such. See /usr/ports/net/isc-dhcp2 (as far as I know 3 is still beta). Marcelo Leal said: > i'm so sorry, but this list is the my last chance... :O) > can freebsd be a dhcp server??? > in the handbook i found that the only option is dhcp-client. i wanna set > it for dhcp server. > please help me... > i don't believe that freebsd don't make that!! > thanks !!!! -- -------------------------------------------------------------------------- Greg Putrich - Internet: gregp@n0qds.org [sk] "I will not be pushed, filed, stamped, indexed, briefed, debriefed, or numbered. My life is my own." - No. 6 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:40:22 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id EF13737B406; Wed, 27 Jun 2001 12:40:09 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5RJe9C29463; Wed, 27 Jun 2001 12:40:09 -0700 Date: Wed, 27 Jun 2001 12:40:09 -0700 From: Brooks Davis To: Ruslan Ermilov Cc: net@FreeBSD.ORG, audit@FreeBSD.ORG Subject: Re: review request: network interface cloning Message-ID: <20010627124009.D12739@Odin.AC.HMC.Edu> References: <20010626144313.A7909@Odin.AC.HMC.Edu> <20010627111159.E2097@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="osDK9TLjxFScVI/L" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010627111159.E2097@sunbay.com>; from ru@FreeBSD.ORG on Wed, Jun 27, 2001 at 11:12:00AM +0300 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --osDK9TLjxFScVI/L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for the review. On Wed, Jun 27, 2001 at 11:12:00AM +0300, Ruslan Ermilov wrote: > Please don't use hard sentence breaks. I'm, not sure what you mean by this. Do you mean, don't use ". " or what? I've moved to split sentences by lines. > Especially with the long getopt() list, it might be a good idea to put > `case' statements in the same order as they were in getopt() call. I've reordered the switch statement to be ordered like getopt. It's not entierly right and Sheldon is correct that usage and the SYNOPSIS are also misorderd, but I'm not going to fix that just now. There are lots of problems with ifconfig and fixing them isn't really the point of this patch. I'm actually thinking of taking a look at adding our local extensions to the NetBSD ifconfig source and moving to that since they have actually maintained it. > You need to decide, memset(3) or bzero(3). :-) memset looks more common so I'm using it now. Some bzeros remain in unrelated parts of the code. > > + err =3D (*ifc->ifc_create)(ifc, &unit); > > + if (err !=3D 0) > > + return (err); > > + > if (err) > return (err); >=20 > is more traditional :-) But err isn't a boolean and the example in style(9) is: error =3D function(a1, a2); if (error !=3D 0) exit(error); The bug I documented in the gif manpage was caught and squashed so that has been removed. I've updated the diff at: http://people.freebsd.org/~brooks/patches/gif.diff -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --osDK9TLjxFScVI/L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OjaYXY6L6fI4GtQRAv9SAJ9yM2ydWxKe3mWdUrNSPat/0jKTGgCaA22p z1cbc1x7Dj2iOuUZBwQqriY= =Tw8F -----END PGP SIGNATURE----- --osDK9TLjxFScVI/L-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:47:46 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 760C337B405 for ; Wed, 27 Jun 2001 12:47:43 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5RJlV530411; Wed, 27 Jun 2001 12:47:31 -0700 Date: Wed, 27 Jun 2001 12:47:31 -0700 From: Brooks Davis To: Greg Putrich Cc: Eric Parker , freebsd-net@FreeBSD.ORG Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card Message-ID: <20010627124731.E12739@Odin.AC.HMC.Edu> References: <20010627113724.D61306@skeezix.n0qds.org> <20010627141528.A62758@skeezix.n0qds.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="X3gaHHMYHkYqP6yf" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010627141528.A62758@skeezix.n0qds.org>; from gregp@n0qds.org on Wed, Jun 27, 2001 at 02:15:28PM -0500 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --X3gaHHMYHkYqP6yf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2001 at 02:15:28PM -0500, Greg Putrich wrote: > Eric Parker said: > > I tried that, no dice. It appears that the problem is that the > > interface card isn't initalized yet to accept the ancontrol commands. >=20 > Hmmm... I put an ifconfig an0 up in the first line and that let=20 > things go just fine. I call the script out of pccard.conf. That's supposed to be fixed. Are you running -STABLE or -RELEASE? -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --X3gaHHMYHkYqP6yf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OjhSXY6L6fI4GtQRAr/wAJ0TtvLv+LgKYA8JA/HS5WEgkkgnHwCgugjB eWYUxnLXb0pL6HwMLm7gAfo= =JgTb -----END PGP SIGNATURE----- --X3gaHHMYHkYqP6yf-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:51: 0 2001 Delivered-To: freebsd-net@freebsd.org Received: from skeezix.n0qds.org (skeezix.n0qds.org [204.246.69.106]) by hub.freebsd.org (Postfix) with ESMTP id 1AFAC37B405 for ; Wed, 27 Jun 2001 12:50:54 -0700 (PDT) (envelope-from gregp@n0qds.org) Received: by skeezix.n0qds.org (Postfix, from userid 501) id 4EF90CA; Wed, 27 Jun 2001 14:50:53 -0500 (CDT) Date: Wed, 27 Jun 2001 14:50:53 -0500 From: Greg Putrich To: Brooks Davis Cc: freebsd-net@FreeBSD.ORG Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card Message-ID: <20010627145052.A63205@skeezix.n0qds.org> References: <20010627113724.D61306@skeezix.n0qds.org> <20010627141528.A62758@skeezix.n0qds.org> <20010627124731.E12739@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010627124731.E12739@Odin.AC.HMC.Edu>; from brooks@one-eyed-alien.net on Wed, Jun 27, 2001 at 12:47:31PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Brooks Davis said: > > Hmmm... I put an ifconfig an0 up in the first line and that let > > things go just fine. I call the script out of pccard.conf. > > That's supposed to be fixed. Are you running -STABLE or -RELEASE? I'm running 4.1.1-RELEASE. I started messing with 4.3-RELEASE, but I messed things up rather well when applying the patches to use WEP. Haven't had a chance to start again. -- -------------------------------------------------------------------------- Greg Putrich - Internet: gregp@n0qds.org [sk] "I will not be pushed, filed, stamped, indexed, briefed, debriefed, or numbered. My life is my own." - No. 6 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 12:53:27 2001 Delivered-To: freebsd-net@freebsd.org Received: from node7.cluster.srrc.usda.gov (symbion.srrc.usda.gov [199.133.86.40]) by hub.freebsd.org (Postfix) with ESMTP id 55FC237B407; Wed, 27 Jun 2001 12:53:24 -0700 (PDT) (envelope-from gjohnson@srrc.ars.usda.gov) Received: (from glenn@localhost) by node7.cluster.srrc.usda.gov (8.11.4/8.11.4) id f5RJqnv10250; Wed, 27 Jun 2001 14:52:49 -0500 (CDT) (envelope-from glenn) Date: Wed, 27 Jun 2001 14:52:49 -0500 From: Glenn Johnson To: Jonathan Lemon Cc: net@freebsd.org, kris@freebsd.org Subject: Re: select fails to return incoming connect on FreeBSD-4.3 Message-ID: <20010627145249.A10028@node7.cluster.srrc.usda.gov> References: <200106111937.f5BJb9o99898@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200106111937.f5BJb9o99898@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Mon, Jun 11, 2001 at 02:37:10PM -0500 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Jun 11, 2001 at 02:37:10PM -0500, Jonathan Lemon wrote: > >Could someone take a look at PR misc/27880? > > This was broken by the initial sequence number patch to TCP. > > When the server closes the socket, it puts the entry into the > TIME_WAIT state. When a new SYN is received from the client while the > socket is in this state, the new connection is only accepted if the > new sequence number is > than the old one. > > Unfortunately, with a randomized seqence #, the new connection ISN may > be less than the old sequence used, and the SYN will be ignored. > > I've copied this over to kris, who (IIRC) brought in the new sequence > numbering. Has anyone had a chance to look at this and figure out what the fix might be? Thanks. -- Glenn Johnson USDA, ARS, SRRC Phone: (504) 286-4252 New Orleans, LA 70124 e-mail: gjohnson@srrc.ars.usda.gov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 13: 0:34 2001 Delivered-To: freebsd-net@freebsd.org Received: from silby.com (cb34181-a.mdsn1.wi.home.com [24.14.173.39]) by hub.freebsd.org (Postfix) with ESMTP id EB8EE37B401 for ; Wed, 27 Jun 2001 13:00:31 -0700 (PDT) (envelope-from silby@silby.com) Received: (qmail 87528 invoked by uid 1000); 27 Jun 2001 20:00:31 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 27 Jun 2001 20:00:31 -0000 Date: Wed, 27 Jun 2001 15:00:31 -0500 (CDT) From: Mike Silbersack To: Glenn Johnson Cc: Jonathan Lemon , , Subject: Re: select fails to return incoming connect on FreeBSD-4.3 In-Reply-To: <20010627145249.A10028@node7.cluster.srrc.usda.gov> Message-ID: <20010627145814.L86970-100000@achilles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 27 Jun 2001, Glenn Johnson wrote: > Has anyone had a chance to look at this and figure out what the fix > might be? > > Thanks. > > -- > Glenn Johnson It's a feature, not a bug. :) Since everyone's on vacation and we can't switch generation schemes right now, I've e-mailed kris and asked if he objects to me adding a sysctl which switches between the current and old generation schemes. If he says it's ok, I'll commit it soon and those affected will be able to use the old generation scheme. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 13:10:10 2001 Delivered-To: freebsd-net@freebsd.org Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 5983237B401; Wed, 27 Jun 2001 13:10:04 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.1) with ESMTP id f5RK9wU96634; Wed, 27 Jun 2001 14:09:58 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200106272009.f5RK9wU96634@harmony.village.org> To: Brooks Davis Subject: Re: review request: network interface cloning Cc: Ruslan Ermilov , net@FreeBSD.ORG, audit@FreeBSD.ORG In-reply-to: Your message of "Wed, 27 Jun 2001 12:40:09 PDT." <20010627124009.D12739@Odin.AC.HMC.Edu> References: <20010627124009.D12739@Odin.AC.HMC.Edu> <20010626144313.A7909@Odin.AC.HMC.Edu> <20010627111159.E2097@sunbay.com> Date: Wed, 27 Jun 2001 14:09:58 -0600 From: Warner Losh Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <20010627124009.D12739@Odin.AC.HMC.Edu> Brooks Davis writes: : On Wed, Jun 27, 2001 at 11:12:00AM +0300, Ruslan Ermilov wrote: : > Please don't use hard sentence breaks. : : I'm, not sure what you mean by this. Do you mean, don't use ". " or : what? I've moved to split sentences by lines. He means to split the sentences by lines. They should look like this in the *roff source. It sounds like you did the right thing. They should not look like how one would normally write them. That causes *roff to mostly do the right thing, but sometimes the wrong thing. A paragraph like this one that looks good to read would cause minor problems for *roff. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 13:18:24 2001 Delivered-To: freebsd-net@freebsd.org Received: from fubar.net-ninja.com (cc260960-a.mdlvly1.tn.home.com [65.14.125.177]) by hub.freebsd.org (Postfix) with ESMTP id E33E437B407 for ; Wed, 27 Jun 2001 13:18:22 -0700 (PDT) (envelope-from sz@cdc.net) Received: by fubar.net-ninja.com (Postfix, from userid 100) id 81FA188C71; Wed, 27 Jun 2001 16:18:02 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by fubar.net-ninja.com (Postfix) with ESMTP id 68B2843AD8; Wed, 27 Jun 2001 16:18:02 -0400 (EDT) Date: Wed, 27 Jun 2001 16:18:02 -0400 (EDT) From: Eric Parker X-X-Sender: To: Marcelo Leal Cc: Greg Putrich , Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card In-Reply-To: <3B3A349E.FEAF1946@myway.com.br> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > i'm so sorry, but this list is the my last chance... :O) can freebsd > be a dhcp server??? in the handbook i found that the only option is > dhcp-client. i wanna set it for dhcp server. please help me... i > don't believe that freebsd don't make that!! thanks !!!! Try this: /usr/ports/net/isc-dhcp2 It is a bit difficult to find... ------ Eric Parker Network Engineer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 13:35:20 2001 Delivered-To: freebsd-net@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id A949C37B406 for ; Wed, 27 Jun 2001 13:35:18 -0700 (PDT) (envelope-from oberman@ptavv.es.net) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id f5RKYuc23024; Wed, 27 Jun 2001 13:34:56 -0700 (PDT) Message-Id: <200106272034.f5RKYuc23024@ptavv.es.net> To: Eric Parker Cc: Marcelo Leal , Greg Putrich , freebsd-net@FreeBSD.ORG Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card In-reply-to: Your message of "Wed, 27 Jun 2001 16:18:02 EDT." Date: Wed, 27 Jun 2001 13:34:56 -0700 From: "Kevin Oberman" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org If you are starting out with a new DHCP service, I'd really suggest looking at V3. It's now in release-candidate phase and is quite stable and very close. V3 has vastly improved capabilities and functionality that i significantly better than V2. I you have a V2 server that is doing the job for you, you should probably wait for a bit for the release. But, if you have a new installation, I'd think very seriously about starting out with V3. Take a look at the V3 web page: http://www.isc.org/products/DHCP/dhcp-v3.html R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 14:18:11 2001 Delivered-To: freebsd-net@freebsd.org Received: from fubar.net-ninja.com (cc260960-a.mdlvly1.tn.home.com [65.14.125.177]) by hub.freebsd.org (Postfix) with ESMTP id B9DEA37B409 for ; Wed, 27 Jun 2001 14:18:06 -0700 (PDT) (envelope-from sz@cdc.net) Received: by fubar.net-ninja.com (Postfix, from userid 100) id 4F69788C71; Wed, 27 Jun 2001 17:17:46 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by fubar.net-ninja.com (Postfix) with ESMTP id 36AF443AD8; Wed, 27 Jun 2001 17:17:46 -0400 (EDT) Date: Wed, 27 Jun 2001 17:17:46 -0400 (EDT) From: Eric Parker X-X-Sender: To: Greg Putrich Cc: Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card In-Reply-To: <20010627141528.A62758@skeezix.n0qds.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Eric Parker said: > > I tried that, no dice. It appears that the problem is that the > > interface card isn't initalized yet to accept the ancontrol commands. > > Hmmm... I put an ifconfig an0 up in the first line and that let > things go just fine. I call the script out of pccard.conf. > > Not sure why sleeping for 5 secs works... my card would pretty much ignore > ancontrol until I brought the if up. Think things may have changed > a little in 4.3. No, I just wasn't aware that you had to up the interface, I thought rc did that prior to running the config for it. As soon as I added the up command to the start up file, it worked as planned. Thanks! ------ Eric Parker Network Engineer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 14:24:30 2001 Delivered-To: freebsd-net@freebsd.org Received: from skeezix.n0qds.org (skeezix.n0qds.org [204.246.69.106]) by hub.freebsd.org (Postfix) with ESMTP id 6069B37B401 for ; Wed, 27 Jun 2001 14:24:27 -0700 (PDT) (envelope-from gregp@n0qds.org) Received: by skeezix.n0qds.org (Postfix, from userid 501) id 29946CA; Wed, 27 Jun 2001 16:24:26 -0500 (CDT) Date: Wed, 27 Jun 2001 16:24:25 -0500 From: Greg Putrich To: Eric Parker Cc: freebsd-net@freebsd.org Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card Message-ID: <20010627162425.A63666@skeezix.n0qds.org> References: <20010627141528.A62758@skeezix.n0qds.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from sz@cdc.net on Wed, Jun 27, 2001 at 05:17:46PM -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Eric Parker said: > No, I just wasn't aware that you had to up the interface, I > thought rc did that prior to running the config for it. As soon as I > added the up command to the start up file, it worked as planned. Thanks! Good! I've found the WLAN stuff _very_ addicting. Have it at work and at home. Can't imagine being without it anymore (my meetings are suddenly so much more productive). -- -------------------------------------------------------------------------- Greg Putrich - Internet: gregp@n0qds.org [sk] "I will not be pushed, filed, stamped, indexed, briefed, debriefed, or numbered. My life is my own." - No. 6 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 15:23:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from node7.cluster.srrc.usda.gov (symbion.srrc.usda.gov [199.133.86.40]) by hub.freebsd.org (Postfix) with ESMTP id 5AECA37B405; Wed, 27 Jun 2001 15:23:55 -0700 (PDT) (envelope-from gjohnson@srrc.ars.usda.gov) Received: (from glenn@localhost) by node7.cluster.srrc.usda.gov (8.11.4/8.11.4) id f5RMNgC10823; Wed, 27 Jun 2001 17:23:42 -0500 (CDT) (envelope-from glenn) Date: Wed, 27 Jun 2001 17:23:42 -0500 From: Glenn Johnson To: Mike Silbersack Cc: Jonathan Lemon , net@freebsd.org, kris@freebsd.org Subject: Re: select fails to return incoming connect on FreeBSD-4.3 Message-ID: <20010627172342.A10739@node7.cluster.srrc.usda.gov> References: <20010627145249.A10028@node7.cluster.srrc.usda.gov> <20010627145814.L86970-100000@achilles.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010627145814.L86970-100000@achilles.silby.com>; from silby@silby.com on Wed, Jun 27, 2001 at 03:00:31PM -0500 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jun 27, 2001 at 03:00:31PM -0500, Mike Silbersack wrote: > On Wed, 27 Jun 2001, Glenn Johnson wrote: > > > Has anyone had a chance to look at this and figure out what the fix > > might be? > > > > Thanks. > > It's a feature, not a bug. :) > > Since everyone's on vacation and we can't switch generation schemes > right now, I've e-mailed kris and asked if he objects to me adding a > sysctl which switches between the current and old generation schemes. > If he says it's ok, I'll commit it soon and those affected will be > able to use the old generation scheme. That would be great. What would be the negatives to using the old generation scheme? Thanks. -- Glenn Johnson USDA, ARS, SRRC Phone: (504) 286-4252 New Orleans, LA 70124 e-mail: gjohnson@srrc.ars.usda.gov To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 16:28:37 2001 Delivered-To: freebsd-net@freebsd.org Received: from silby.com (cb34181-a.mdsn1.wi.home.com [24.14.173.39]) by hub.freebsd.org (Postfix) with ESMTP id D298637B405 for ; Wed, 27 Jun 2001 16:28:33 -0700 (PDT) (envelope-from silby@silby.com) Received: (qmail 87971 invoked by uid 1000); 27 Jun 2001 23:28:32 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 27 Jun 2001 23:28:32 -0000 Date: Wed, 27 Jun 2001 18:28:32 -0500 (CDT) From: Mike Silbersack To: Glenn Johnson Cc: Jonathan Lemon , , Subject: Re: select fails to return incoming connect on FreeBSD-4.3 In-Reply-To: <20010627172342.A10739@node7.cluster.srrc.usda.gov> Message-ID: <20010627182247.B87959-100000@achilles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 27 Jun 2001, Glenn Johnson wrote: > On Wed, Jun 27, 2001 at 03:00:31PM -0500, Mike Silbersack wrote: > > > It's a feature, not a bug. :) > > > > Since everyone's on vacation and we can't switch generation schemes > > right now, I've e-mailed kris and asked if he objects to me adding a > > sysctl which switches between the current and old generation schemes. > > If he says it's ok, I'll commit it soon and those affected will be > > able to use the old generation scheme. > > That would be great. What would be the negatives to using the old > generation scheme? > > Thanks. > > -- > Glenn Johnson The old scheme is possibly vulnerable to spoofing attacks, and has been proven to be vulnerable to connection resetting attacks. See Tim Newsham's paper on this at guardent.com (I'm not sure of the exact url.) It's unlikely that you'd see people abusing those weaknesses, but the default has changed to make sure it can't happen. A scheme which provides proper operation of TIME_WAIT and a high level of attack resistance will be in place by the time 4.4 comes out; which scheme that is is still up for debate. :) Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 16:42:55 2001 Delivered-To: freebsd-net@freebsd.org Received: from coopcomp.com (coopcomp.com [161.58.219.43]) by hub.freebsd.org (Postfix) with ESMTP id 37DFF37B401 for ; Wed, 27 Jun 2001 16:42:51 -0700 (PDT) (envelope-from seichert@coopcomp.com) Received: from gourdy.coopcomp.com (gourdy.coopcomp.com [64.81.249.34]) by coopcomp.com (8.11.2) id f5RNgp442194; Wed, 27 Jun 2001 17:42:51 -0600 (MDT) Received: by gourdy.coopcomp.com (sSMTP sendmail emulation); Wed, 27 Jun 2001 16:42:45 -0700 Date: Wed, 27 Jun 2001 16:42:45 -0700 From: Stuart Eichert To: net@freebsd.org Subject: Re: Am I missing something? Message-ID: <20010627164245.B48973@gourdy.coopcomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jun 27, 2001 at 02:30:42PM -0500, Alfred Perlstein wrote: > Why not provide a patch that allows one to add callbacks to the list? > > for ether_output under the default case you would walk the list > looking for your type, since for the most part packets will be in > AF_INET and when no callbacks are registered the array will be > short, transmit should be cheap. For recieve if you look in > the default case you can see ng_ether_input_orphan_p being used to > input packets that don't match a known type. It was my feeling that a good idea might be to set aside a range of ETHERTYPEs for research/testing use. Put them after the normal ones, so that AF_INET and others will get checked for first (thus hopefully not harming performance for the normal case). The last case statement could be something that sees if the type is in the research range, and then if it is it could do some sort of lookup in a hash table/cache deal and then call the appropriate callback funcs. My goal for this project is to not only provide code for adding a network protocol to FreeBSD, but also document the process so that others can learn how to modify the network subsystem. In addition I would like to provide a framework for people to dynamically add and remove new protocols. If I was able to patch if_ethersubr (and probably a few others) to allow for these dynamically available protocols, what are the chances that the code would be committed and become part of FreeBSD 4.4 or 5.0? The reason I ask is that I would like to reduce the barriers to people using FreeBSD for this purpose. I would like to say to them "Hey install FreeBSD 4.4 with default settings, nothing special, download a few of these network protocol modules, load them, try the test apps" After they do that, hopefully they will read the documents about how to add protocols to FreeBSD, or at least use of the tools/libs I provide to add their own protocols. The intended market is researchers who may or may not currently use FreeBSD in their research. -- ------------ Stuart Eichert Cooperative Computers, Inc. seichert@coopcomp.com (650)938-0730 x 15 ----- End forwarded message ----- -- ------------ Stuart Eichert Cooperative Computers, Inc. seichert@coopcomp.com (650)938-0730 x 15 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 16:55:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from sneakerz.org (sneakerz.org [216.33.66.254]) by hub.freebsd.org (Postfix) with ESMTP id 3BDC837B401 for ; Wed, 27 Jun 2001 16:55:56 -0700 (PDT) (envelope-from bright@sneakerz.org) Received: by sneakerz.org (Postfix, from userid 1092) id 845205D020; Wed, 27 Jun 2001 18:55:45 -0500 (CDT) Date: Wed, 27 Jun 2001 18:55:45 -0500 From: Alfred Perlstein To: Stuart Eichert Cc: net@freebsd.org Subject: Re: Am I missing something? Message-ID: <20010627185545.J74703@sneakerz.org> References: <20010627111222.A9434@gourdy.coopcomp.com> <20010627143042.F74703@sneakerz.org> <20010627164107.A48973@gourdy.coopcomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010627164107.A48973@gourdy.coopcomp.com>; from seichert@coopcomp.com on Wed, Jun 27, 2001 at 04:41:07PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I hope you don't mind the -net carbon copy, but I wanted this preserved in the archives for others doing a search on the subject. * Stuart Eichert [010627 18:41] wrote: > On Wed, Jun 27, 2001 at 02:30:42PM -0500, Alfred Perlstein wrote: > > > Why not provide a patch that allows one to add callbacks to the list? > > > > for ether_output under the default case you would walk the list > > looking for your type, since for the most part packets will be in > > AF_INET and when no callbacks are registered the array will be > > short, transmit should be cheap. For recieve if you look in > > the default case you can see ng_ether_input_orphan_p being used to > > input packets that don't match a known type. > > It was my feeling that a good idea might be to set aside a > range of ETHERTYPEs for research/testing use. Put them after the normal ones, > so that AF_INET and others will get checked for first (thus hopefully not > harming performance for the normal case). The last case statement could be > something that sees if the type is in the research range, and then if it > is it could do some sort of lookup in a hash table/cache deal and then > call the appropriate callback funcs. > > My goal for this project is to not only provide code for adding a > network protocol to FreeBSD, but also document the process so that others > can learn how to modify the network subsystem. In addition I would like to > provide a framework for people to dynamically add and remove new protocols. > If I was able to patch if_ethersubr (and probably a few others) to allow for > these dynamically available protocols, what are the chances that the code > would be committed and become part of FreeBSD 4.4 or 5.0? The reason I ask > is that I would like to reduce the barriers to people using FreeBSD for this > purpose. I would like to say to them "Hey install FreeBSD 4.4 with default > settings, nothing special, download a few of these network protocol modules, > load them, try the test apps" After they do that, hopefully they will > read the documents about how to add protocols to FreeBSD, or at least use > of the tools/libs I provide to add their own protocols. The intended market > is researchers who may or may not currently use FreeBSD in their research. Actually if you use netgraph this is all already done. You can see the netgraph callbacks in bother ether_input and ether_output, just use those and you should be fine. I'm not terribly familiar with netgraph, however i've heard it's trivial to use a subset of the facilities, meaning using netgraph to provide your hooks should be simple and not require you to learn an aweful lot about netgraph versus just getting your stuff working. All you need to do is add your handler to the ng_ether_input_p and ng_ether_input_orphan_p callchains and you should be fine. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 17: 7:24 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 7BA5737B401 for ; Wed, 27 Jun 2001 17:07:20 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5S06xI01154; Wed, 27 Jun 2001 17:06:59 -0700 Date: Wed, 27 Jun 2001 17:06:59 -0700 From: Brooks Davis To: Alfred Perlstein Cc: Stuart Eichert , net@FreeBSD.ORG Subject: Re: Am I missing something? Message-ID: <20010627170659.B30006@Odin.AC.HMC.Edu> References: <20010627111222.A9434@gourdy.coopcomp.com> <20010627143042.F74703@sneakerz.org> <20010627164107.A48973@gourdy.coopcomp.com> <20010627185545.J74703@sneakerz.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010627185545.J74703@sneakerz.org>; from bright@sneakerz.org on Wed, Jun 27, 2001 at 06:55:45PM -0500 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2001 at 06:55:45PM -0500, Alfred Perlstein wrote: > Actually if you use netgraph this is all already done. You can > see the netgraph callbacks in bother ether_input and ether_output, > just use those and you should be fine. I'm not terribly familiar > with netgraph, however i've heard it's trivial to use a subset of > the facilities, meaning using netgraph to provide your hooks should > be simple and not require you to learn an aweful lot about netgraph > versus just getting your stuff working. >=20 > All you need to do is add your handler to the ng_ether_input_p > and ng_ether_input_orphan_p callchains and you should be fine. For adding a new protocol, you can currently use the orphan's interface if you don't need any other protocols. Work needs to be done to allow tapping of specific protocols via the ng_ether_input interface. I was thing about doing it, but the project I was going to do it for took a different direction. If you want to support adding new ethernet protocols, this is definatly the way to go. This is also more or less necessicary to build a fully netgraph implementation of IP or similar protocols[0]. -- Brooks [0] Before someone flames me ;-), I only suggest that it would be very useful for working on research protocols if we had all the important building blocks (ip, icmp, tcp, udp, etc) available as netgraph nodes to allow easy testing of intresting new systems. --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --bCsyhTFzCvuiizWE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OnUiXY6L6fI4GtQRApfUAJ0RNLspKLHAg6qI4fhK8cXavT374wCfawag XvKA2vXIr3HsE4Ln5a6tc70= =mZAq -----END PGP SIGNATURE----- --bCsyhTFzCvuiizWE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 17:14:13 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 40FCE37B401 for ; Wed, 27 Jun 2001 17:14:11 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5S0E1W01786; Wed, 27 Jun 2001 17:14:01 -0700 Date: Wed, 27 Jun 2001 17:14:01 -0700 From: Brooks Davis To: Hajimu UMEMOTO Cc: itojun@iijlab.net, net@FreeBSD.ORG Subject: Re: review request: network interface cloning Message-ID: <20010627171401.C30006@Odin.AC.HMC.Edu> References: <20010627112648.B12739@Odin.AC.HMC.Edu> <20010627182511.DCB857C2@starfruit.itojun.org> <20010627113803.C12739@Odin.AC.HMC.Edu> <20010628.041330.89015911.ume@mahoroba.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="zCKi3GIZzVBPywwA" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010628.041330.89015911.ume@mahoroba.org>; from ume@mahoroba.org on Thu, Jun 28, 2001 at 04:13:30AM +0900 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --zCKi3GIZzVBPywwA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 28, 2001 at 04:13:30AM +0900, Hajimu UMEMOTO wrote: > Just my thought. Isn't it sufficent without `#', like `ifconfig gif > create'? Yup, I got caught up thinking there needed to be a character there and that's not the case. I've updated the patch to use this syntax which should avoid any ugly corner cases the gif# syntax might have had. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --zCKi3GIZzVBPywwA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OnbIXY6L6fI4GtQRAtcfAJ4/zAXyKqPmZ6JpMtUPjPC+/8yktwCfcBKP kYjurNMt6LiIcswpxRuGISs= =9X/6 -----END PGP SIGNATURE----- --zCKi3GIZzVBPywwA-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 18:24:11 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id EFC0237B401 for ; Wed, 27 Jun 2001 18:24:05 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id TAA91577; Wed, 27 Jun 2001 19:46:07 -0700 (PDT) Date: Wed, 27 Jun 2001 19:46:05 -0700 (PDT) From: Julian Elischer To: Stuart Eichert Cc: net@freebsd.org Subject: Re: Am I missing something? In-Reply-To: <20010627111222.A9434@gourdy.coopcomp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org You can hook into an ethernet driver in an extensible manner using NETGRAPH. check the netgraph (4) man page and teh netgraph article in daemonnews from early lst year. also look at the ng_ether netgraph node julian On Wed, 27 Jun 2001, Stuart Eichert wrote: > In the past (under FreeBSD 3.0 and 3.3) I implemented a new networking > protocol, that ran over Ethernet(and nothing else for that matter). I > put a new ETHERTYPE into ethernet.h(0x0801 for the record). In addition > I modified the switch statements in if_ethersubr.c:ether_output and > if_ethersubr.c:ether_input to recognize this type and act accordingly. > In addition I modified sys/socket.h to add an additional address family > and protocol family for my protocol. From there I implemented the protocol > in a separate directory, made some changes in the conf directory and then > I was able to compile a new kernel with support for my protocol. > > This is cool and all (and yes I have updated it to work in 4.3), but I don't > like the idea that anyone who wants to try out this protocol and any associated > programs has to recompile an entire kernel. I would much prefer to create > a kernel module that someone can load, test, and then unload. I don't think > that I can do this however, because of the ethernet routines in if_ethersubr.c. > These routines do not allow for the dynamic addition of new ETHERTYPES. > I guess one could screw around with netgraph or tap(though I really know next > to nothing about them), but that would not allow me to plug the protocol > in below the socket layer. > > Is there no way to make a kernel module that will allow for the > dynamic addition of ethernet protocols or am I just missing something? > > -- > ------------ > Stuart Eichert > Cooperative Computers, Inc. > seichert@coopcomp.com > (650)938-0730 x 15 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 18:24:12 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 32F6337B405 for ; Wed, 27 Jun 2001 18:24:07 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id TAA91579; Wed, 27 Jun 2001 19:48:10 -0700 (PDT) Date: Wed, 27 Jun 2001 19:48:10 -0700 (PDT) From: Julian Elischer To: Stuart Eichert Cc: net@freebsd.org Subject: Re: Am I missing something? In-Reply-To: <20010627111222.A9434@gourdy.coopcomp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 27 Jun 2001, Stuart Eichert wrote: > In the past (under FreeBSD 3.0 and 3.3) I implemented a new networking > protocol, that ran over Ethernet(and nothing else for that matter). I > put a new ETHERTYPE into ethernet.h(0x0801 for the record). In addition > I modified the switch statements in if_ethersubr.c:ether_output and > if_ethersubr.c:ether_input to recognize this type and act accordingly. > In addition I modified sys/socket.h to add an additional address family > and protocol family for my protocol. From there I implemented the protocol > in a separate directory, made some changes in the conf directory and then > I was able to compile a new kernel with support for my protocol. > > This is cool and all (and yes I have updated it to work in 4.3), but I don't > like the idea that anyone who wants to try out this protocol and any associated > programs has to recompile an entire kernel. I would much prefer to create > a kernel module that someone can load, test, and then unload. I don't think > that I can do this however, because of the ethernet routines in if_ethersubr.c. > These routines do not allow for the dynamic addition of new ETHERTYPES. > I guess one could screw around with netgraph or tap(though I really know next > to nothing about them), but that would not allow me to plug the protocol > in below the socket layer. You can extensibly add a protocol to the socket layer from a module.. the ng_socjet node type does so.. (as an example) so you can prototype the entire protocol using ng_ether at the bottom and a socket at the top. similar to how ng_ether or divert sockets do it. > > Is there no way to make a kernel module that will allow for the > dynamic addition of ethernet protocols or am I just missing something? > > -- > ------------ > Stuart Eichert > Cooperative Computers, Inc. > seichert@coopcomp.com > (650)938-0730 x 15 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 18:44:20 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id AD39537B405 for ; Wed, 27 Jun 2001 18:44:17 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id UAA91668; Wed, 27 Jun 2001 20:11:58 -0700 (PDT) Date: Wed, 27 Jun 2001 20:11:57 -0700 (PDT) From: Julian Elischer To: Brooks Davis Cc: Alfred Perlstein , Stuart Eichert , net@FreeBSD.ORG, oppermann@monzoon.net Subject: Re: Am I missing something? In-Reply-To: <20010627170659.B30006@Odin.AC.HMC.Edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 27 Jun 2001, Brooks Davis wrote: > On Wed, Jun 27, 2001 at 06:55:45PM -0500, Alfred Perlstein wrote: > > Actually if you use netgraph this is all already done. You can > > see the netgraph callbacks in bother ether_input and ether_output, > > just use those and you should be fine. I'm not terribly familiar > > with netgraph, however i've heard it's trivial to use a subset of > > the facilities, meaning using netgraph to provide your hooks should > > be simple and not require you to learn an aweful lot about netgraph > > versus just getting your stuff working. > > > > All you need to do is add your handler to the ng_ether_input_p > > and ng_ether_input_orphan_p callchains and you should be fine. > > For adding a new protocol, you can currently use the orphan's interface > if you don't need any other protocols. Work needs to be done to allow > tapping of specific protocols via the ng_ether_input interface. I was > thing about doing it, but the project I was going to do it for took a > different direction. If you want to support adding new ethernet > protocols, this is definatly the way to go. This is also more or less > necessicary to build a fully netgraph implementation of IP or similar > protocols[0]. I have a netgraph node written (but not yet released by the company that asked me to write it) that when hooked to the 'orphans' hook of an ethernet node, can filter out arbitrary Ethertypes and send them to arbitrary hooks, so, by hooking this node to the ethernet node, you can arbitrarily process as many or as few additional ethertypes as you need to. in the meanwhile, before it is released, you can prototype by hooking directly to the orphans hoon of the ethernet node in netgraph. > > -- Brooks > > [0] Before someone flames me ;-), I only suggest that it would be very > useful for working on research protocols if we had all the important > building blocks (ip, icmp, tcp, udp, etc) available as netgraph nodes > to allow easy testing of intresting new systems. > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 19: 2:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 90B8F37B406 for ; Wed, 27 Jun 2001 19:02:49 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f5S22jQ14122; Wed, 27 Jun 2001 19:02:45 -0700 Date: Wed, 27 Jun 2001 19:02:45 -0700 From: Brooks Davis To: Julian Elischer Cc: Alfred Perlstein , Stuart Eichert , net@FreeBSD.ORG, oppermann@monzoon.net Subject: Re: Am I missing something? Message-ID: <20010627190245.B12609@Odin.AC.HMC.Edu> References: <20010627170659.B30006@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from julian@elischer.org on Wed, Jun 27, 2001 at 08:11:57PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2001 at 08:11:57PM -0700, Julian Elischer wrote: > I have a netgraph node written (but not yet released by the company that > asked me to write it) that when hooked to the 'orphans' hook of an > ethernet node, can filter out arbitrary Ethertypes and send them to > arbitrary hooks, so, by hooking this node to the ethernet node, > you can arbitrarily process as many or as few additional ethertypes as you > need to. This doesn't let you hook on the Ethertype of a protocol currently supported in ether_input without breaking all the others. Personaly, I'd like to be able to hook IP on one interface while allowing processing to proceed as normal on the others, but you can't do that with just an orphin's de-mux node if I'm reading the code correctly. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --MW5yreqqjyrRcusr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7OpBEXY6L6fI4GtQRAv8SAKDY7NivrKYDHPLiFhfkSCWzT1r/QgCgxeZv V+fZApI4odn1h4o9VpiJN2c= =tBIQ -----END PGP SIGNATURE----- --MW5yreqqjyrRcusr-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 20: 2:36 2001 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id AD7C037B401; Wed, 27 Jun 2001 20:02:33 -0700 (PDT) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f5S30VI10312; Wed, 27 Jun 2001 22:00:31 -0500 (CDT) (envelope-from jlemon) Date: Wed, 27 Jun 2001 22:00:31 -0500 From: Jonathan Lemon To: Mike Silbersack Cc: Glenn Johnson , Jonathan Lemon , net@freebsd.org, kris@freebsd.org Subject: Re: select fails to return incoming connect on FreeBSD-4.3 Message-ID: <20010627220031.B10008@prism.flugsvamp.com> References: <20010627145249.A10028@node7.cluster.srrc.usda.gov> <20010627145814.L86970-100000@achilles.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20010627145814.L86970-100000@achilles.silby.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jun 27, 2001 at 03:00:31PM -0500, Mike Silbersack wrote: > > On Wed, 27 Jun 2001, Glenn Johnson wrote: > > > Has anyone had a chance to look at this and figure out what the fix > > might be? > > > > Thanks. > > > > -- > > Glenn Johnson > > It's a feature, not a bug. :) > > Since everyone's on vacation and we can't switch generation schemes right > now, I've e-mailed kris and asked if he objects to me adding a sysctl > which switches between the current and old generation schemes. If he says > it's ok, I'll commit it soon and those affected will be able to use the > old generation scheme. I don't object; while the security provided by the new scheme is nice, breaking TIME_WAIT assassination is a serious bug in some environments, and there should be a way to work around it now. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 20: 9:14 2001 Delivered-To: freebsd-net@freebsd.org Received: from silby.com (cb34181-a.mdsn1.wi.home.com [24.14.173.39]) by hub.freebsd.org (Postfix) with ESMTP id 3E69F37B403 for ; Wed, 27 Jun 2001 20:09:12 -0700 (PDT) (envelope-from silby@silby.com) Received: (qmail 88391 invoked by uid 1000); 28 Jun 2001 03:09:11 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 28 Jun 2001 03:09:11 -0000 Date: Wed, 27 Jun 2001 22:09:11 -0500 (CDT) From: Mike Silbersack To: Jonathan Lemon Cc: Glenn Johnson , , Subject: Re: select fails to return incoming connect on FreeBSD-4.3 In-Reply-To: <20010627220031.B10008@prism.flugsvamp.com> Message-ID: <20010627220736.E88382-100000@achilles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 27 Jun 2001, Jonathan Lemon wrote: > I don't object; while the security provided by the new scheme is nice, > breaking TIME_WAIT assassination is a serious bug in some environments, > and there should be a way to work around it now. > -- > Jonathan Ok, I'll whip together a patch and send it to you for review sometime this weekend. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 21:27:13 2001 Delivered-To: freebsd-net@freebsd.org Received: from sneakerz.org (sneakerz.org [216.33.66.254]) by hub.freebsd.org (Postfix) with ESMTP id 0C33637B401 for ; Wed, 27 Jun 2001 21:27:11 -0700 (PDT) (envelope-from bright@sneakerz.org) Received: by sneakerz.org (Postfix, from userid 1092) id 768A85D010; Wed, 27 Jun 2001 23:27:00 -0500 (CDT) Date: Wed, 27 Jun 2001 23:27:00 -0500 From: Alfred Perlstein To: Brooks Davis Cc: Julian Elischer , Stuart Eichert , net@FreeBSD.ORG, oppermann@monzoon.net Subject: Re: Am I missing something? Message-ID: <20010627232700.K74703@sneakerz.org> References: <20010627170659.B30006@Odin.AC.HMC.Edu> <20010627190245.B12609@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010627190245.B12609@Odin.AC.HMC.Edu>; from brooks@one-eyed-alien.net on Wed, Jun 27, 2001 at 07:02:45PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * Brooks Davis [010627 21:02] wrote: > On Wed, Jun 27, 2001 at 08:11:57PM -0700, Julian Elischer wrote: > > I have a netgraph node written (but not yet released by the company that > > asked me to write it) that when hooked to the 'orphans' hook of an > > ethernet node, can filter out arbitrary Ethertypes and send them to > > arbitrary hooks, so, by hooking this node to the ethernet node, > > you can arbitrarily process as many or as few additional ethertypes as you > > need to. > > This doesn't let you hook on the Ethertype of a protocol currently > supported in ether_input without breaking all the others. Personaly, > I'd like to be able to hook IP on one interface while allowing > processing to proceed as normal on the others, but you can't do that > with just an orphin's de-mux node if I'm reading the code correctly. You're not reading it correctly. :( /* Handle ng_ether(4) processing, if any */ if (ng_ether_input_p != NULL) { (*ng_ether_input_p)(ifp, &m, eh); if (m == NULL) return; } since it passes &m, you can set "*mp = NULL" in your handler if you wish to take control of the packet, or leave it as is to allow the normal course of action. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 21:34:54 2001 Delivered-To: freebsd-net@freebsd.org Received: from softweyr.com (softweyr.com [208.247.99.111]) by hub.freebsd.org (Postfix) with ESMTP id B242C37B401; Wed, 27 Jun 2001 21:34:49 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from localhost.softweyr.com ([127.0.0.1] helo=softweyr.com ident=b83b0451914e861ceb0e64216a91711c) by softweyr.com with esmtp (Exim 3.16 #1) id 15FTaK-000099-00; Wed, 27 Jun 2001 22:39:20 -0600 Message-ID: <3B3AB4F8.184A2EFE@softweyr.com> Date: Wed, 27 Jun 2001 22:39:20 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Ruslan Ermilov Cc: Deepak Jain , net@FreeBSD.org, hackers@FreeBSD.org Subject: Re: fastforwarding? References: <20010626093545.D49992@sunbay.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Ruslan Ermilov wrote: > > On Mon, Jun 25, 2001 at 06:47:41PM -0400, Deepak Jain wrote: > > sysctl -A |grep forward > > net.inet.ip.forwarding: 1 > > net.inet.ip.fastforwarding: 0 > > machdep.forward_irq_enabled: 1 > > machdep.forward_signal_enabled: 1 > > machdep.forward_roundrobin_enabled: 1 > > > > What does the fastforwarding option do that the normal forwarding option > > doesn't? > > > See inet(4). The description there isn't very forthcoming. fastforwarding caches the results of a route lookup for destination addresses that are not on the local machine, and uses the cached route to short-circuit the normal (relatively slow) route lookup process. The packet flows directly from one layer2 input routine directly to the opposing layer2 output routine without traversing the IP layer. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Wed Jun 27 22:42:55 2001 Delivered-To: freebsd-net@freebsd.org Received: from femail19.sdc1.sfba.home.com (femail19.sdc1.sfba.home.com [24.0.95.128]) by hub.freebsd.org (Postfix) with ESMTP id 6C4F837B401 for ; Wed, 27 Jun 2001 22:42:53 -0700 (PDT) (envelope-from gwford@home.com) Received: from cc367864a ([24.178.125.151]) by femail19.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP id <20010628054247.YKFV5511.femail19.sdc1.sfba.home.com@cc367864a> for ; Wed, 27 Jun 2001 22:42:47 -0700 From: "Gary Ford" To: Subject: FS: 3Com 3C17700 SuperStack 3 Model 4900 Gigabit 12-Port Switch Date: Thu, 28 Jun 2001 00:39:29 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 1 (Highest) X-MSMail-Priority: High X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: High X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I have for sale a 3Com Gigabit Switch. For details on the switch see the following web page: http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase &sku=3C17700-US I also have 2 3Com 3C996-T PCI Server Cards for the Switch to a Cat5E LAN. For Details on the Cards see the following page: http://www.3com.com/products/en_US/detail.jsp?tab=features&pathtype=purchase &sku=3C996-T I am asking $5,000.00 US for the complete package. These are new products sent to me as Dealer Demo's, and I have no clients that need this size network. Please email any questions, and your best offered price. I can be reached at (219) 745-7147 EST during the day, and (219) 745-1149 EST at night. I look forward to all responses, and thank you. Gary Ford Fort Wayne, IN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 8: 3:28 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 0D36137B403 for ; Thu, 28 Jun 2001 08:03:26 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id JAA94144; Thu, 28 Jun 2001 09:22:06 -0700 (PDT) Date: Thu, 28 Jun 2001 09:22:05 -0700 (PDT) From: Julian Elischer To: Brooks Davis Cc: Alfred Perlstein , Stuart Eichert , net@FreeBSD.ORG, oppermann@monzoon.net Subject: Re: Am I missing something? In-Reply-To: <20010627190245.B12609@Odin.AC.HMC.Edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org As you haven't seen it you are rather bold in declaring that.. In fact you can do so. You hook into the interface hook for 'all ethertypes' and pass those you don't want back to the ethernet handling code. hopefully we can release it soon. On Wed, 27 Jun 2001, Brooks Davis wrote: > On Wed, Jun 27, 2001 at 08:11:57PM -0700, Julian Elischer wrote: > > I have a netgraph node written (but not yet released by the company that > > asked me to write it) that when hooked to the 'orphans' hook of an > > ethernet node, can filter out arbitrary Ethertypes and send them to > > arbitrary hooks, so, by hooking this node to the ethernet node, > > you can arbitrarily process as many or as few additional ethertypes as you > > need to. > > This doesn't let you hook on the Ethertype of a protocol currently > supported in ether_input without breaking all the others. Personaly, > I'd like to be able to hook IP on one interface while allowing > processing to proceed as normal on the others, but you can't do that > with just an orphin's de-mux node if I'm reading the code correctly. > > -- Brooks > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 10:48:41 2001 Delivered-To: freebsd-net@freebsd.org Received: from ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by hub.freebsd.org (Postfix) with ESMTP id 02E0A37B403 for ; Thu, 28 Jun 2001 10:48:39 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.11.3/8.11.3) id f5SHm1P83822; Thu, 28 Jun 2001 10:48:01 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200106281748.f5SHm1P83822@ambrisko.com> Subject: Re: Problem with Cisco Aironet 340 series 11mbs Wireless Card In-Reply-To: "from Eric Parker at Jun 27, 2001 05:17:46 pm" To: Eric Parker Date: Thu, 28 Jun 2001 10:48:00 -0700 (PDT) Cc: Greg Putrich , freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Eric Parker writes: | > Eric Parker said: | > > I tried that, no dice. It appears that the problem is that the | > > interface card isn't initalized yet to accept the ancontrol commands. | > | > Hmmm... I put an ifconfig an0 up in the first line and that let | > things go just fine. I call the script out of pccard.conf. | > | > Not sure why sleeping for 5 secs works... my card would pretty much ignore | > ancontrol until I brought the if up. Think things may have changed | > a little in 4.3. | | No, I just wasn't aware that you had to up the interface, I | thought rc did that prior to running the config for it. As soon as I | added the up command to the start up file, it worked as planned. Thanks! This has been fixed in later versions. Doug A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 11:52:39 2001 Delivered-To: freebsd-net@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id 8E9AE37B407 for ; Thu, 28 Jun 2001 11:52:37 -0700 (PDT) (envelope-from oberman@ptavv.es.net) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id f5SIqbc26795 for ; Thu, 28 Jun 2001 11:52:37 -0700 (PDT) Message-Id: <200106281852.f5SIqbc26795@ptavv.es.net> To: freebsd-net@freebsd.org Subject: Odd IPv6 behavior when not connected to IPv6 net Date: Thu, 28 Jun 2001 11:52:37 -0700 From: "Kevin Oberman" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I run IPv6 on my laptop and my office system. As long as I have an IPv6 path between the systems, everything is fine. But, if there is no IPv6 link, packets to ANY IPv6 address simply go to loopback! > traceroute6 pak traceroute6 to pak.es.net (2001:400:0:11:200:f8ff:fe22:955) from fe80::1, 30 hops max, 12 byte packets 1 fe80::1 2.075 ms 0.148 ms 0.091 ms This is normally just annoying, but when I use ssh, it automatically uses IPv6 if the remote system has a AAAA DNS entry and gets upset because the the remote system has the wrong host key. (And it's the wrong system.) The only way to make ssh work is to use the -4 option to force it to v4. Is this expected? Can it be fixed? Here is a bit more data. Laptop (Running FreeBSD 4.3-stable of June 24): > ifconfig wi0 wi0: flags=8843 mtu 1500 inet6 fe80::260:1dff:fef0:373f%wi0 prefixlen 64 scopeid 0x7 inet 192.74.215.117 netmask 0xffffffc0 broadcast 192.74.215.127 ether 00:60:1d:f0:37:3f Workstation (running Tru64 UNIX): > ifconfig tu0 tu0: flags=c63 rxmt 1000, reach time 30000, dad tries 1, mtu 1500, hops 64, token len 64 inet 198.xxx.xx.xx netmask ffffff00 broadcast 198.xxx.xx.x ipmtu 1500 inet6 fe80::200:f8ff:fe22:955 inet6 2001:400:0:11:200:f8ff:fe22:955 R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 12:13: 3 2001 Delivered-To: freebsd-net@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id 9CCE037B401 for ; Thu, 28 Jun 2001 12:12:57 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:vIHtCry3UfRFEAYS7tPGRTLOF7jafSoMHxHxuNdBrIKVbIsbAbRO+/DgffPUkf81@localhost [::1]) (authenticated as ume with CRAM-MD5) by peace.mahoroba.org (8.11.4/8.11.4/peace) with ESMTP/inet6 id f5SJClC91638; Fri, 29 Jun 2001 04:12:47 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Fri, 29 Jun 2001 04:12:42 +0900 (JST) Message-Id: <20010629.041242.55441386.ume@mahoroba.org> To: oberman@es.net Cc: freebsd-net@freebsd.org Subject: Re: Odd IPv6 behavior when not connected to IPv6 net From: Hajimu UMEMOTO In-Reply-To: <200106281852.f5SIqbc26795@ptavv.es.net> References: <200106281852.f5SIqbc26795@ptavv.es.net> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Thu, 28 Jun 2001 11:52:37 -0700 >>>>> "Kevin Oberman" said: oberman> I run IPv6 on my laptop and my office system. As long as I have an oberman> IPv6 path between the systems, everything is fine. But, if there is no oberman> IPv6 link, packets to ANY IPv6 address simply go to loopback! > traceroute6 pak oberman> traceroute6 to pak.es.net (2001:400:0:11:200:f8ff:fe22:955) from fe80::1, 30 hops max, 12 byte packets oberman> 1 fe80::1 2.075 ms 0.148 ms 0.091 ms oberman> This is normally just annoying, No! I just tried it on my 4.3-RELEASE box which is configured as IPv4/IPv6 dual stack but no IPv6 link. It end up with: # ping6 www.kame.net ping6: UDP connect: No route to host I suspect you have wrong IPv6 route installed. -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 12:19:15 2001 Delivered-To: freebsd-net@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id D993B37B401 for ; Thu, 28 Jun 2001 12:19:11 -0700 (PDT) (envelope-from oberman@ptavv.es.net) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id f5SJJ4c23535; Thu, 28 Jun 2001 12:19:04 -0700 (PDT) Message-Id: <200106281919.f5SJJ4c23535@ptavv.es.net> To: Hajimu UMEMOTO Cc: freebsd-net@FreeBSD.ORG Subject: Re: Odd IPv6 behavior when not connected to IPv6 net In-reply-to: Your message of "Fri, 29 Jun 2001 04:12:42 +0900." <20010629.041242.55441386.ume@mahoroba.org> Date: Thu, 28 Jun 2001 12:19:04 -0700 From: "Kevin Oberman" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Date: Fri, 29 Jun 2001 04:12:42 +0900 (JST) > From: Hajimu UMEMOTO > Sender: owner-freebsd-net@FreeBSD.ORG > > >>>>> On Thu, 28 Jun 2001 11:52:37 -0700 > >>>>> "Kevin Oberman" said: > > oberman> I run IPv6 on my laptop and my office system. As long as I have an > oberman> IPv6 path between the systems, everything is fine. But, if there is no > oberman> IPv6 link, packets to ANY IPv6 address simply go to loopback! > > traceroute6 pak > oberman> traceroute6 to pak.es.net (2001:400:0:11:200:f8ff:fe22:955) from fe80::1, 30 hops max, 12 byte packets > oberman> 1 fe80::1 2.075 ms 0.148 ms 0.091 ms > oberman> This is normally just annoying, > > No! I just tried it on my 4.3-RELEASE box which is configured as > IPv4/IPv6 dual stack but no IPv6 link. It end up with: > > # ping6 www.kame.net > ping6: UDP connect: No route to host > > I suspect you have wrong IPv6 route installed. I agree, but I have made no deliberate changes. I just install FreeBSD with ipv6_enable="YES" in rc.config. Internet6: Destination Gateway Flags Netif Expire :: localhost UGRSc lo0 => default fe80::1%lo0 Uc lo0 localhost localhost UH lo0 ::ffff:0.0.0.0 localhost UGRSc lo0 fe80:: localhost UGRSc lo0 fe80::%lo0 fe80::1%lo0 Uc lo0 fe80::%wi0 link#7 UC wi0 ff01:: localhost U lo0 ff02:: fe80::1%lo0 UCS lo0 ff02::%lo0 fe80::1%lo0 UC lo0 ff02::%wi0 link#7 UC wi0 R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 13:33:14 2001 Delivered-To: freebsd-net@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 14E3D37B406; Thu, 28 Jun 2001 13:33:08 -0700 (PDT) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id WAA02680; Thu, 28 Jun 2001 22:32:50 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Wes Peters Cc: Ruslan Ermilov , Deepak Jain , net@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: fastforwarding? References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> From: Dag-Erling Smorgrav Date: 28 Jun 2001 22:32:50 +0200 In-Reply-To: <3B3AB4F8.184A2EFE@softweyr.com> Message-ID: Lines: 14 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Wes Peters writes: > The description there isn't very forthcoming. fastforwarding caches > the results of a route lookup for destination addresses that are not > on the local machine, and uses the cached route to short-circuit the > normal (relatively slow) route lookup process. The packet flows > directly from one layer2 input routine directly to the opposing > layer2 output routine without traversing the IP layer. And more importantly, without traversing ipfw or ipfilter. In other words, don't use this on a firewall. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 14:13: 4 2001 Delivered-To: freebsd-net@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id 570D537B407 for ; Thu, 28 Jun 2001 14:12:59 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:AlsWqtQKr5v6N/GRzjHIz/8/iY2+ZXVCpghZhzCv9zdO+Piv0K5vh+Ss4yT12BMl@localhost [::1]) (authenticated as ume with CRAM-MD5) by peace.mahoroba.org (8.11.4/8.11.4/peace) with ESMTP/inet6 id f5SLCVC74459; Fri, 29 Jun 2001 06:12:31 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Fri, 29 Jun 2001 06:12:28 +0900 (JST) Message-Id: <20010629.061228.59498657.ume@mahoroba.org> To: oberman@es.net Cc: freebsd-net@FreeBSD.ORG Subject: Re: Odd IPv6 behavior when not connected to IPv6 net From: Hajimu UMEMOTO In-Reply-To: <200106281919.f5SJJ4c23535@ptavv.es.net> References: <20010629.041242.55441386.ume@mahoroba.org> <200106281919.f5SJJ4c23535@ptavv.es.net> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Thu, 28 Jun 2001 12:19:04 -0700 >>>>> "Kevin Oberman" said: oberman> I agree, but I have made no deliberate changes. I just install FreeBSD oberman> with ipv6_enable="YES" in rc.config. oberman> Internet6: oberman> Destination Gateway Flags Netif Expire oberman> :: localhost UGRSc lo0 => oberman> default fe80::1%lo0 Uc lo0 Why are you set ipv6_enable to YES while you are not using IPv6? :-) I just could reproduce your problem. When no RA is available, default route is wrongly installed by `ndp -I'. Please set ipv6_default_interface to NO in your rc.conf. Current its default setting is meaningless in most cases and it is harmful. I'll change default of ipv6_default_interface to NO. Thank you for reporting it. -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 17:48:47 2001 Delivered-To: freebsd-net@freebsd.org Received: from softweyr.com (softweyr.com [208.247.99.111]) by hub.freebsd.org (Postfix) with ESMTP id ADA0637B406; Thu, 28 Jun 2001 17:48:42 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from localhost.softweyr.com ([127.0.0.1] helo=softweyr.com ident=4d659b1d1b9d4945f14aaf3859ab2f6e) by softweyr.com with esmtp (Exim 3.16 #1) id 15FmX5-0000EY-00; Thu, 28 Jun 2001 18:53:15 -0600 Message-ID: <3B3BD17B.4DB9171B@softweyr.com> Date: Thu, 28 Jun 2001 18:53:15 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Dag-Erling Smorgrav Cc: Ruslan Ermilov , Deepak Jain , net@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: fastforwarding? References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Dag-Erling Smorgrav wrote: > > Wes Peters writes: > > The description there isn't very forthcoming. fastforwarding caches > > the results of a route lookup for destination addresses that are not > > on the local machine, and uses the cached route to short-circuit the > > normal (relatively slow) route lookup process. The packet flows > > directly from one layer2 input routine directly to the opposing > > layer2 output routine without traversing the IP layer. > > And more importantly, without traversing ipfw or ipfilter. In other > words, don't use this on a firewall. Excellent point, grashopper. Perhaps we should collect this verbiage into the man page? Or, heaven forbid, stuff it into a comment in the code somewhere? Nah, that would be blasphemy. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Thu Jun 28 19: 0:23 2001 Delivered-To: freebsd-net@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id DB1FF37B409 for ; Thu, 28 Jun 2001 19:00:19 -0700 (PDT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from localhost ([3ffe:501:100f:10c1:200:39ff:fe97:3f1e]) by shuttle.wide.toshiba.co.jp (8.9.1+3.1W/8.9.1) with ESMTP id LAA21015; Fri, 29 Jun 2001 11:01:30 +0900 (JST) Date: Fri, 29 Jun 2001 11:00:18 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: freebsd-net@FreeBSD.ORG Cc: oberman@es.net Subject: Re: Odd IPv6 behavior when not connected to IPv6 net In-Reply-To: <20010629.061228.59498657.ume@mahoroba.org> References: <20010629.041242.55441386.ume@mahoroba.org> <200106281919.f5SJJ4c23535@ptavv.es.net> <20010629.061228.59498657.ume@mahoroba.org> User-Agent: Wanderlust/2.6.0 (Twist And Shout-pre) Emacs/21.0 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 48 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Fri, 29 Jun 2001 06:12:28 +0900 (JST), >>>>> Hajimu UMEMOTO said: oberman> I agree, but I have made no deliberate changes. I just install FreeBSD oberman> with ipv6_enable="YES" in rc.config. oberman> Internet6: oberman> Destination Gateway Flags Netif Expire oberman> :: localhost UGRSc lo0 => oberman> default fe80::1%lo0 Uc lo0 > Why are you set ipv6_enable to YES while you are not using IPv6? :-) > I just could reproduce your problem. When no RA is available, default > route is wrongly installed by `ndp -I'. > Please set ipv6_default_interface to NO in your rc.conf. Current its > default setting is meaningless in most cases and it is harmful. I'll > change default of ipv6_default_interface to NO. Please let me explain the rationale. The notion of "ipv6_default_interface" is introduced mainly for conformance to the following part of RFC 2461: Next-hop determination for a given unicast destination operates as follows. The sender performs a longest prefix match against the Prefix List to determine whether the packet's destination is on- or off-link. If the destination is on-link, the next-hop address is the same as the packet's destination address. Otherwise, the sender selects a router from the Default Router List (following the rules described in Section 6.3.6). If the Default Router List is empty, <--- the sender assumes that the destination is on-link. <--- That is, if we do not have any default router (hear from RA), we should regard all IPv6 prefixes as on-link. To implement this trick, we use the "default interface", and install the default route as an interface direct route to the interface. However, as shown in this thread, this feature is basically meaningless, and even harmful, especially when using IPv4 as well. Thus, for the moment, I agree that we should turn the default interface off by default. For a longer term solution, we might have to consider a better source address selection algorithm, e.g. described in draft-ietf-ipngwg-default-addr-select-04.txt. Then IPv4 would be preferred in this case. JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 1:29: 3 2001 Delivered-To: freebsd-net@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 8C70437B403; Fri, 29 Jun 2001 01:28:48 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f5T8Rvx03044; Fri, 29 Jun 2001 11:27:57 +0300 (EEST) (envelope-from ru) Date: Fri, 29 Jun 2001 11:27:57 +0300 From: Ruslan Ermilov To: Dag-Erling Smorgrav Cc: Wes Peters , Deepak Jain , net@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: fastforwarding? Message-ID: <20010629112757.F91115@sunbay.com> Mail-Followup-To: Dag-Erling Smorgrav , Wes Peters , Deepak Jain , net@FreeBSD.ORG, hackers@FreeBSD.ORG References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from des@ofug.org on Thu, Jun 28, 2001 at 10:32:50PM +0200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Jun 28, 2001 at 10:32:50PM +0200, Dag-Erling Smorgrav wrote: > Wes Peters writes: > > The description there isn't very forthcoming. fastforwarding caches > > the results of a route lookup for destination addresses that are not > > on the local machine, and uses the cached route to short-circuit the > > normal (relatively slow) route lookup process. The packet flows > > directly from one layer2 input routine directly to the opposing > > layer2 output routine without traversing the IP layer. > > And more importantly, without traversing ipfw or ipfilter. In other > words, don't use this on a firewall. > Doesn't this match exactly what's documented in the inet(4) manpage? : IPCTL_FASTFORWARDING (ip.fastforwarding) Boolean: enable/disable the use : of fast IP forwarding code. Defaults to off. When : fast forwarding is enabled, IP packets are for- : warded directly to the appropriate network inter- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : face with a minimal validity checking, which : greatly improves the throughput. On the other : hand, they bypass the standard procedures, such as ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : IP option processing and ipfirewall(4) checking. ^^^^^^^^^^ : It is not guaranteed that every packet will be : fast-forwarded. BTW, Wes, I'm still waiting for a working example of an indirect route with also indirect gateway. All I can get myself here with such a route is: arplookup 5.6.7.8 failed: host is not on local network arpresolve: can't allocate llinfo for 5.6.7.8rt where 5.6.7.8 is that indirect gateway. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 4:59:26 2001 Delivered-To: freebsd-net@freebsd.org Received: from e028121.vtacs.vt.edu (e028121.vtacs.vt.edu [63.164.28.121]) by hub.freebsd.org (Postfix) with ESMTP id 2C31137B406 for ; Fri, 29 Jun 2001 04:59:24 -0700 (PDT) (envelope-from gaylord@e028121.vtacs.vt.edu) Received: by e028121.vtacs.vt.edu (Postfix, from userid 1000) id 6C3FB86DE; Fri, 29 Jun 2001 07:58:16 -0400 (EDT) Date: Fri, 29 Jun 2001 07:58:16 -0400 From: Clark Gaylord To: freebsd-net@freebsd.org Subject: Re: fastforwarding? Message-ID: <20010629075815.N55750@e028121.vtacs.vt.edu> References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B3AB4F8.184A2EFE@softweyr.com>; from wes@softweyr.com on Wed, Jun 27, 2001 at 10:39:20PM -0600 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Jun 27, 2001 at 10:39:20PM -0600, Wes Peters wrote: > Ruslan Ermilov wrote: > > On Mon, Jun 25, 2001 at 06:47:41PM -0400, Deepak Jain wrote: > > > ... > > > What does the fastforwarding option do that the normal forwarding option > > > doesn't? > > > > > See inet(4). > > The description there isn't very forthcoming. fastforwarding caches > the results of a route lookup for destination addresses that are not > on the local machine, and uses the cached route to short-circuit the > normal (relatively slow) route lookup process. The packet flows > directly from one layer2 input routine directly to the opposing > layer2 output routine without traversing the IP layer. I notice the man page points out that this prevents the use of ipfilter, etc. The first packet(s?) do get forwarded by the usual process (yes?), so does this imply that at least a "deny X" would still work (as the first packet would get denied and hence the cache does not get populated)? What are the limitations to ipfw and friends working right in conjunction with fastforwarding? Clark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 5: 9:48 2001 Delivered-To: freebsd-net@freebsd.org Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by hub.freebsd.org (Postfix) with ESMTP id 1C78E37B408 for ; Fri, 29 Jun 2001 05:09:46 -0700 (PDT) (envelope-from mike@sentex.net) Received: from chimp.simianscience.com (cage.simianscience.com [64.7.134.1]) by smtp1.sentex.ca (8.11.2/8.11.1) with SMTP id f5TC9dl17294; Fri, 29 Jun 2001 08:09:39 -0400 (EDT) (envelope-from mike@sentex.net) From: Mike Tancsa To: des@ofug.org (Dag-Erling Smorgrav) Cc: freebsd-net@freebsd.org Subject: Re: fastforwarding? Date: Fri, 29 Jun 2001 08:09:39 -0400 Message-ID: References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> In-Reply-To: X-Mailer: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 28 Jun 2001 16:33:33 -0400, in sentex.lists.freebsd.net you wrote: >Wes Peters writes: >> The description there isn't very forthcoming. fastforwarding caches >> the results of a route lookup for destination addresses that are not >> on the local machine, and uses the cached route to short-circuit the >> normal (relatively slow) route lookup process. The packet flows=20 >> directly from one layer2 input routine directly to the opposing=20 >> layer2 output routine without traversing the IP layer. > >And more importantly, without traversing ipfw or ipfilter. In other >words, don't use this on a firewall. Are there any other caveats ? I seem to recall from way back something about this (or maybe I am thinking of something else) being count sensitive. e.g. that over x amount of routes, its not worth it to enable. ---Mike Mike Tancsa (mdtancsa@sentex.net) =09 Sentex Communications Corp, =09 Waterloo, Ontario, Canada "Given enough time, 100 monkeys on 100 routers=20 could setup a national IP network." (KDW2) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 8:20:29 2001 Delivered-To: freebsd-net@freebsd.org Received: from mailman.thenap.com (mailman.thenap.com [209.190.0.10]) by hub.freebsd.org (Postfix) with ESMTP id 3CDBA37B408 for ; Fri, 29 Jun 2001 08:20:26 -0700 (PDT) (envelope-from drew.weaver@thenap.com) Received: by mailman.thenap.com with Internet Mail Service (5.5.2653.19) id ; Fri, 29 Jun 2001 11:36:37 -0400 Message-ID: From: "Drew J. Weaver" To: "'freebsd-net@freebsd.org'" Subject: odd error message in log Date: Fri, 29 Jun 2001 11:36:36 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C100B1.486C19E0" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C100B1.486C19E0 Content-Type: text/plain; charset="iso-8859-1" Jun 26 23:10:34 localhost /kernel: fxp0: device timeout Jun 27 01:11:19 localhost /kernel: fxp0: SCB timeout Jun 27 01:11:36 localhost last message repeated 3 times Jun 27 01:11:40 localhost /kernel: fxp0: device timeout Jun 27 01:49:31 localhost /kernel: fxp0: SCB timeout Jun 27 01:49:40 localhost last message repeated 2 times Jun 27 01:49:44 localhost /kernel: fxp0: device timeout Jun 27 02:00:36 localhost /kernel: fxp0: SCB timeout Jun 27 02:00:47 localhost last message repeated 9 times Any idea what this is? after awhile the machine completely stops responding to any network requests. -Drew ------_=_NextPart_001_01C100B1.486C19E0 Content-Type: text/html; charset="iso-8859-1" odd error message in log

Jun 26 23:10:34 localhost /kernel: fxp0: device timeout
Jun 27 01:11:19 localhost /kernel: fxp0: SCB timeout
Jun 27 01:11:36 localhost last message repeated 3 times
Jun 27 01:11:40 localhost /kernel: fxp0: device timeout
Jun 27 01:49:31 localhost /kernel: fxp0: SCB timeout
Jun 27 01:49:40 localhost last message repeated 2 times
Jun 27 01:49:44 localhost /kernel: fxp0: device timeout
Jun 27 02:00:36 localhost /kernel: fxp0: SCB timeout
Jun 27 02:00:47 localhost last message repeated 9 times

Any idea what this is? after awhile the machine completely stops responding to any network requests.

-Drew




------_=_NextPart_001_01C100B1.486C19E0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 9: 9:45 2001 Delivered-To: freebsd-net@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id 52D5337B405 for ; Fri, 29 Jun 2001 09:09:44 -0700 (PDT) (envelope-from oberman@ptavv.es.net) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id f5TG9Vc20089; Fri, 29 Jun 2001 09:09:32 -0700 (PDT) Message-Id: <200106291609.f5TG9Vc20089@ptavv.es.net> To: Hajimu UMEMOTO Cc: freebsd-net@FreeBSD.ORG Subject: Re: Odd IPv6 behavior when not connected to IPv6 net In-reply-to: Your message of "Fri, 29 Jun 2001 06:12:28 +0900." <20010629.061228.59498657.ume@mahoroba.org> Date: Fri, 29 Jun 2001 09:09:31 -0700 From: "Kevin Oberman" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thanks so much for your prompt attention. I have made the change to rc.conf and I now get an expected "connect: No route to host" message. I will not be connected to network running IPv6 until next week, but I will check normal IPv6 operation at that time. Thanks again! R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 9:18:47 2001 Delivered-To: freebsd-net@freebsd.org Received: from sneakerz.org (sneakerz.org [216.33.66.254]) by hub.freebsd.org (Postfix) with ESMTP id 9DAD637B403 for ; Fri, 29 Jun 2001 09:18:41 -0700 (PDT) (envelope-from bright@sneakerz.org) Received: by sneakerz.org (Postfix, from userid 1092) id 1A8425D010; Fri, 29 Jun 2001 11:18:31 -0500 (CDT) Date: Fri, 29 Jun 2001 11:18:31 -0500 From: Alfred Perlstein To: Clark Gaylord Cc: freebsd-net@freebsd.org Subject: Re: fastforwarding? Message-ID: <20010629111830.F78038@sneakerz.org> References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> <20010629075815.N55750@e028121.vtacs.vt.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010629075815.N55750@e028121.vtacs.vt.edu>; from cgaylord@vt.edu on Fri, Jun 29, 2001 at 07:58:16AM -0400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * Clark Gaylord [010629 06:59] wrote: > On Wed, Jun 27, 2001 at 10:39:20PM -0600, Wes Peters wrote: > > Ruslan Ermilov wrote: > > > On Mon, Jun 25, 2001 at 06:47:41PM -0400, Deepak Jain wrote: > > > > ... > > > > What does the fastforwarding option do that the normal forwarding option > > > > doesn't? > > > > > > > See inet(4). > > > > The description there isn't very forthcoming. fastforwarding caches > > the results of a route lookup for destination addresses that are not > > on the local machine, and uses the cached route to short-circuit the > > normal (relatively slow) route lookup process. The packet flows > > directly from one layer2 input routine directly to the opposing > > layer2 output routine without traversing the IP layer. > > I notice the man page points out that this prevents the use of > ipfilter, etc. The first packet(s?) do get forwarded by the usual > process (yes?), so does this imply that at least a "deny X" would > still work (as the first packet would get denied and hence the > cache does not get populated)? What are the limitations to ipfw > and friends working right in conjunction with fastforwarding? I really doubt that your assumptions are true. -- -Alfred Perlstein [alfred@freebsd.org] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 9:29:12 2001 Delivered-To: freebsd-net@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id C08D537B406 for ; Fri, 29 Jun 2001 09:28:58 -0700 (PDT) (envelope-from oberman@ptavv.es.net) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id f5TGSsc13240; Fri, 29 Jun 2001 09:28:54 -0700 (PDT) Message-Id: <200106291628.f5TGSsc13240@ptavv.es.net> To: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= Cc: freebsd-net@FreeBSD.ORG Subject: Re: Odd IPv6 behavior when not connected to IPv6 net In-reply-to: Your message of "Fri, 29 Jun 2001 11:00:18 +0900." Date: Fri, 29 Jun 2001 09:28:54 -0700 From: "Kevin Oberman" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Date: Fri, 29 Jun 2001 11:00:18 +0900 > From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= > Sender: owner-freebsd-net@FreeBSD.ORG > > >>>>> On Fri, 29 Jun 2001 06:12:28 +0900 (JST), > >>>>> Hajimu UMEMOTO said: > > oberman> I agree, but I have made no deliberate changes. I just install FreeBSD > oberman> with ipv6_enable="YES" in rc.config. > oberman> Internet6: > oberman> Destination Gateway Flags Netif Expire > oberman> :: localhost UGRSc lo0 => > oberman> default fe80::1%lo0 Uc lo0 > > > Why are you set ipv6_enable to YES while you are not using IPv6? :-) > > I just could reproduce your problem. When no RA is available, default > > route is wrongly installed by `ndp -I'. > > Please set ipv6_default_interface to NO in your rc.conf. Current its > > default setting is meaningless in most cases and it is harmful. I'll > > change default of ipv6_default_interface to NO. > > Please let me explain the rationale. The notion of > "ipv6_default_interface" is introduced mainly for conformance to the > following part of RFC 2461: > > Next-hop determination for a given unicast destination operates as > follows. The sender performs a longest prefix match against the > Prefix List to determine whether the packet's destination is on- or > off-link. If the destination is on-link, the next-hop address is the > same as the packet's destination address. Otherwise, the sender > selects a router from the Default Router List (following the rules > described in Section 6.3.6). If the Default Router List is empty, <--- > the sender assumes that the destination is on-link. <--- > > That is, if we do not have any default router (hear from RA), we > should regard all IPv6 prefixes as on-link. To implement this trick, > we use the "default interface", and install the default route as an > interface direct route to the interface. I think the basic idea in the RFC may be reasonable. It only breaks when the link selected is loopback. Had the stack tried to connect to a physical link, this would have worked as intended, but loopback will always be the wrong answer if it is the link used. > Thus, for the moment, I agree that we should turn the default > interface off by default. For a longer term solution, we might have > to consider a better source address selection algorithm, > e.g. described in draft-ietf-ipngwg-default-addr-select-04.txt. Then > IPv4 would be preferred in this case. This is certainly reasonable, too. But the step of not allowing the lo interface to qualify as the link for the default route seems like something that should be done as well. Of course, there may be some reason to want default to point at lo, but I can't think of a good one. R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 10:11:53 2001 Delivered-To: freebsd-net@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id AAB3C37B403 for ; Fri, 29 Jun 2001 10:11:49 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:ai4y5b/wRvrV18gT9ch8TC6ZpUFF1Yo2AX5+9uAASucbELWenDSXeCjGeS7MFm1f@localhost [::1]) (authenticated as ume with CRAM-MD5) by peace.mahoroba.org (8.11.4/8.11.4/peace) with ESMTP/inet6 id f5THBcC53588; Sat, 30 Jun 2001 02:11:38 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sat, 30 Jun 2001 02:11:38 +0900 (JST) Message-Id: <20010630.021138.39186484.ume@mahoroba.org> To: oberman@es.net Cc: jinmei@isl.rdc.toshiba.co.jp, freebsd-net@FreeBSD.ORG Subject: Re: Odd IPv6 behavior when not connected to IPv6 net From: Hajimu UMEMOTO In-Reply-To: <200106291628.f5TGSsc13240@ptavv.es.net> References: <200106291628.f5TGSsc13240@ptavv.es.net> X-Mailer: xcite1.38> Mew version 1.95b119 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-Operating-System: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Fri, 29 Jun 2001 09:28:54 -0700 >>>>> "Kevin Oberman" said: oberman> I think the basic idea in the RFC may be reasonable. It only breaks oberman> when the link selected is loopback. Had the stack tried to connect to oberman> a physical link, this would have worked as intended, but loopback will oberman> always be the wrong answer if it is the link used. I agree with the basic idea of this RFC. I tested it on my box. When default interface is set to actuall network interface, it takes a while to falldown to use IPv4. Is it reasonable for you? oberman> This is certainly reasonable, too. But the step of not allowing the lo oberman> interface to qualify as the link for the default route seems like oberman> something that should be done as well. oberman> Of course, there may be some reason to want default to point at lo, oberman> but I can't think of a good one. Selecting lo0 is a problem in rc.network6. Since you are using a laptop, there is no suitable network interface at boot. Then, rc.network6 choose lo0 wrongly as default interface. It may better to avoid choosing lo0 in rc.network6. I'll commit it. But, it is workaround after all. -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 10:27: 4 2001 Delivered-To: freebsd-net@freebsd.org Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id 268E037B403 for ; Fri, 29 Jun 2001 10:26:55 -0700 (PDT) (envelope-from matt-l@pacbell.net) Received: from fire (1Cust48.tnt1.pasadena.ca.da.uu.net [63.28.226.48]) by snipe.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with SMTP id KAA07508; Fri, 29 Jun 2001 10:26:44 -0700 (PDT) Message-ID: <004801c100bf$c35d9c10$6503c23f@XGforce.com> Reply-To: "matt" From: "matt" To: "Clark Gaylord" , References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> <20010629075815.N55750@e028121.vtacs.vt.edu> Subject: Re: fastforwarding? Date: Fri, 29 Jun 2001 10:19:33 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org So look like the fastforward is done at the either input/output? the so called layer 2? ====================================== WWW.XGFORCE.COM The Next Generation Load Balance and Fail Safe Server Clustering Software for the Internet. ====================================== ----- Original Message ----- From: Clark Gaylord To: Sent: Friday, June 29, 2001 4:58 AM Subject: Re: fastforwarding? > On Wed, Jun 27, 2001 at 10:39:20PM -0600, Wes Peters wrote: > > Ruslan Ermilov wrote: > > > On Mon, Jun 25, 2001 at 06:47:41PM -0400, Deepak Jain wrote: > > > > ... > > > > What does the fastforwarding option do that the normal forwarding option > > > > doesn't? > > > > > > > See inet(4). > > > > The description there isn't very forthcoming. fastforwarding caches > > the results of a route lookup for destination addresses that are not > > on the local machine, and uses the cached route to short-circuit the > > normal (relatively slow) route lookup process. The packet flows > > directly from one layer2 input routine directly to the opposing > > layer2 output routine without traversing the IP layer. > > I notice the man page points out that this prevents the use of > ipfilter, etc. The first packet(s?) do get forwarded by the usual > process (yes?), so does this imply that at least a "deny X" would > still work (as the first packet would get denied and hence the > cache does not get populated)? What are the limitations to ipfw > and friends working right in conjunction with fastforwarding? > > Clark > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 10:33:19 2001 Delivered-To: freebsd-net@freebsd.org Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id 276D837B403 for ; Fri, 29 Jun 2001 10:33:14 -0700 (PDT) (envelope-from matt-l@pacbell.net) Received: from fire (1Cust48.tnt1.pasadena.ca.da.uu.net [63.28.226.48]) by snipe.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with SMTP id KAA12356; Fri, 29 Jun 2001 10:32:53 -0700 (PDT) Message-ID: <00b201c100c0$9f796b20$6503c23f@XGforce.com> Reply-To: "matt" From: "matt" To: "Drew J. Weaver" , References: Subject: Re: odd error message in log Date: Fri, 29 Jun 2001 10:26:11 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00A5_01C10085.EB28E220" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_00A5_01C10085.EB28E220 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable odd error message in logCheck your network connections. The cable is off = the hook. =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 WWW.XGFORCE.COM=20 The Next Generation Load Balance and=20 Fail Safe Server Clustering Software for the Internet. =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 ----- Original Message -----=20 From: Drew J. Weaver=20 To: 'freebsd-net@freebsd.org'=20 Sent: Friday, June 29, 2001 8:36 AM Subject: odd error message in log Jun 26 23:10:34 localhost /kernel: fxp0: device timeout=20 Jun 27 01:11:19 localhost /kernel: fxp0: SCB timeout=20 Jun 27 01:11:36 localhost last message repeated 3 times=20 Jun 27 01:11:40 localhost /kernel: fxp0: device timeout=20 Jun 27 01:49:31 localhost /kernel: fxp0: SCB timeout=20 Jun 27 01:49:40 localhost last message repeated 2 times=20 Jun 27 01:49:44 localhost /kernel: fxp0: device timeout=20 Jun 27 02:00:36 localhost /kernel: fxp0: SCB timeout=20 Jun 27 02:00:47 localhost last message repeated 9 times=20 Any idea what this is? after awhile the machine completely stops = responding to any network requests.=20 -Drew=20 ------=_NextPart_000_00A5_01C10085.EB28E220 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable odd error message in log
Check your network connections. The cable is off the = hook.

=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
WWW.XGFORCE.COM
The Next = Generation Load=20 Balance and
Fail Safe Server Clustering Software
for the=20 Internet.
=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
----- Original Message -----
From:=20 Drew J.=20 Weaver
To: 'freebsd-net@freebsd.org'
Sent: Friday, June 29, 2001 = 8:36 AM
Subject: odd error message in = log

Jun 26 23:10:34 localhost /kernel: = fxp0: device=20 timeout
Jun 27 01:11:19 = localhost /kernel:=20 fxp0: SCB timeout
Jun 27 = 01:11:36 localhost=20 last message repeated 3 times
Jun 27=20 01:11:40 localhost /kernel: fxp0: device timeout
Jun 27 01:49:31 localhost /kernel: fxp0: SCB timeout =
Jun 27 01:49:40 localhost last message repeated = 2=20 times
Jun 27 01:49:44 localhost = /kernel:=20 fxp0: device timeout
Jun 27 = 02:00:36=20 localhost /kernel: fxp0: SCB timeout
Jun 27=20 02:00:47 localhost last message repeated 9 times

Any idea what this is? after awhile the = machine=20 completely stops responding to any network requests.

-Drew=20




------=_NextPart_000_00A5_01C10085.EB28E220-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 17:17:27 2001 Delivered-To: freebsd-net@freebsd.org Received: from aries.ai.net (aries.ai.net [205.134.163.4]) by hub.freebsd.org (Postfix) with ESMTP id 9F99137B403; Fri, 29 Jun 2001 17:17:20 -0700 (PDT) (envelope-from deepak@ai.net) Received: from blood (adsl-138-88-72-201.dc.adsl.bellatlantic.net [138.88.72.201]) by aries.ai.net (8.9.3/8.9.3) with SMTP id UAA28838; Fri, 29 Jun 2001 20:19:23 -0400 (EDT) (envelope-from deepak@ai.net) Reply-To: From: "Deepak Jain" To: "Wes Peters" , "Ruslan Ermilov" Cc: , Subject: RE: fastforwarding? Date: Fri, 29 Jun 2001 20:21:11 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: <3B3AB4F8.184A2EFE@softweyr.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thanks, this explanation is far more clear. It is much similar to fast switching on a Cisco or similar piece of gear. DJ -----Original Message----- From: owner-freebsd-hackers@FreeBSD.ORG [mailto:owner-freebsd-hackers@FreeBSD.ORG]On Behalf Of Wes Peters Sent: Thursday, June 28, 2001 12:39 AM To: Ruslan Ermilov Cc: Deepak Jain; net@FreeBSD.ORG; hackers@FreeBSD.ORG Subject: Re: fastforwarding? Ruslan Ermilov wrote: > > On Mon, Jun 25, 2001 at 06:47:41PM -0400, Deepak Jain wrote: > > sysctl -A |grep forward > > net.inet.ip.forwarding: 1 > > net.inet.ip.fastforwarding: 0 > > machdep.forward_irq_enabled: 1 > > machdep.forward_signal_enabled: 1 > > machdep.forward_roundrobin_enabled: 1 > > > > What does the fastforwarding option do that the normal forwarding option > > doesn't? > > > See inet(4). The description there isn't very forthcoming. fastforwarding caches the results of a route lookup for destination addresses that are not on the local machine, and uses the cached route to short-circuit the normal (relatively slow) route lookup process. The packet flows directly from one layer2 input routine directly to the opposing layer2 output routine without traversing the IP layer. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 19:12:37 2001 Delivered-To: freebsd-net@freebsd.org Received: from e028121.vtacs.vt.edu (e028121.vtacs.vt.edu [63.164.28.121]) by hub.freebsd.org (Postfix) with ESMTP id 9D83637B403 for ; Fri, 29 Jun 2001 19:12:33 -0700 (PDT) (envelope-from gaylord@e028121.vtacs.vt.edu) Received: by e028121.vtacs.vt.edu (Postfix, from userid 1000) id 888E186DE; Fri, 29 Jun 2001 22:11:21 -0400 (EDT) Date: Fri, 29 Jun 2001 22:11:21 -0400 From: Clark Gaylord To: freebsd-net@freebsd.org Subject: Re: fastforwarding? Message-ID: <20010629221121.A6512@e028121.vtacs.vt.edu> References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> <20010629075815.N55750@e028121.vtacs.vt.edu> <20010629111830.F78038@sneakerz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010629111830.F78038@sneakerz.org>; from bright@sneakerz.org on Fri, Jun 29, 2001 at 11:18:31AM -0500 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, Jun 29, 2001 at 11:18:31AM -0500, Alfred Perlstein wrote: > * Clark Gaylord [010629 06:59] wrote: > > I notice the man page points out that this prevents the use of > > ipfilter, etc. The first packet(s?) do get forwarded by the usual > > process (yes?), so does this imply that at least a "deny X" would > > still work (as the first packet would get denied and hence the > > cache does not get populated)? What are the limitations to ipfw > > and friends working right in conjunction with fastforwarding? > > I really doubt that your assumptions are true. That's why I pose it as a question... Clark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Fri Jun 29 23:14: 2 2001 Delivered-To: freebsd-net@freebsd.org Received: from softweyr.com (softweyr.com [208.247.99.111]) by hub.freebsd.org (Postfix) with ESMTP id 2391737B40C for ; Fri, 29 Jun 2001 23:13:56 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from localhost.softweyr.com ([127.0.0.1] helo=softweyr.com ident=64f2a79c24b765b5006e22f1a9dedc71) by softweyr.com with esmtp (Exim 3.16 #1) id 15GE5V-0000ME-00; Sat, 30 Jun 2001 00:18:37 -0600 Message-ID: <3B3D6F3D.25B376E3@softweyr.com> Date: Sat, 30 Jun 2001 00:18:37 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Clark Gaylord Cc: freebsd-net@freebsd.org Subject: Re: fastforwarding? References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> <20010629075815.N55750@e028121.vtacs.vt.edu> <20010629111830.F78038@sneakerz.org> <20010629221121.A6512@e028121.vtacs.vt.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Clark Gaylord wrote: > > On Fri, Jun 29, 2001 at 11:18:31AM -0500, Alfred Perlstein wrote: > > * Clark Gaylord [010629 06:59] wrote: > > > I notice the man page points out that this prevents the use of > > > ipfilter, etc. The first packet(s?) do get forwarded by the usual > > > process (yes?), so does this imply that at least a "deny X" would > > > still work (as the first packet would get denied and hence the > > > cache does not get populated)? What are the limitations to ipfw > > > and friends working right in conjunction with fastforwarding? > > > > I really doubt that your assumptions are true. > > That's why I pose it as a question... No, it's a good question. I'd want to try it first; it would depend on whether it's dropped by an ingress filter or an egress filter. I'm not that familiar with ipfw, but I guess I should be. Is there a command on FreeBSD to dump the contents of the fastforwarding route cache? If not, this would be a good "junior kernel hacker" task as well. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sat Jun 30 0:29:11 2001 Delivered-To: freebsd-net@freebsd.org Received: from a.mx.everquick.net (a.mx.everquick.net [216.89.137.3]) by hub.freebsd.org (Postfix) with ESMTP id 8039837B403 for ; Sat, 30 Jun 2001 00:29:08 -0700 (PDT) (envelope-from eddy+public+spam@noc.everquick.net) Received: from localhost (eddy@localhost) by a.mx.everquick.net (8.10.2/8.10.2) with ESMTP id f5U7Sw220638; Sat, 30 Jun 2001 07:28:59 GMT X-EverQuick-No-Abuse: Report any e-mail abuse to Date: Sat, 30 Jun 2001 07:28:58 +0000 (GMT) From: "E.B. Dreger" To: Wes Peters Cc: Clark Gaylord , freebsd-net@FreeBSD.ORG Subject: Re: fastforwarding? In-Reply-To: <3B3D6F3D.25B376E3@softweyr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Date: Sat, 30 Jun 2001 00:18:37 -0600 > From: Wes Peters > Is there a command on FreeBSD to dump the contents of the fastforwarding Not of which I'm aware, but I don't know. > route cache? If not, this would be a good "junior kernel hacker" task > as well. Looking at arp(8) code, it would seem that one would write a userspace program to pull info from the kernel via a sysctl. I don't see any existing MIB for fastforward... I guess that would be the "junior kernel hacker" part. Eddy --------------------------------------------------------------------------- Brotsman & Dreger, Inc. EverQuick Internet Division Phone: +1 (316) 794-8922 Wichita/(Inter)national Phone: +1 (785) 865-5885 Lawrence --------------------------------------------------------------------------- Date: Mon, 21 May 2001 11:23:58 +0000 (GMT) From: A Trap To: blacklist@brics.com Subject: Please ignore this portion of my mail signature. These last few lines are a trap for address-harvesting spambots. Do NOT send mail to , or you are likely to be blocked. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sat Jun 30 13:19:53 2001 Delivered-To: freebsd-net@freebsd.org Received: from femail4.sdc1.sfba.home.com (femail4.sdc1.sfba.home.com [24.0.95.84]) by hub.freebsd.org (Postfix) with ESMTP id F1B1037B401 for ; Sat, 30 Jun 2001 13:19:50 -0700 (PDT) (envelope-from chris@potamus.org) Received: from chris ([24.250.134.165]) by femail4.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP id <20010630201950.IILH24307.femail4.sdc1.sfba.home.com@chris> for ; Sat, 30 Jun 2001 13:19:50 -0700 Message-ID: <001101c101a2$237897c0$a586fa18@chris> From: "Chris Peterson" To: Subject: FreeBSD vulnerable to "TCP Daytona" clients? Date: Sat, 30 Jun 2001 13:20:43 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org http://www.cs.washington.edu/homes/savage/papers/CCR99.pdf The above research paper ("TCP Congestion Control with a Misbehaving Receiver") describes some apparent bugs in the description of TCP congestion control in RFC 2581. The authors' rogue Linux client exploits these bugs to effectively bypass TCP congestion control, sucking up all available bandwidth. They successfully convince the sending servers to send all (but the first few segments) in a single burst of data. Their first exploit is ACK Division. During slow start, the rogue receiver ACKs each byte of the received packet individually, causing the sender to grow its congestion window much faster than usual. Their second exploit is Duplicate ACK Spoofing. The rogue receiver sends a long stream of duplicate ACKs for the last sequence number received. This causes the sender to enter the fast recovery mode and sends new packets at a rate proportional to the rate the receiver is sending duplicate ACKs. Their third exploit is Optimistic ACKing. The rogue receiver sends ACKs for packets that it has not yet received. This confuses the sender's round-trip time calculations, causing it to send packets very rapidly. The paper says that FreeBSD 3 is vulnerable to all three exploits. Is this still the case for FreeBSD 4 and 5? Or are these "attacks" purely academic? For comparison, the paper says that Linux 2.0 and Windows NT 4 are immune to Duplicate ACK Spoofing and Linux 2.2 is immune to ACK Division. chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message From owner-freebsd-net Sat Jun 30 15:35: 2 2001 Delivered-To: freebsd-net@freebsd.org Received: from softweyr.com (softweyr.com [208.247.99.111]) by hub.freebsd.org (Postfix) with ESMTP id 14B1C37B405 for ; Sat, 30 Jun 2001 15:34:59 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from localhost.softweyr.com ([127.0.0.1] helo=softweyr.com ident=dc38f37cfeafdd03396b72b312af6b95) by softweyr.com with esmtp (Exim 3.16 #1) id 15GTOq-0000Ey-00; Sat, 30 Jun 2001 16:39:36 -0600 Message-ID: <3B3E5528.82B33EFF@softweyr.com> Date: Sat, 30 Jun 2001 16:39:36 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: matt Cc: Clark Gaylord , freebsd-net@freebsd.org Subject: Re: fastforwarding? References: <20010626093545.D49992@sunbay.com> <3B3AB4F8.184A2EFE@softweyr.com> <20010629075815.N55750@e028121.vtacs.vt.edu> <004801c100bf$c35d9c10$6503c23f@XGforce.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org matt wrote: > > So look like the fastforward is done at the either > input/output? the so called layer 2? Not the "so called" layer 2, at ISO layer 2. Yes, that's the ethernet layer if both of the interfaces are ethernet. If not, then it is the Token Ring layer, or the FDDI layer, or the ATM layer, etc. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message