Subject: kern/6843: IPENCAP tunneling broken
To: None <>
From: Matthias Scheler <>
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
>Originator:     Matthias Scheler
Matthias Scheler                      
>Release:        990118
System: NetBSD 1.3I NetBSD 1.3I (LYSSA) #1: Tue Jan 19 00:26:59 MET 1999 i386

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

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

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
>                       case IFF_LINK1:
>                               sc->g_proto = IPPROTO_IPIP;
>                               ifp->if_flags |= IFF_LINK1;
>                               ifp->if_flags &= ~(IFF_LINK0|IFF_LINK2);
>                               break;
>                       break;
>               case IPPROTO_IPIP :
>                       ifp->if_flags |= IFF_LINK1;
>                       ifp->if_flags &= ~(IFF_LINK0|IFF_LINK2);