Permalink
Browse files

bump radvd 1.9.3, by dileks (closes #2155)

git-svn-id: file:///var/svn/freetz/trunk@10990 149334a1-2f27-0410-a3b9-fc62619ac1e6
  • Loading branch information...
1 parent 0874d6b commit b9dea5c0d92ccc061efe2b49c002d788b7e44aeb cuma committed Sep 11, 2013
Showing with 81 additions and 4 deletions.
  1. +1 −0 CHANGELOG
  2. +3 −2 make/radvd/Config.in
  3. +73 −0 make/radvd/patches/001-fix-NETLINK_NO_ENOBUFS-is-undefined.patch
  4. +4 −2 make/radvd/radvd.mk
View
@@ -75,6 +75,7 @@ Latest changes:
* php 5.3.27/5.4.19
* polarssl 1.2.8
* Python 2.7.5
+ * radvd 1.9.3
* samba 3.6.18
* sqlite 3.8.0.2
* sslh 1.15
View
@@ -1,7 +1,8 @@
config FREETZ_PACKAGE_RADVD
+ bool "radvd 1.9.3"
depends on FREETZ_TARGET_IPV6_SUPPORT
- bool "radvd (router advertisement daemon)"
select FREETZ_BUSYBOX_IP
+ select FREETZ_LIB_libdaemon
default n
help
- The router advertisement daemon is used for host autoconfiguration in ipv6 networks.
+ The "router advertisement daemon" (radvd) is used for host autoconfiguration in ipv6 networks.
@@ -0,0 +1,73 @@
+From 31cf41f50dddca5d06f07450647de1debab44eb5 Mon Sep 17 00:00:00 2001
+From: Sedat Dilek <sedat.dilek@gmail.com>
+Date: Sun, 28 Jul 2013 12:34:39 +0200
+Subject: [PATCH] netlink.c: Fix build failure when NETLINK_NO_ENOBUFS is not
+ defined
+
+My build with radvd-1.9.3 and the Freetz build-system breaks with a
+Linux-kernel v2.6.13.1 like this:
+
+netlink.c: In function 'netlink_socket':
+netlink.c:84:41: error: 'NETLINK_NO_ENOBUFS' undeclared (first use in
+this function)
+netlink.c:84:41: note: each undeclared identifier is reported only
+once for each function it appears in
+make[2]: *** [netlink.o] Error 1
+
+This is obvious as my kernel-sources have no "NETLINK_NO_ENOBUFS" definition
+in "include/linux/netlink.h".
+
+The culprit is the else-if line here:
+
+[ netlink.c ]
+
+int netlink_socket(void)
+{
+...
+ if (sock == -1) {
+ flog(LOG_ERR, "Unable to open netlink socket: %s", strerror(errno));
+ }
+ else if (setsockopt(sock, SOL_NETLINK, NETLINK_NO_ENOBUFS, &val, sizeof(val)) < 0 ) {
+ flog(LOG_ERR, "Unable to setsockopt NETLINK_NO_ENOBUFS: %s", strerror(errno));
+ }
+...
+
+The NETLINK_NO_ENOBUFS socket flag was first introduced with Linux-kernel
+v2.6.29-rc7:
+
+ commit 38938bfe3489394e2eed5e40c9bb8f66a2ce1405
+ "netlink: add NETLINK_NO_ENOBUFS socket flag"
+
+The issue in radvd was introduced with:
+
+ commit de9a8849258b2a6a125d686dcb9c424affad354d
+ "setsockopt NETLINK_NO_ENOBUFS"
+
+I have added extra checks for SOL_NETLINK and NETLINK_NO_ENOBUFS definitions
+which fixes the issue for me.
+
+NOTE: Compile-tested only!
+Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
+---
+ netlink.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git netlink.c netlink.c
+index a37ccad..d405731 100644
+--- netlink.c
++++ netlink.c
+@@ -81,9 +81,11 @@ int netlink_socket(void)
+ if (sock == -1) {
+ flog(LOG_ERR, "Unable to open netlink socket: %s", strerror(errno));
+ }
++#if defined SOL_NETLINK && defined NETLINK_NO_ENOBUFS
+ else if (setsockopt(sock, SOL_NETLINK, NETLINK_NO_ENOBUFS, &val, sizeof(val)) < 0 ) {
+ flog(LOG_ERR, "Unable to setsockopt NETLINK_NO_ENOBUFS: %s", strerror(errno));
+ }
++#endif
+
+ memset(&snl, 0, sizeof(snl));
+ snl.nl_family = AF_NETLINK;
+--
+1.8.3.4
+
View
@@ -1,13 +1,15 @@
-$(call PKG_INIT_BIN, 1.8.3)
+$(call PKG_INIT_BIN, 1.9.3)
$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tar.gz
-$(PKG)_SOURCE_MD5:=73d533b7b20f5554c8d3e33643945442
+$(PKG)_SOURCE_SHA1:=14b025bdcec77ea7278cd8ee2a32af3f81d26f4d
$(PKG)_SITE:=http://www.litech.org/radvd/dist
$(PKG)_BINARY:=$($(PKG)_DIR)/$(pkg)
$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/sbin/$(pkg)
$(PKG)_REBUILD_SUBOPTS += FREETZ_KERNEL_VERSION
+$(PKG)_DEPENDS_ON := libdaemon
+
$(PKG_SOURCE_DOWNLOAD)
$(PKG_UNPACKED)
$(PKG_CONFIGURED_CONFIGURE)

0 comments on commit b9dea5c

Please sign in to comment.