From owner-freebsd-current Sun May 2 23:46:32 1999 Delivered-To: freebsd-current@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id 39A7214CCA for ; Sun, 2 May 1999 23:46:24 -0700 (PDT) (envelope-from bright@rush.net) Received: from localhost (bright@localhost) by cygnus.rush.net (8.9.3/8.9.3) with SMTP id CAA24080; Mon, 3 May 1999 02:06:18 -0500 (EST) Date: Mon, 3 May 1999 02:06:16 -0500 (EST) From: Alfred Perlstein To: current@freebsd.org Cc: luigi@iet.unipi.it Subject: bridge+dummynet + "sysctl -a" panics in -current Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG a box with de and xl interfaces plus BRIDGE and DUMMYNET compiled in, doing a "sysctl -a" will panic the box. (currproc == sysctl) i have both bridging and ipfw enabled on the bridged packets, my de0 card has no ip and my xl0 card does. if you aren't easily able to reproduce it, i'll try harder, i've just been quite busy. This is on -current as of a few days ago, and is still a problem on -current today 5/2/99 Also, could someone consider this patch to the rc system to enable bridging in network_pass1() ? Index: rc.network =================================================================== RCS file: /home/ncvs/src/etc/rc.network,v retrieving revision 1.44 diff -u -r1.44 rc.network --- rc.network 1999/04/12 15:26:41 1.44 +++ rc.network 1999/05/03 10:41:06 @@ -50,6 +50,18 @@ fi done + # Enable bridging. + if [ "x$bridge_enable" = "xYES" ]; then + sysctl -w net.link.ether.bridge=1 >/dev/null 2>&1 + echo -n "Bridging started" + # IPFW the bridged packets. + if [ "x$bridge_enable_ipfw" = "xYES" ]; then + sysctl -w net.link.ether.bridge_ipfw=1 >/dev/null 2>&1 + echo -n ", filtering with ipfw enabled" + fi + echo "." + fi + # Set up all the network interfaces, calling startup scripts if needed for ifn in ${network_interfaces}; do if [ -e /etc/start_if.${ifn} ]; then Index: defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.8 diff -u -r1.8 rc.conf --- rc.conf 1999/04/10 10:56:56 1.8 +++ rc.conf 1999/05/03 10:42:11 @@ -35,6 +35,8 @@ firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall firewall_type="UNKNOWN" # Firewall type (see /etc/rc.firewall) firewall_quiet="NO" # Set to YES to suppress rule display +bridge_enable="NO" # Enable bridging, "YES" == enabled +bridge_enable_ipfw="NO" # Filter bridged packets, "YES" == enabled natd_program="/sbin/natd" # path to natd, if you want a different one. natd_enable="NO" # Enable natd (if firewall_enable == YES). natd_interface="fxp0" # Public interface or IPaddress to use. thanks, -Alfred kernel config file: machine "i386" cpu "I486_CPU" cpu "I586_CPU" cpu "I686_CPU" ident "router" maxusers 128 options INCLUDE_CONFIG_FILE # Include this file in kernel #CPU/Machine Options options "NO_F00F_HACK" options "AUTO_EOI_1" options "AUTO_EOI_2" options VESA options "VM86" options USER_LDT #allow user-level control of i386 ldt options KTRACE #kernel tracing options PERFMON options DDB options P1003_1B options _KPOSIX_PRIORITY_SCHEDULING options _KPOSIX_VERSION=199309L #File systems options FDESC #File descriptor filesystem options KERNFS #Kernel filesystem options UMAPFS #UID map filesystem options NULLFS #NULL filesystem options MFS #Memory File System options INET #InterNETworking options FFS #Berkeley Fast Filesystem options SOFTUPDATES options NFS #Network Filesystem options MSDOSFS #MSDOS Filesystem options "CD9660" #ISO 9660 Filesystem options FFS_ROOT #FFS usable as root device [keep this!] options PROCFS #Process filesystem options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=6000 #Be pessimistic about Joe SCSI device options UCONSOLE #Allow users to grab the console #options FAILSAFE #Be conservative options USERCONFIG #boot -c editor options VISUAL_USERCONFIG #visual boot -c editor options KTRACE #kernel tracing options SYSVSHM options SYSVSEM options SYSVMSG options MAXDSIZ=(256*1024*1024) options DFLDSIZ=(256*1024*1024) options IPFIREWALL #firewall options IPFIREWALL_VERBOSE #print information about options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default options "ICMP_BANDLIM" options DUMMYNET options BRIDGE config kernel root on wd0 #Devices controller isa0 controller eisa0 controller pci0 controller fdc0 at isa? port "IO_FD1" irq 6 drq 2 disk fd0 at fdc0 drive 0 disk fd1 at fdc0 drive 1 #tape ft0 at fdc0 drive 2 #IDE controller ata0 device atadisk0 # ATA disk drives device atapicd0 # ATAPI CDROM drives device atapifd0 # ATAPI floppy drives device atapist0 # ATAPI tape drives #options "CMD640" # work around CMD640 chip deficiency #controller wdc0 at isa? port "IO_WD1" irq 14 flags 0xe0ffe0ff #disk wd0 at wdc0 drive 0 #disk wd1 at wdc0 drive 1 #controller wdc1 at isa? port "IO_WD2" irq 15 flags 0xe0ffe0ff #disk wd2 at wdc1 drive 0 #disk wd3 at wdc1 drive 1 #options ATAPI #Enable ATAPI support for IDE bus #options ATAPI_STATIC #Don't do it as an LKM #device acd0 #IDE CD-ROM #SCSI controller scbus0 controller ahc0 device da0 device sa0 #SCSI tapes device cd0 #SCSI CD-ROMs device od0 #See LINT for possible `od' options. device pass0 #Sound/PnP controller pnp0 device pcm0 at isa? port 0x220 irq 10 drq 3 flags 0x15 #Parrallel Port controller ppbus0 controller vpo0 at ppbus? device nlpt0 at ppbus? device ppi0 at ppbus? controller ppc0 at isa? port ? irq 7 # syscons is the default console driver, resembling an SCO console device sc0 at isa? options SC_HISTORY_SIZE=200 # number of history buffer lines options SC_DISABLE_REBOOT # disable reboot key sequence # The keyboard controller; it controlls the keyboard and the PS/2 mouse. controller atkbdc0 at isa? port IO_KBD # The AT keyboard device atkbd0 at atkbdc? irq 1 # PS/2 mouse device psm0 at atkbdc? irq 12 # The video card driver. device vga0 at isa? port ? conflicts # Splash screen at start up! Screen savers require this too. pseudo-device splash device npx0 at nexus? port "IO_NPX" irq 13 # Laptop support (see LINT for more options) device apm0 at nexus? disable flags 0x31 # Advanced Power Management device sio0 at isa? port "IO_COM1" irq 4 device sio1 at isa? port "IO_COM2" irq 3 device sio2 at isa? port "IO_COM3" irq 5 device sio3 at isa? port "IO_COM4" irq 9 # USB support # UHCI controller #controller uhci0 # OHCI controller #controller ohci0 # General USB code (mandatory for USB) #controller usb0 # # for the moment we have to specify the priorities of the device # drivers explicitly by the ordering in the list below. This will # be changed in the future. # # USB mouse #device ums0 # USB keyboard #device ukbd0 # USB printer #device ulpt0 # USB hub (kind of mandatory, no other driver is available for the root hub) #device uhub0 # USB communications driver #device ucom0 ## USB modem driver #device umodem0 # Human Interface Device (anything with buttons and dials) #device hid0 # Generic USB device driver #device ugen0 controller smbus0 device smb0 at smbus? controller iicbus0 controller iicbb0 device ic0 at iicbus? device iic0 at iicbus? device iicsmb0 at iicbus? device bktr0 # Order is important here due to intrusive probes, do *not* alphabetize # this list of network interfaces until the probes have been fixed. # Right now it appears that the ie0 must be probed before ep0. See # revision 1.20 of this file. device fxp0 device xl0 device de0 # DEC/Intel DC21x4x (``Tulip'') device ed0 at pci? #device ed0 at isa? port 0x320 net irq 5 iomem 0xd8000 pseudo-device vn 4 pseudo-device loop pseudo-device ether pseudo-device sl 2 pseudo-device ppp 2 pseudo-device tun 2 pseudo-device pty 256 pseudo-device bpfilter 4 pseudo-device snp 4 pseudo-device gzip # Exec gzipped a.out's To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message