From 847e269c568740bab1e0c5c39829d30f5b557dda Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Fri, 11 Nov 2011 16:01:52 +0100 Subject: [PATCH] rtnl_link_bond_add: allow to allocate bond name in case NULL is given Signed-off-by: Jiri Pirko --- lib/route/link/bonding.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/route/link/bonding.c b/lib/route/link/bonding.c index 5788f69..5e78084 100644 --- a/lib/route/link/bonding.c +++ b/lib/route/link/bonding.c @@ -60,15 +60,12 @@ int rtnl_link_bond_add(struct nl_sock *sock, const char *name, if (!name) { if (opts) name = rtnl_link_get_name(opts); - - if (!name) - return -NLE_MISSING_ATTR; } if ((err = rtnl_link_set_type(link, "bond")) < 0) goto errout; - + if (name) rtnl_link_set_name(link, name); err = rtnl_link_add(sock, link, NLM_F_CREATE);