Hello together,
I'm currently trying to realize a bridge slave as netifd proto.
An addition of the interface into the bridge-config is not feasible for the use case.
Has anyone done that before?
Until now I came up with the following config (extract):
proto_{proto}_setup() {
local config="$1"
local ifname="$2"
proto_init_update "$ifname" 1
proto_send_update "$config"
ubus wait_for network.interface.{bridge}
ubus call network.interface.{bridge} up
ubus call network.interface.{bridge} add_device "{'name':'(ifname to be filled in here)'}"
}
proto_{proto}_teardown() {
local config="$1"
ubus call network.interface.{bridge} remove_device "{'name':'(ifname to be filled in here)'}"
proto_init_update "*" 0
proto_send_update "$config"
}
The ifup works without any problems, the interface is added as slave to the {bridge}-network.
Unfortunately, the ifdown does not work.
I see netifd: {config} (29458): Command failed: Permission denied
when the interface is brought down. It seems "proto_send_update" fails, the interface is removed ("nomaster") from the bridge, but still up.
Does anybody have an idea, what the problem with interface teardown could be?
Thanks!