On Mon, Jun 20, 2016 at 01:43:30PM -0400, Laine Stump wrote:
On 06/20/2016 11:28 AM, Ján Tomko wrote:
Introduced by commit d575679, unused at the time.
---
src/util/virnetlink.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index 5491ece..513f36e 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -42,10 +42,6 @@
#include "virmacaddr.h"
#include "virerror.h"
-#ifndef SOL_NETLINK
-# define SOL_NETLINK 270
-#endif
-
#define VIR_FROM_THIS VIR_FROM_NET
VIR_LOG_INIT("util.netlink");
Provisional ACK since you are correct that it isn't visibly used, but I
can't help thinking the author had some reason for adding it.
An earlier version of the patchset used it to call:
setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP,
https://www.redhat.com/archives/libvir-list/2012-August/msg01457.html
In a later version it was changed to nl_socket_add_membership without
removing the macro (since we disable -Wunused-macros by default):
https://www.redhat.com/archives/libvir-list/2012-August/msg01541.html
Sadly, this function is also present in libnl 1.1, which is our minimum
required version, so we can't drop the #ifdev HAVE_LIBNL1 code yet.
It looks
like SOL_NETLINK wasn't present in kernel 2.6 (RHEL6 vintage - although
it is mentioned in a comment of one of the system #includes), but was
there by the time of kernel 3.10 (RHEL7).
It was introduced by commit 9a4595bc7e released in kernel v2.6.14,
so RHEL6 based on 2.6.32 had it from the start.
Jan
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list