Panic with if_bridge when removing components
Gustau Perez Querol
gperez at entel.upc.edu
Sat Jun 9 15:44:17 UTC 2012
Hi,
I'm seeing panics when removing an interface of a bridge. The system
runs HEAD/AMD64 r236733. I see no changes to if_bridge.c in the last two
days, so I would say the problem's still there. I also checked stable
and the problem should be there too.
The problem is that I have a bridge composed of two ethernet
interfaces, an ath interface and a tap. As soon as I remove any of them
the system panics. Because the system runs openvpn with the tap
connected to the bridge, when the system starts to reboot, the openvpn
daemon removes the tap and thus causing also the panic.
The panic comes because at sys/net/if_bridge.c:943 the struct
*ifnet->if_bridge of the interface removed is set to NULL too early.
Because of this, at sys/net/if_bridge.c:996 we call
if_bridge.c:bridge_linkstate where the struct *ifnet->if_bridge is
needed. This causes the panic.
I can pastebin the core file if needed.
I'm attaching a simple patch that solves it. The struct
*ifnet->if_bridge could be set to null only if the interface removed is
gone, but I think it won't hurt to set it to null in any case.
Regards,
Gustau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: if_bridge.diff
Type: text/x-diff
Size: 637 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20120609/fc670d42/if_bridge.bin
More information about the freebsd-net
mailing list