From 65f218bcae7824f833c2b6effcb37a207c2de584 Mon Sep 17 00:00:00 2001 From: Cong Wang Date: Tue, 1 Apr 2014 18:03:33 -0700 Subject: [PATCH] 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 --- lib/route/link/veth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } /** @} */