enslaving a device
Thomas Graf
tgraf at infradead.org
Tue Aug 30 03:52:16 EDT 2011
On Thu, Aug 25, 2011 at 10:16:37AM +0200, dieter wrote:
>
> Hello,
>
> Should it be possible to enslave a device to a bonding device with
> something like the following:
>
> link = rtnl_link_get_by_name(cache, "eth0");
> change = rtnl_link_alloc();
> rtnl_link_set_master(change, rtnl_link_name2i(cache, "bond0"));
> rtnl_link_change(nlsock, link, change, 0);
>
> It doesn't return an error, but it also doesn't seem to have any
> effect. Maybe my kernel is too old (2.6.35.10), or should it return
> "not supported" in that case? This is with a yesterday's git
> checkout.
You kernel is too old. Support for setting the master device via
netlink has been aded on Feb 13.
The kernel policy is to not return an error if unknown attributes
are specified. This is due to backwards compatibility but implies
that userspace is responsible for verifying kernel support itself.
More information about the libnl
mailing list