Subject: kern/25790: ipnat cannot load rules on sparc64
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <tnn@netilium.org>
List: netbsd-bugs
Date: 06/02/2004 17:46:30
>Number:         25790
>Category:       kern
>Synopsis:       ipnat cannot load rules on sparc64
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 02 17:47:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Tobias Nygren
>Release:        NetBSD 2.0_BETA (May 31)
>Organization:
>Environment:
NetBSD hibana64 2.0_BETA NetBSD 2.0_BETA (GENERIC) #0: Mon May 31 14:37:42 UTC 2004  autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/sparc64/OBJ/autobuild/netbsd-2-0/src/sys/arch/sparc64/compile/GENERIC sparc64

>Description:
Works on i386:

soyokaze# uname -v
NetBSD 2.0_BETA (SOYOKAZE) #0: Wed May 12 15:19:01 CEST 2004  tnn@hitomi:/gtmp/netbsd-2-0/src/obj-athlon/sys/arch/i386/compile/SOYOKAZE
soyokaze# ipf -V
ipf: IP Filter: v4.1.1 (396)
Kernel: IP Filter: v4.1.1               
Running: yes
Log Flags: 0 = none set
Default: pass all, Logging: available
Active list: 0
Feature mask: 0x10a
soyokaze# ipnat -v -f ipnat.dummy
map lo0 1.2.3.4/32 -> 127.0.0.1/32

>How-To-Repeat:
Breaks on sparc64:

hibana64# uname -v
NetBSD 2.0_BETA (GENERIC) #0: Mon May 31 14:37:42 UTC 2004  autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/sparc64/OBJ/autobuild/netbsd-2-0/src/sys/arch/sparc64/compile/GENERIC
hibana64# ipf -V 
ipf: IP Filter: v4.1.1 (480)
Kernel: IP Filter: v4.1.1               
Running: yes
Log Flags: 0 = none set
Default: pass all, Logging: available
Active list: 0
Feature mask: 0x10a
hibana64# ipnat -v -f ipnat.dummy
map lo0 1.2.3.4/32 -> 127.0.0.1/32
1:ioctl(add/insert nat rule): Invalid argument

>Fix:
A preliminary ddb session suggests fr_nat_ioctl is called,
but nat_siocaddnat is not. Bad args from userland?



>Release-Note:
>Audit-Trail:
>Unformatted: