netlink: Remove invalid flags(NLM_F_CREATE and NLM_F_EXCL) for RTM_DELLINK

NLM_F_CREATE and NLM_F_EXCL are invalid for RTM_DELLINK,
so remove them.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Shi Lei 2021-01-11 10:23:34 +08:00 committed by Michal Privoznik
parent c86aedf60f
commit 8133400234

View File

@ -627,8 +627,7 @@ virNetlinkDelLink(const char *ifname, virNetlinkDelLinkFallback fallback)
g_autoptr(virNetlinkMsg) nl_msg = NULL; g_autoptr(virNetlinkMsg) nl_msg = NULL;
g_autofree struct nlmsghdr *resp = NULL; g_autofree struct nlmsghdr *resp = NULL;
nl_msg = nlmsg_alloc_simple(RTM_DELLINK, nl_msg = nlmsg_alloc_simple(RTM_DELLINK, NLM_F_REQUEST);
NLM_F_REQUEST | NLM_F_CREATE | NLM_F_EXCL);
if (!nl_msg) { if (!nl_msg) {
virReportOOMError(); virReportOOMError();
return -1; return -1;