From: Cong Wang Date: Wed, 2 Apr 2014 01:03:33 +0000 (-0700) Subject: add NLM_F_EXCL to rtnl_link_veth_add() X-Git-Tag: libnl3_2_25rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f218bcae7824f833c2b6effcb37a207c2de584;p=thirdparty%2Flibnl.git add NLM_F_EXCL to rtnl_link_veth_add() rtnl_link_veth_add() is a helper API we provide, it makes sense to set NLM_F_EXCL for it since it doesn't accept flags as a parameter. BTW, correct an indention too. Signed-off-by: Cong Wang Acked-by: Thomas Graf Signed-off-by: Thomas Haller --- diff --git a/lib/route/link/veth.c b/lib/route/link/veth.c index b2cfa54..19c84f8 100644 --- a/lib/route/link/veth.c +++ b/lib/route/link/veth.c @@ -286,10 +286,10 @@ int rtnl_link_veth_add(struct nl_sock *sock, const char *name, } rtnl_link_set_ns_pid(peer, pid); - err = rtnl_link_add(sock, link, NLM_F_CREATE); + err = rtnl_link_add(sock, link, NLM_F_CREATE | NLM_F_EXCL); rtnl_link_put(link); - return err; + return err; } /** @} */