@@ -366,25 +366,9 @@ if (NOT DEFINED ENABLE_RESOLVE_NEIGH)
endif()
if (ENABLE_RESOLVE_NEIGH)
# FIXME use of pkgconfig is discouraged
- pkg_check_modules(NL3 libnl-3.0 libnl-route-3.0)
- if (NL3_FOUND)
- set(NL_KIND 3)
- set(NL_INCLUDE_DIRS ${NL3_INCLUDE_DIRS})
- set(NL_LIBRARIES ${NL3_LIBRARIES})
- else()
- # FIXME: I don't know why we have this fallback, all supported distros
- # have libnl3
- pkg_check_modules(NL1 libnl-1)
- if (NL1_FOUND)
- set(NL_KIND 1)
- set(NL_INCLUDE_DIRS ${NL1_INCLUDE_DIRS})
- set(NL_LIBRARIES ${NL1_LIBRARIES})
- else()
- message(FATAL_ERROR "Cannot find libnl-3.0 or libnl-1")
- endif()
- endif()
-
+ pkg_check_modules(NL libnl-3.0 libnl-route-3.0 REQUIRED)
include_directories(${NL_INCLUDE_DIRS})
+ set(NL_KIND 3)
else()
set(NL_KIND 0)
set(NL_LIBRARIES "")
@@ -606,9 +590,6 @@ endif()
if (NOT HAVE_VALGRIND_DRD)
message(STATUS " Valgrind drd.h NOT enabled")
endif()
-if (NL_KIND EQUAL 1)
- message(STATUS " libnl 3 NOT found (using libnl 1 compat)")
-endif()
if (NL_KIND EQUAL 0)
message(STATUS " neighbour resolution NOT enabled")
else()
@@ -46,11 +46,7 @@
@SIZEOF_LONG_CODE@
-#if @NL_KIND@ == 3
-# define HAVE_LIBNL3 1
-#elif @NL_KIND@ == 1
-# define HAVE_LIBNL1 1
-#elif @NL_KIND@ == 0
+#if @NL_KIND@ == 0
# define NRESOLVE_NEIGH 1
#endif
@@ -39,9 +39,7 @@ extern unsigned int if_nametoindex(__const char *__ifname) __THROW;
#include "neigh.h"
-#ifndef HAVE_LIBNL1
#include <netlink/route/link/vlan.h>
-#endif
static pthread_once_t device_neigh_alloc = PTHREAD_ONCE_INIT;
static struct nl_sock *zero_socket;
@@ -7,19 +7,10 @@
#include <stddef.h>
#include <stdint.h>
#include "config.h"
-#ifdef HAVE_LIBNL1
-#include <netlink/object.h>
-#include "nl1_compat.h"
-#else
#include <netlink/object-api.h>
-#endif
struct get_neigh_handler {
-#ifdef HAVE_LIBNL1
- struct nl_handle *sock;
-#else
struct nl_sock *sock;
-#endif
struct nl_cache *link_cache;
struct nl_cache *neigh_cache;
struct nl_cache *route_cache;