Subject: kern/36574: Can't add gif interface to bridge
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <misho@aitnet.eu>
List: netbsd-bugs
Date: 06/28/2007 12:30:00
>Number:         36574
>Category:       kern
>Synopsis:       Can't add gif interface to bridge
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 28 12:30:00 +0000 2007
>Originator:     Michael Pounov
>Release:        NetBSD 4.99.21 -current at 2007-06-25
>Organization:
AITNET
>Environment:
>Description:
Can't add gif interface to bridge for transparent  ipsec.
In versions NetBSD 3.x; 4.x_BETAx and NetBSD 4.99.3 gif interfaces work normaly and bridge can add gif0.
>How-To-Repeat:
ifconfig gif0 create
ifconfig gif0 tunnel 10.10.10.10 10.20.30.40
ifconfig gif0 mtu 1500 up
ifconfig bridge0 create
brconfig bridge0 add ex0 add gif0
... at this moment brconfig output error:: Invalid argument: gif0

>Fix:
I diff the brconfig in sbin/brconfig.c with work correctly version of sources in NetBSD 4.0_BETA2 at 2007-04-24 in my workstation, but user land  tool has no changes.

After that look in sys/net and find tiny changes in if_bridgevar.h. changes only type of variable ifbicu_buf to void*. Nothing scary and serious.
In if_bridge.c is same situation correct type-casts for new type declared in header.
At first view I can't see reason for this bug. ??????!!!!

Dummy speed-fix at this moment, may be this interface bridge driver use other version from netbsd-4 branch