Subject: hang with ipf and 1.3.3
To: None <port-sparc@netbsd.org>
From: nm <nmanisca@vt.edu>
List: port-sparc
Date: 04/20/1999 19:20:01
First off, I apologize for the very large message.

I have an IPX running 1.3.3 and it appears that the machine
is crashing when I fool with ipf.

Ok, here is a console log of what happens.  It seems that
the first time ipf -E -Fa -f /etc/ipf.conf is run all is well
but if I ipf -D and then try to re enable it, ipf just
hangs there and doesnt respond.  The machine is then unresponsive
to all network activitity and I have to CTRL-BREAK to get back
to a prompt.

What other information do I need to provide to assist in the
diagnosis of such a problem?  After the console log I included
a copy of my ipf.conf and a copy of my kernel configuration.

As a side note, I have le0 which is my built in ethernet
adapter and I also have le1 which is an SBUS card I added.

Thank you for your time.

Nick Maniscalco
nmanisca@vt.edu

[---Beginning of console log---]

SPARCstation IPX, No Keyboard
ROM Rev. 2.6, 40 MB memory installed, Serial #2127095.
Ethernet address 8:0:20:b:fe:fb, Host ID: 572074f7.


Rebooting with command:
Boot device: /sbus/esp@0,800000/sd@1,0   File and args:
>> NetBSD/sparc Secondary Boot, Revision 1.7
>> (pk@flambard, Sun Dec 13 14:22:26 MET 1998)
Booting netbsd @ 0x4000
1441792+117696+83640+[80508+94065]=0x1bfc6d
console is ttya
Copyright (c) 1996, 1997, 1998
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.3.3 (GRUNT) #0: Mon Feb  1 16:35:08 EST 1999
    fb@grunt:/usr/src/sys/arch/sparc/compile/GRUNT
real mem = 41840640
avail mem = 38789120
using 128 buffers containing 524288 bytes of memory
bootpath: /sbus@1,f8000000/esp@0,800000/sd@1,0
mainbus0 (root): SUNW,Sun 4/50
cpu0 at mainbus0: cache chip bug; trap page uncached: W8601/8701 or MB86903
@ 40
 MHz, on-chip FPU
cpu0: 64K byte write-through, 32 bytes/line, hw flush: cache enabled
memreg0 at mainbus0 ioaddr 0xf4000000
clock0 at mainbus0 ioaddr 0xf2000000: mk48t02 (eeprom)
timer0 at mainbus0 ioaddr 0xf3000000 delay constant 17
auxreg0 at mainbus0 ioaddr 0xf7400003
zs0 at mainbus0 ioaddr 0xf1000000 pri 12, softpri 6
zstty0 at zs0 channel 0 (console)
zstty1 at zs0 channel 1
zs1 at mainbus0 ioaddr 0xf0000000 pri 12, softpri 6
kbd0 at zs1 channel 0
ms0 at zs1 channel 1
audioamd0 at mainbus0 ioaddr 0xf7201000 pri 13, softpri 4
audio0 at audioamd0
sbus0 at mainbus0 ioaddr 0xf8000000: clock = 20 MHz
dma0 at sbus0 slot 0 offset 0x400000: rev 1+
esp0 at sbus0 slot 0 offset 0x800000 pri 3: ESP100A, 25MHz, SCSI ID 7
scsibus0 at esp0: 8 targets
probe(esp0:1:0): max sync rate 5.00Mb/s
sd0 at scsibus0 targ 1 lun 0: <SEAGATE, ST11200N SUN1.05, 8358> SCSI2
0/direct f
ixed
sd0: 1005MB, 1872 cyl, 15 head, 73 sec, 512 bytes/sect x 2059140 sectors
probe(esp0:6:0): max sync rate 5.00Mb/s
sd1 at scsibus0 targ 6 lun 0: <SEAGATE, ST3390N, 9546> SCSI2 0/direct fixed
sd1: 328MB, 2679 cyl, 3 head, 83 sec, 512 bytes/sect x 672482 sectors
le0 at sbus0 slot 0 offset 0xc00000 pri 5: address 08:00:20:0b:fe:fb
le0: 8 receive buffers, 2 transmit buffers
le1 at sbus0 slot 1 offset 0xc00000 pri 5: address 08:00:20:0b:fe:fb
le1: 8 receive buffers, 2 transmit buffers
cgsix0 at sbus0 slot 3 offset 0x0: SUNW,501-1672, 1152 x 900, rev 8
cgsix0: attached to /dev/fb
fdc0 at mainbus0 ioaddr 0xf7200000 pri 11, softpri 4: chip 82072
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
root on sd0a dumps on sd0b
root file system type: ffs
swapctl: adding /dev/sd0b as swap device at priority 0
Automatic boot in progress: starting file system checks.
/dev/rsd0a: 935 files, 13894 used, 49961 free (73 frags, 6236 blocks, 0.1%
fragm
entation)
/dev/rsd0a: MARKING FILE SYSTEM CLEAN
/dev/rsd0d: 30322 files, 319281 used, 548525 free (3141 frags, 68173
blocks, 0.4
% fragmentation)
/dev/rsd0d: MARKING FILE SYSTEM CLEAN
setting tty flags
starting network
hostname: grunt
domainname: stupid.net
installing packet filter rules ...
IP Filter: initialized.  Default = pass all, Logging = disabled
configuring network interfaces: le0.
add net default: gateway 198.82.115.1
adding interface aliases:
starting system logger
checking for core dump...
savecore: no core dump
starting name server
starting rpc daemons: portmap rpc.bootparamd.
starting nfs daemons:
root: WARNING: /etc/exports not readable;  NFS server not started.
 nfsiod.
creating runtime link editor directory cache.
checking quotas: done.
building databases...
clearing /tmp
updating motd.
standard daemons: update cron.
starting network daemons: sendmail rarpd rbootd inetdApr 20 18:09:44 grunt
rboot
d[221]: chdir: No such file or directory (/usr/mdec/rbootd)
Apr 20 18:09:44 grunt rbootd[221]: going down with fatal error
 xdm.
starting local daemons:.
Tue Apr 20 18:09:47 EST 1999
Apr 20 18:09:48 grunt init: kernel security level changed from 0 to 1
Apr 20 18:09:50 grunt /netbsd: kbd0: reset failed

grunt login: root
Password:
Last login: Thu Apr 15 21:43:28 on console
Apr 20 18:09:56 grunt login: ROOT LOGIN (root) ON console
Copyright (c) 1996, 1997, 1998
        The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.

Apr 20 18:09:56 grunt login: ROOT LOGIN (root) ON console
NetBSD 1.3.3 (GRUNT) #0: Mon Feb  1 16:35:08 EST 1999

Welcome to NetBSD!

You have mail.
Terminal type? [sun] vt100
Don't login as root, use the su command.
grunt# ping 198.82.115.1
PING 198.82.115.1 (198.82.115.1): 56 data bytes
64 bytes from 198.82.115.1: icmp_seq=0 ttl=255 time=2.165 ms
^C
----198.82.115.1 PING Statistics----
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.165/2.165/2.165 ms
grunt# ipf -D
grunt# ping 198.82.115.1
PING 198.82.115.1 (198.82.115.1): 56 data bytes
64 bytes from 198.82.115.1: icmp_seq=0 ttl=255 time=1.711 ms
^C
----198.82.115.1 PING Statistics----
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 1.711/1.711/1.711 ms
grunt# ipf -E -Fa -f /etc/ipf.conf
Apr 20 18:10:21 grunt /netbsd: IP Filter: initialized.  Default = pass all,
Logg
ing = disabled


^C
grunt# ping 198.82.115.1
^C
grunt#

[---End of console log---]


[---Beginning of ipf.conf---]

block in from any to any port < 1024
block in proto icmp from any to any icmp-type echo
block in from any to any port = 2049
block in from any to any port = 6000
pass in from any to any port = 23
pass in from any to any port = 80
pass in from any to any port = 177
pass in from any to any port = 113
pass in from any to any port = 25
pass in from any to any port = 110
pass in from any to any port = 53
pass in from any to localhost
pass in from any to 0.0.0.0/32
pass in from dog to any
pass out from any to any

[---End of ipf.conf---]


[---Beginning of kernel config---]

#       $NetBSD: GENERIC,v 1.51.2.1 1997/11/20 08:46:57 mellon Exp $

include "arch/sparc/conf/std.sparc"

maxusers        32

# Options for variants of the Sun SPARC architecure.
# At least one is required.
options         SUN4            # sun4/100, sun4/200, sun4/300
options         SUN4C           # sun4c - SS1, 1+, 2, ELC, SLC, IPC, IPX, etc.
options         SUN4M           # sun4m - SS10, SS20, Classic, etc.

#options        MMU_3L          # 3-level MMU on sun4/400; (incomplete)

# Standard system options
options         KTRACE          # system call tracing
options         SYSVMSG         # System V message queues
options         SYSVSEM         # System V semaphores
options         SYSVSHM         # System V shared memory
#options        SHMMAXPGS=1024  # 1024 pages is the default
options         LKM             # loadable kernel modules
#options        INSECURE        # disable kernel security level
#options        UCONSOLE        # allow anyone to steal the virtual console

# Debugging options
#options        DDB             # kernel dynamic debugger
#options        DEBUG           # kernel debugging code
#options        DIAGNOSTIC      # extra kernel sanity checking
#options        KGDB            # support for kernel gdb
#options        KGDBDEV=0xc01   # kgdb device number (dev_t)
#options        KGDBRATE=38400  # baud rate
options         SCSIVERBOSE     # Verbose SCSI errors

# Compatibility options
options         COMPAT_43       # 4.3BSD system interfaces
options         COMPAT_10       # NetBSD 1.0 binary compatibility
options         COMPAT_11       # NetBSD 1.1 binary compatibility
options         COMPAT_12       # NetBSD 1.2 binary compatibility
options         COMPAT_SUNOS    # SunOS 4.x binary compatibility
options         COMPAT_SVR4     # SunOS 5.x binary compatibility
options         EXEC_ELF32      # Exec module for SunOS 5.x binaries.

# Filesystem options
file-system     FFS             # Berkeley Fast Filesystem
file-system     NFS             # Sun NFS-compatible filesystem client
file-system     KERNFS          # kernel data-structure filesystem
file-system     NULLFS          # NULL layered filesystem
file-system     MFS             # memory-based filesystem
file-system     FDESC           # user file descriptor filesystem
file-system     UMAPFS          # uid/gid remapping filesystem
file-system     LFS             # Log-based filesystem (still experimental)
file-system     PORTAL          # portal filesystem (still experimental)
file-system     PROCFS          # /proc
file-system     CD9660          # ISO 9660 + Rock Ridge file system
file-system     UNION           # union file system
file-system     MSDOSFS         # MS-DOS FAT filesystem(s).

options         NFSSERVER       # Sun NFS-compatible filesystem server
options         QUOTA           # FFS quotas
options         FIFO            # POSIX fifo support (in all filesystems)

# Networking options
options         INET            # IP stack
options         TCP_COMPAT_42   # compatibility with 4.2BSD TCP/IP
options         GATEWAY         # IP packet forwarding
#options        ISO,TPIP        # OSI networking
#options        EON             # OSI tunneling over IP
#options        CCITT,LLC,HDLC  # X.25
options         PFIL_HOOKS      # pfil(9) packet filter hooks.

# Options for SPARCstation hardware
options         RASTERCONSOLE   # fast rasterop console
#options        BLINK           # blink the led on supported machines

# Generic swap; second partition of root disk or network.
config          netbsd  root on ? type ?

# Main bus and CPU .. all systems.
mainbus0 at root
cpu0    at mainbus0

# Bus types found on SPARC systems.
sbus0   at mainbus0                             # sun4c
obio0   at mainbus0                             # sun4 and sun4m
vmes0   at mainbus0                             # sun4
vmel0   at mainbus0                             # sun4
iommu0  at mainbus0                             # sun4m
sbus0   at iommu0                               # sun4m

audioamd0       at mainbus0                             # sun4c
audio*  at audioamd0
audioamd0       at obio0                                # sun4m
audio*  at audioamd0
audioamd0       at sbus0 slot ? offset ?                # sun4m
audio*  at audioamd0

auxreg0 at mainbus0                             # sun4c
auxreg0 at obio0                                # sun4m

# Power status and control register found on Sun4m systems
power0  at obio0

# Mostek clock found on 4/300, sun4c, and sun4m systems.
# The Mostek clock NVRAM is the "eeprom" on sun4/300 systems.
clock0  at mainbus0                             # sun4c
clock0  at obio0                                # sun4m
clock0  at obio0 addr 0xf2000000                # sun4/300

# Intersil clock found on 4/100 and 4/200 systems.
oclock0 at obio0 addr 0xf3000000                # sun4/200
oclock0 at obio0 addr 0x03000000                # sun4/100

# Memory error registers.
memreg0 at mainbus0                             # sun4c
memreg0 at obio0                                # sun4m
memreg0 at obio0 addr 0xf4000000                # sun4/200 and sun4/300
memreg0 at obio0 addr 0x04000000                # sun4/100

# Timer chip found on 4/300, sun4c, and sun4m systems.
timer0  at mainbus0                             # sun4c
timer0  at obio0                                # sun4m
timer0  at obio0 addr 0xef000000                # sun4/300

# EEPROM found on 4/100 and 4/200 systems.  Note that the 4/300
# doesn't use this driver; the `EEPROM' is in the NVRAM on the
# Mostek clock chip on 4/300 systems.
eeprom0 at obio0 addr 0xf2000000                # sun4/200
eeprom0 at obio0 addr 0x02000000                # sun4/100

# Zilog 8530 serial chips.  Each has two-channels.
# zs0 is ttya and ttyb.  zs1 is the keyboard and mouse.
zs0     at mainbus0                                     # sun4c
zs0     at obio0                                        # sun4m
zs0     at obio0 addr 0xf1000000 level 12 flags 0x103   # sun4/200 and
sun4/300
zs0     at obio0 addr 0x01000000 level 12 flags 0x103   # sun4/100
zstty0  at zs0 channel 0        # ttya
zstty1  at zs0 channel 1        # ttyb

zs1     at mainbus0                                     # sun4c
zs1     at obio0                                        # sun4m
zs1     at obio0 addr 0xf0000000 level 12 flags 0x103   # sun4/200 and
sun4/300
zs1     at obio0 addr 0x00000000 level 12 flags 0x103   # sun4/100
kbd0    at zs1 channel 0        # keyboard
ms0     at zs1 channel 1        # mouse

zs2     at obio0 addr 0xe0000000 level 12 flags 0x103   # sun4/300
zstty2  at zs2 channel 0        # ttyc
zstty3  at zs2 channel 1        # ttyd

#
# Note the flags on the esp entries below, that work around
# deficiencies in the current driver:
#       bits 0-7:  disable disconnect/reselect for the corresponding target
#       bits 8-15: disable synch negotiation for target [bit-8]
#       Note: targets 4-7 have disconnect/reselect enabled on the premise
#             that tape devices normally have one of these targets. Tape
#             devices should be allowed to disconnect for the SCSI bus
#             to operate acceptably.
#

# sun4/300 SCSI - an NCR53c94 or equivalent behind
# an LSI Logic DMA controller
dma0    at obio0 addr 0xfa001000 level 4                # sun4/300
esp0    at obio0 addr 0xfa000000 level 4 flags 0x0000   #

# sun4c or sun4m SCSI - an NCR53c94 or equivalent behind
# specialized DMA glue
dma0    at sbus0 slot ? offset ?                        # on-board SCSI
esp0    at sbus0 slot ? offset ? flags 0x0000           # sun4c
esp0    at dma0 flags 0x0000                            # sun4m

# FSBE/S SCSI - an NCR53c94 or equivalent behind
dma*    at sbus? slot ? offset ?                        # SBus SCSI
esp*    at sbus? slot ? offset ? flags 0x0000           # two flavours
esp*    at dma? flags 0x0000                            # depending on model

# Qlogic ISP SBus SCSI Card
isp*    at sbus? slot ? offset ?

# sun4m Ethernet - an AMD 7990 LANCE behind
# specialized DMA glue
ledma0  at sbus0 slot ? offset ?                        # sun4m on-board
le0     at ledma0                                       #

# Additional SBus LANCE devices - glued on by lebuffer
lebuffer0       at sbus0 slot ? offset ?                # sun4m SBus
lebuffer*       at sbus? slot ? offset ?                # sun4m SBus
le0     at lebuffer0                                    #
le*     at lebuffer?                                    #

# sun4/300 and sun4c Ethernet - an AMD 7990 LANCE
le0     at sbus0 slot ? offset ?                        # sun4c on-board
le*     at sbus? slot ? offset ?

le0     at obio0 addr 0xf9000000 level 6                # sun4/300

# sun4/100 and sun4/200 Ethernet - an Intel 82586 on-board
# or on a Multibus/VME card.
ie0     at obio0 addr 0xf6000000 level 6                # sun4/200 on-board
ie0     at obio0 addr 0x06000000 level 6                # sun4/100 on-board

ie1     at vmes0 addr 0xffe88000 level 5 vect 0x75
ie2     at vmel0 addr 0xff31ff02 level 5 vect 0x76
ie3     at vmel0 addr 0xff35ff02 level 5 vect 0x77
ie4     at vmel0 addr 0xff2dff02 level 5 vect 0x7c

# Xylogics 753 or 7053 VME SMD disk controllers and disks, found
# on sun4 systems.
xdc0    at vmel0 addr 0xffffee80 level 3 vect 0x44
xdc1    at vmel0 addr 0xffffee90 level 3 vect 0x45
xdc2    at vmel0 addr 0xffffeea0 level 3 vect 0x46
xdc3    at vmel0 addr 0xffffeeb0 level 3 vect 0x47
xd*     at xdc? drive ?

# Xylogics 451 or 451 VME SMD disk controllers and disks, found
# on sun4 systems.
xyc0    at vmes0 addr 0xffffee40 level 3 vect 0x48
xyc1    at vmes0 addr 0xffffee48 level 3 vect 0x49
xy*     at xyc? drive ?

# NCR5380-based "Sun SCSI 3" VME SCSI controller.
# This driver has several flags which may be enabled by OR'ing
# the values and using the "flags" directive.
# Valid flags are:
#
#       0x01            Use DMA (may be polled)
#       0x02            Use DMA completion interrupts
#       0x04            Allow disconnect/reselect
#
# E.g. the following would enable DMA, interrupts, and reselect:
# si0   at vmes0 addr 0xff200000 level 3 vect 0x40 flags 0x07
#
# By default, DMA is enabled in the driver.
si0     at vmes0 addr 0xff200000 level 3 vect 0x40

# NCR5380-based "SCSI Weird" on-board SCSI interface found
# on sun4/100 systems.  The flags are the same as the "si"
# controller.  Note, while DMA is enabled by default, only
# polled DMA works at this time, and reselects do not work
# on this particular controller.
sw0     at obio0 addr 0x0a000000 level 3

# Sun "bwtwo" black and white framebuffer, found on sun4, sun4c, and sun4m
# systems.  If your sun4 system has a cgfour installed in the P4 slot,
# the P4 entries for "bwtwo" will attach to the overlay plane of the
# "cgfour".
bwtwo0  at sbus0 slot ? offset ?                # sun4c on-board
bwtwo*  at sbus? slot ? offset ?                # sun4c and sun4m
bwtwo0  at obio0 addr 0xfd000000 level 4        # sun4/200
bwtwo0  at obio0 addr 0xfb300000 level 4        # sun4/300 in P4 slot
bwtwo0  at obio0 addr 0x0b300000 level 4        # sun4/100 in P4 slot

# Sun "cgtwo" VME color framebuffer
cgtwo0  at vmes0 addr 0xff400000 level 4 vect 0xa8

# Sun "cgthree" Sbus color framebuffer
cgthree0 at sbus? slot ? offset ?
cgthree* at sbus? slot ? offset ?
#cgthree0 at obio? slot ? offset ?              # sun4m
#cgthree* at obio? slot ? offset ?              # sun4m

# Sun "cgfour" color framebuffer with overlay plane.  See above comment
# regarding overlay plane.
cgfour0 at obio0 addr 0xfb300000 level 4        # sun4/300 P4
cgfour0 at obio0 addr 0x0b300000 level 4        # sun4/100 P4

# Sun "cgsix" accelerated color framebuffer.
cgsix0  at sbus? slot ? offset ?
cgsix*  at sbus? slot ? offset ?
cgsix0  at obio0 addr 0xfb000000 level 4        # sun4/300 P4
cgsix0  at obio0 addr 0x0b000000 level 4        # sun4/100 P4

# Sun "cgeight" 24-bit framebuffer
cgeight0 at obio0 addr 0xfb300000 level 4       # sun4/300 P4
cgeight0 at obio0 addr 0x0b300000 level 4       # sun4/100 P4

# Sun "tcx" accelerated color framebuffer.
tcx0    at sbus? slot ? offset ?
tcx*    at sbus? slot ? offset ?

# Sun "cgfourteen" accelerated 24-bit framebuffer.
cgfourteen0     at obio0                        # sun4m

# SCSI bus layer.  SCSI devices attach to the SCSI bus, which attaches
# to the underlying hardware controller.
scsibus* at esp?
scsibus* at isp?
scsibus* at si?
scsibus* at sw?

# These entries find devices on all SCSI busses and assign
# unit numbers dynamically.
sd*     at scsibus? target ? lun ?              # SCSI disks
st*     at scsibus? target ? lun ?              # SCSI tapes
cd*     at scsibus? target ? lun ?              # SCSI CD-ROMs
ch*     at scsibus? target ? lun ?              # SCSI changer devices

# Floppy controller and drive found on SPARCstations.
fdc0    at mainbus0                             # sun4c controller
fdc0    at obio0                                # sun4m controller
fd*     at fdc0                                 # the drive itself

pseudo-device   loop                    # loopback interface; required
pseudo-device   pty             32      # pseudo-ttys (for network, etc.)
pseudo-device   sl              2       # SLIP interfaces
pseudo-device   ppp             2       # PPP interfaces
pseudo-device   tun             4       # Network "tunnel" device
pseudo-device   bpfilter        16      # Berkeley Packet Filter
pseudo-device   vnd             4       # disk-like interface to files
pseudo-device   ccd             4       # concatenated and striped disks
#pseudo-device  strip           1       # radio clock
pseudo-device   ipfilter                # ip filter
# rnd is EXPERIMENTAL
#pseudo-device  rnd                     # /dev/random and in-kernel generator

[---End of kernel config---]