# OpenRC and bonding+VLAN issues

## yzh

I have defined the following bonding network configuration in /etc/conf.d/net:

```

slaves_bond0="eth2 eth2.2020"

config_bond0="null"

config_eth2="null" 

config_eth2_2020="null" 

RC_NEED_bond0="net.eth2"

vlans_eth2="2020"

```

So in bond0 I want to have the interfaces: eth2 and eth2.2020.

Somehow I always get this error (using OpenRC 0.8.3-r1) when starting the bond0 interface:

```

* Bringing up interface bond0

 *   Adding slaves to bond0 ...

 *     eth2 eth2.2020

/lib/rc/net/bonding.sh: line 108: echo: write error: Operation not permitted                                                                        [ !! ]

 *   null ...                                                                                                                                       [ ok ]

```

I have tracked it down being eth2.2020 still being up before it executes:

```

echo "+eth2.2020" >/sys/class/net/bond0/bonding

```

Which is kinda weird because before it does this, it will set the interfaces to down. 

Somehow if "+eth2" get added to >/sys/class/net/bond0/bonding, it will bring the interface eth2.2020 up as well.. Is this a bug?

PS: if i manually patch the bonding.sh and add "ip link set ${s} down" before it echos the interface to the sysfs /bonding file, it will work..

----------

## yzh

sys-apps/openrc-0.8.3-r1: bonding.sh tries to add interface that can be up

----------

