Re: iproute2 (2012-11-08) and tunnel mode vti problems
From: Stephen Hemminger <hidden>
Date: 2012-11-08 15:33:18
I have here some problems with the newest iproute2 taken from git today. I will play around with the new vti mode. First problem ist after loading the ip_vti module I got an ioctl error on ip tunnel show: --------------------------------------------------------------------- root@ipsec0:[~] > ip -V ip utility, iproute2-ss121108 root@ipsec0:[~] > uname -a Linux ipsec0 3.6.6 #1 SMP Tue Nov 6 16:21:05 CET 2012 i686 GNU/Linux root@ipsec0:[~] > modprobe ip_vti root@ipsec0:[~] > ip tunnel show ip_vti0: ioctl 89f4 failed: Invalid argument ip_vti0: ip/ip remote any local any ttl inherit nopmtudisc key 0 root@ipsec0:[~] > --------------------------------------------------------------------
Found the cause of the problem. It is a kernel issue. The kernel implementation of VTI uses same flag bit as SIT tunnel, and 'ip tunnel show' is using SIT flag to decide whether to look up sit tunnel parameters, which fails on VTI. It is a bug introduced in ioctl definition for VTI. Not sure what the best way to fix it is? Add more kludge code in ip command, or change definition of flag bit, and risk userspace ABI incompatibility. Also, there is the issue that i_flags is a confusing mix of network byte order bits or'd with host byte order bits. The initial definition of SIT was broken long, long ago. Copying netdev list.