odhcpd: enable ipv6 server mode only when it is supported
authorRosy Song <rosysong@rosinson.com>
Wed, 12 Sep 2018 01:21:19 +0000 (09:21 +0800)
committerHans Dedecker <dedeckeh@gmail.com>
Wed, 12 Sep 2018 19:47:33 +0000 (21:47 +0200)
Signed-off-by: Rosy Song <rosysong@rosinson.com>
package/network/services/odhcpd/Makefile
package/network/services/odhcpd/files/odhcpd.defaults

index 25a3cf564933c54d58ac634694403f1169390e9e..03adf004551861c24b6fc7264cc84884706f2221 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=odhcpd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=1.11
 
 PKG_SOURCE_PROTO:=git
index cecbdd4a8d71523873022a6f6f1d1c849a72a371..2d8a6f0b1a4176d48328f5a8c822336cffb3187d 100644 (file)
@@ -13,7 +13,7 @@ json_select ..
 
 case "$protocol" in
 # only enable server mode on statically addressed lan ports
-"static") MODE=server ;;
+"static") [ -e /proc/sys/net/ipv6 ] && MODE=server || MODE=disabled ;;
 *) MODE=disabled ;;
 esac