# How to remove tap0 (openvpn) from bridge before it is stop?

## nivw

Hi all,

I am using openvpn in layer2 to allow avahi (zeroconf) to work on top of it.

my clients /etc/conf/net reads:

 *Quote:*   

> 
> 
> ############# Ethernet
> 
> #wan
> ...

 

but when I try to /etc/init.d/net.tap0 start I get:

device tap0 is already a member of a bridge; can't enslave it to bridge

how to fix it?

what preup () should I write?

is this good:

```
preup() {

        if [ "${IFACE}" = "tap0" ] ; then

                ewarn "removing tap0 (openvpn) from bridge"

                brctl delif br0 ${IFACE}

        fi

}
```

----------

## nivw

I tried this:

 *Quote:*   

> _is_bridge()
> 
> {
> 
>         [ ! ${IFACE} == "br0" ]&& brctl show 2>/dev/null | grep -q "^${IFACE}[[$
> ...

 

but it is hardcoded to br0

----------

