summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-01-31 22:11:20 +0100
committerHans Dedecker <dedeckeh@gmail.com>2017-01-31 22:11:20 +0100
commitdf5042974622d72ce2424de8ef532941ac4f7fc9 (patch)
tree3581d664e1bce8d63dbaaaa2434ef52899130825 /CMakeLists.txt
parent83d72cf224956eb08453051744649df89b217203 (diff)
odhcpd: properly handle netlink messages (FS#388)
Use libnl-tiny to construct and process netlink messages when manipulating IPv6 routes and fetching IPv6 addresses. This fixes lingering netlink error messages on the netlink socket in case route deletion failed causing fetching of IPv6 addresses to be aborted and odhcpd faultly assuming no IPv6 addresses being present on the interface.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c338f3..0855458 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,10 @@ set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=c99")
FIND_PATH(ubox_include_dir libubox/uloop.h)
-INCLUDE_DIRECTORIES(${ubox_include_dir})
+FIND_PATH(libnl-tiny_include_dir netlink-generic.h PATH_SUFFIXES libnl-tiny)
+INCLUDE_DIRECTORIES(${ubox_include_dir} ${libnl-tiny_include_dir})
+
+FIND_LIBRARY(libnl NAMES nl-tiny)
add_definitions(-D_GNU_SOURCE -Wall -Werror -Wextra)
@@ -23,7 +26,7 @@ if(${UBUS})
endif(${UBUS})
add_executable(odhcpd src/odhcpd.c src/config.c src/router.c src/dhcpv6.c src/ndp.c src/dhcpv6-ia.c src/dhcpv4.c ${EXT_SRC})
-target_link_libraries(odhcpd resolv ubox uci ${EXT_LINK})
+target_link_libraries(odhcpd resolv ubox uci ${libnl} ${EXT_LINK})
# Installation
install(TARGETS odhcpd DESTINATION sbin/)