diff options
author | Thomas Graf <tgraf@suug.ch> | 2013-02-14 11:48:00 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2013-02-14 11:48:00 (GMT) |
commit | 1ecf98a23e4ba309eb1f94b824d5f973d3fee0d2 (patch) | |
tree | b74b1115024866c5b27d8b986229fc70041ca0b8 /tests | |
parent | ee4122a12edcf7f10f03fbb7e35fe1388a8c3399 (diff) | |
download | libnl-1ecf98a23e4ba309eb1f94b824d5f973d3fee0d2.zip libnl-1ecf98a23e4ba309eb1f94b824d5f973d3fee0d2.tar.gz libnl-1ecf98a23e4ba309eb1f94b824d5f973d3fee0d2.tar.bz2 |
bond: Provide rtnl_link_bond_alloc()
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-create-bond.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/test-create-bond.c b/tests/test-create-bond.c index e54b0e6..11bc5b0 100644 --- a/tests/test-create-bond.c +++ b/tests/test-create-bond.c @@ -1,5 +1,6 @@ #include <netlink/netlink.h> #include <netlink/route/link.h> +#include <netlink/route/link/bonding.h> int main(int argc, char *argv[]) { @@ -13,14 +14,9 @@ int main(int argc, char *argv[]) return err; } - link = rtnl_link_alloc(); + link = rtnl_link_bond_alloc(); rtnl_link_set_name(link, "my_bond"); - if ((err = rtnl_link_set_type(link, "bond")) < 0) { - nl_perror(err, "Unable to set link info type"); - return err; - } - if ((err = rtnl_link_add(sk, link, NLM_F_CREATE)) < 0) { nl_perror(err, "Unable to add link"); return err; |