Subject: kern/6843: IPENCAP tunneling broken
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@lyssa.owl.de>
List: netbsd-bugs
Date: 01/19/1999 00:39:38
>Number:         6843
>Category:       kern
>Synopsis:       IPENCAP tunneling broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 18 15:50:01 1999
>Last-Modified:
>Originator:     Matthias Scheler
>Organization:
Matthias Scheler                                http://home.owl.de/~tron/
>Release:        990118
>Environment:
System: NetBSD lyssa.owl.de 1.3I NetBSD 1.3I (LYSSA) #1: Tue Jan 19 00:26:59 MET 1999 tron@lyssa.owl.de:/src/sys/compile/LYSSA i386

>Description:
After the recent changes to the gre interface IPENCAP tunneling seems to
be broken. Part of the problem is that it is not possible to enable
IPENCAP via "ifconfig gre0 link1" any more because the code because the
code has been remove. Even after putting it back sending packet still
fails with EINVAL

>How-To-Repeat:
Set up an IPENCAP tunnel between NetBSD-current and a Linux 2.0.x box
and try to use "ping".

>Fix:
This diff will fix the "ifconfig" problem but not the EINVAL problem.

Index: if_gre.c
===================================================================
RCS file: /cvsroot/src/sys/net/if_gre.c,v
retrieving revision 1.5
diff -r1.5 if_gre.c
380a381,385
>                       case IFF_LINK1:
>                               sc->g_proto = IPPROTO_IPIP;
>                               ifp->if_flags |= IFF_LINK1;
>                               ifp->if_flags &= ~(IFF_LINK0|IFF_LINK2);
>                               break;
419a425,428
>                       break;
>               case IPPROTO_IPIP :
>                       ifp->if_flags |= IFF_LINK1;
>                       ifp->if_flags &= ~(IFF_LINK0|IFF_LINK2);
>Audit-Trail:
>Unformatted: