Subject: Problems with latest ipfilter/ipnat stuff
To: None <current-users@NetBSD.ORG>
From: Dave Huang <khym@bga.com>
List: current-users
Date: 07/08/1997 21:50:55
Has anyone else been having trouble with the latest version of
ipfilter? I'm running a July 8th kernel, and am getting these fairly
often:

fatal page fault in supervisor mode
trap type 6 code 0 eip f8145110 cs f8180008 eflags 10282 cr2 1b733850 cpl c0000000
panic: trap
syncing disks... done

gdb says:

(kgdb) list *0xf8145110
0xf8145110 is in nat_inlookup (../../../../netinet/ip_nat.c:649).
644     
645             flags &= IPN_TCPUDP;
646     
647             nat = nat_table[1][mapdst.s_addr % NAT_SIZE];
648             for (; nat; nat = nat->nat_hnext[1])
649                     if ((!ifp || ifp == nat->nat_ifp) &&
650                         nat->nat_oip.s_addr == src.s_addr &&
651                         nat->nat_outip.s_addr == mapdst.s_addr &&
652                         flags == nat->nat_flags && (!flags ||
653                          (nat->nat_oport == sport &&

A July 7 kernel did this:

vm_fault(0xf869fe00, 65206000, 1, 0) -> 1
fatal page fault in supervisor mode
trap type 6 code 0 eip f81450f4 cs f8180008 eflags 10082 cr2 652065c0 cpl c0000000
panic: trap
syncing disks... 1 1 done

(kgdb) list *0xf81450f4
0xf81450f4 is in nat_inlookup (../../../../netinet/ip_nat.c:649).
644     
645             flags &= IPN_TCPUDP;
646     
647             nat = nat_table[1][mapdst.s_addr % NAT_SIZE];
648             for (; nat; nat = nat->nat_hnext[1])
649                     if ((!ifp || ifp == nat->nat_ifp) &&
650                         nat->nat_oip.s_addr == src.s_addr &&
651                         nat->nat_outip.s_addr == mapdst.s_addr &&
652                         flags == nat->nat_flags && (!flags ||
653                          (nat->nat_oport == sport &&

My system is a 80386, 4MB, NE2000 ethernet, 3Com 3c503 ethernet, and a
PPP connection. NAT table only has one entry in it:

map ppp 10.1.1.64/27 -> 205.238.168.136/32 portmap tcp 1025:65000

The crash seems to happen pretty randomly... only when there's
activity over the PPP link though.

Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 21 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++