Date: Mon, 7 Aug 2000 19:28:04 -0400 (EDT) From: bad@uhf.wireless.net To: FreeBSD-gnats-submit@freebsd.org, buaas@wireless.net, dbutter@wireless.net Subject: kern/20473: /sys/net/in_proto.c cvs version 1.53.2.1 Message-ID: <200008072328.TAA00777@uhf.wireless.net>
next in thread | raw e-mail | index | archive | help
>Number: 20473
>Category: kern
>Synopsis: socket(AF_INET, SOCK_RAW, 4) no longer works
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 07 16:30:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Bernie Doehner
>Release: FreeBSD 4.1-RELEASE i386
>Organization:
>Environment:
4.1-RELEASE with following kernel config file (NGIF=0):
machine "i386"
cpu "I486_CPU"
cpu "I586_CPU"
ident server
maxusers 20
options INET #InterNETworking
options FFS #Berkeley Fast Filesystem
options NFS #Network Filesystem
options "CD9660" #ISO 9660 Filesystem
options MSDOSFS #MSDOS Filesystem
options MFS #Memory Filesystem
options PROCFS #Process filesystem
options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]
options UCONSOLE #Allow users to grab the console
options USERCONFIG #boot -c editor
options XSERVER #XFree86
options USER_LDT
#options "CD9660_ROOT" #CD-ROM usable as root device
#options ATAPI
options ATA_STATIC_ID
#options "VM86"
options "CPU_FASTER_5X86_FPU"
options CPU_WT_ALLOC
options OVERRIDE_TUNER=9
options "P1003_1B"
options "_KPOSIX_PRIORITY_SCHEDULING"
options _KPOSIX_VERSION=199309L
options SYSVSHM #shared memory files
options SYSVSEM #shared semiphores
options SYSVMSG #shared messages
#options QUOTA
options COMPAT_LINUX
options MROUTING
options PPP_BSDCOMP
options PPP_DEFLATE
options PPP_FILTER
options IPFIREWALL
options IPFIREWALL_FORWARD
options IPDIVERT
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=50
#options GDB_REMOTE_CHAT
#options CONSPEED=9600
options MAXCONS=6
#config kernel root on wd0
device isa
device pci
device fdc0 at isa? port IO_FD1 irq 6 drq 2
device fd0 at fdc0 drive 0
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
device sio1 at isa? port IO_COM2 irq 3
device sio2 at isa? port 0x3e8 irq 9
device ata0 at isa? port "IO_WD1" irq 14
device ata1 at isa? port "IO_WD2" irq 15
device ata
device atadisk
device atapicd
device ppc0 at isa? irq7
device scbus
device da0
device ppbus
device vpo
# syscons is the default console driver, resembling an SCO console
device sc0 at isa?
# Mandatory, don't remove
device npx0 at isa? port "IO_NPX" irq 13
device atkbdc0 at isa? port IO_KBD
device atkbd0 at atkbdc? irq 1
device psm0 at atkbdc? irq 12
device vga0 at isa?
device ed0 at isa? port 0x2a0 irq 11 iomem 0xd8000
device wl0 at isa? port 0x390
device smbus
device iicbus
device iicbb
device bktr
device pcm
pseudo-device loop
pseudo-device ether
pseudo-device vn
pseudo-device ppp 1
pseudo-device tun
pseudo-device pty 20
pseudo-device bpf
>Description:
We use the /dev/tun* devices for transmitting and receiving
protocol ipencap (4) (ip4 inside ip4),
and within our application we open the IPENCAP socket with
socket(AF_INET, SOCK_RAW, 4).
This works with 4.0-RELEASE and before. (cvs versions 1.53 and prior
of /sys/netinet/in_proto.c).
Is this no longer correct?
>How-To-Repeat:
Do a socket(AF_INET, SOCK_RAW, 4); under 4.1-RELEASE
and we get a "Protocol not supported".
>Fix:
Workaround - comment out lines in in_proto.c that break our program.
--- in_proto.c.4.1 Mon Aug 7 13:07:12 2000
+++ in_proto.c Mon Aug 7 18:56:02 2000
@@ -159,6 +159,7 @@
},
#endif
#endif /* IPSEC */
+#if NGIF > 0
{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR,
encap4_input, 0, 0, rip_ctloutput,
0,
@@ -173,6 +174,7 @@
&nousrreqs
},
#endif
+#endif /*NGIF*/
#ifdef IPDIVERT
{ SOCK_RAW, &inetdomain, IPPROTO_DIVERT, PR_ATOMIC|PR_ADDR,
div_input, 0, 0, ip_ctloutput,
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008072328.TAA00777>
