[2318] in linux-net channel archive

home help back first fref pref prev next nref lref last post

getting kernel oops with ipip tunnel

daemon@ATHENA.MIT.EDU (Andreas Koppenhoefer)
Sun Mar 31 19:45:00 1996

To: submit-linux-dev-net@ratatosk.yggdrasil.com
From: koppenas@koppenas.dialup.informatik.uni-stuttgart.de (Andreas Koppenhoefer)
Date: 	31 Mar 1996 19:48:22 +0200
CC: Linus.Torvalds@helsinki.fi

-----BEGIN PGP SIGNED MESSAGE-----

Dear Network Programmer,

I'm having some trouble doing ipip tunneling with linux. After configuring
tunnel device with

	ifconfig tunl0 koppenas pointopoint tun-serv
	route add -host tun-decap dev tunl0

where koppenas is the hostname of my linux box, tun-serv is the host
which knows about decapsulation for hostname tun-decap. tunnel and
ipip is compiled into linux kernel (no modules). Everything runs fine
while I'm sending small ip packets like some rlogin or telnet. But
sending large packets with rcp or ftp over ipip encapsulation fails:
There are many truncated pakets. Receiving side of ipip tunneling is
fine.

Much more worse is a kernel oops which can be reproduced by
	ping -c 1 -s 1453 tun-decap
	--> Segmentation fault.
while
	ping -c 1 -s 1452 tun-decap

is ok. I think the magic number of 1452 evals from
	1500 - 40 - 8 = 1452
 where 40 is the size of ipip-header added by tunl0 and 8 is the icmp
header added by ping. Setting proper mtu values for interface tunl0
seems to get ignored.

You should be able to repeat this misbehaviour by configuring a tunnel
device pointing to some random ip address and then pinging.

Here is the offending kernel Oops for 1.3.57. Linux 1.3.79 with
new_tunnel is failing the same way.

Unable to handle kernel NULL pointer dereference at virtual address c0000000
Oops: 0000
CPU:    0
EIP:    0010:[<00000000>]
EFLAGS: 00010246
eax: 00000001   ebx: 00ff1845   ecx: 001d42d8   edx: 00000000
esi: 00ff1924   edi: 001d42d8   ebp: 00000000   esp: 013c2d30
ds: 0018   es: 0018   fs: 002b   gs: 002b   ss: 0018
Process ping (pid: 375, process nr: 33, stackpage=013c2000)
Stack: 00138e6a 00ff18f4 001d42d8 fabd4581 00ff1924 00ff1845 001d42d8 00000001 
       00ff1924 001462b1 00003b70 00146425 00ff1924 001d42d8 00000001 0084d018 
       013c2f10 00000000 00000000 004d2dd8 00000293 00000040 000003ff bfff1c00 
Call Trace: [<00138e6a>] [<001462b1>] [<00146425>] [<0011d5d5>] [<00129541>] [<00123e4a>] [<001476d6>] 
       [<00147470>] [<00147724>] [<001512a1>] [<00136a1e>] [<0017609f>] [<001726c7>] [<001373a3>] [<0010a5d9>] 
current->tss.cr3 = 00e75000, %cr3 = 00e75000
*pde = 00102067
*pte = 00000027

Feeding this to ksymoops...
	Trace: 138e6a <dev_queue_xmit+5a/220>
	Trace: 1462b1 <ip_build_xmit+cf1/f10>
	Trace: 146425 <ip_build_xmit+e65/f10>
	Trace: 11d5d5 <kmalloc+15/240>
	Trace: 129541 <create_tables+81/170>
	Trace: 123e4a <getblk+3a/4e0>
	Trace: 1476d6 <raw_sendto+176/190>
	Trace: 147470 <raw_getfrag>
	Trace: 147724 <raw_sendmsg+34/d0>
	Trace: 1512a1 <inet_sendmsg+a1/c0>
	Trace: 136a1e <sys_sendto+13e/160>
	Trace: 17609f <write_chan+10f/1f0>
	Trace: 1726c7 <tty_write+d7/100>
	Trace: 1373a3 <sys_socketcall+233/350>
	Trace: 10a5d9 <system_call+59/a0>

And here are the relevant parts of kernel .config file (again these
are from 1.3.57, 1.3.79 compiled the same way):

	#
	# Networking options
	#
	CONFIG_FIREWALL=y
	CONFIG_NET_ALIAS=y
	CONFIG_INET=y
	CONFIG_IP_FORWARD=y
	CONFIG_IP_MULTICAST=y
	CONFIG_IP_FIREWALL=y
	CONFIG_IP_ACCT=y
	CONFIG_NET_IPIP=y
	CONFIG_IP_FIREWALL_VERBOSE=y
	CONFIG_IP_MASQUERADE=y
	CONFIG_IP_MROUTE=y
	CONFIG_IP_ALIAS=y
	
	#
	# (it is safe to leave these untouched)
	#
	# CONFIG_INET_PCTCP is not set
	CONFIG_INET_RARP=y
	# CONFIG_NO_PATH_MTU_DISCOVERY is not set
	CONFIG_TCP_NAGLE_OFF=y
	CONFIG_IP_NOSR=y
	CONFIG_SKB_LARGE=y
	# CONFIG_IPX is not set
	# CONFIG_ATALK is not set
	# CONFIG_AX25 is not set
	# CONFIG_NETLINK is not set
	
	#
	# Network device support
	#
	CONFIG_NETDEVICES=y
	CONFIG_DUMMY=m
	CONFIG_SLIP=m
	# CONFIG_SLIP_COMPRESSED is not set
	CONFIG_PPP=m
    [...]
	CONFIG_NE2000=y

Any help appreciated.

- - Andreas

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
Comment: Processed by Mailcrypt 3.3, an Emacs/PGP interface

iQBVAwUBMV7FM0VdjNvyndGpAQEINwH9Elp37RBm9K3NoU2kyElz7aAHy0trY5xC
m8LC41JmhRUqcGFdwY7OTPGiaoX04VPM6T7FAsN1T4DL8c6TrVRMEw==
=xxRn
-----END PGP SIGNATURE-----
-- 
Andreas Koppenhoefer, Student der Universitaet Stuttgart, BR Deutschland 
prefered languages: German, English, C, Perl ("Just another Perl hacker,")
EMail:  koppenas@informatik.uni-stuttgart.de            (university address)
        Andreas.Koppenhoefer@studbox.uni-stuttgart.de   (alternate address)
	akoppenhoefer@schweinfurt.netsurf.de            (private address)
privat: Franz-Schubert-Str. 2, 97616 Bad Neustadt, Germany
        Belaustr. 5, 70195 Stuttgart, Germany
phone:  +49 9771 7943 (9-21h MEZ=GMT+1), +49 711 694111 (19-22h MEZ=GMT+1)


home help back first fref pref prev next nref lref last post