Blame SOURCES/0002-macvtap-fix-error-condition.patch

dc4502
From cf7e43786749fcb1325d5b8e4cf0816f0eed3556 Mon Sep 17 00:00:00 2001
dc4502
From: Aaron Conole <aconole@redhat.com>
dc4502
Date: Wed, 25 Aug 2021 10:22:20 -0400
dc4502
Subject: [PATCH 2/8] macvtap: fix error condition
dc4502
dc4502
If the socket() call fails, we will jump to out and pass a
dc4502
negative value to close() which is not allowed.
dc4502
dc4502
Fixes: d43abb0267f3 ("lldpad: do not use macv[tap/lan] interfaces as ports")
dc4502
closes https://github.com/intel/openlldp/issues/75
dc4502
Signed-off-by: Aaron Conole <aconole@redhat.com>
dc4502
---
dc4502
 lldp_util.c | 2 +-
dc4502
 1 file changed, 1 insertion(+), 1 deletion(-)
dc4502
dc4502
diff --git a/lldp_util.c b/lldp_util.c
dc4502
index 1e58b1e..be1333e 100644
dc4502
--- a/lldp_util.c
dc4502
+++ b/lldp_util.c
dc4502
@@ -681,7 +681,7 @@ int is_macvtap(const char *ifname)
dc4502
 	s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
dc4502
 
dc4502
 	if (s < 0) {
dc4502
-		goto out;
dc4502
+		return false;
dc4502
 	}
dc4502
 
dc4502
 	nlh = malloc(NLMSG_SIZE);
dc4502
-- 
dc4502
2.31.1
dc4502