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 <xiyou.wangcong@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
3700bf56fa
commit
65f218bcae
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Add table
Reference in a new issue