radvd: add new 1.8 options, split radvdump into a separate package
authorStephen Walker <stephendwalker@gmail.com>
Mon, 18 Jul 2011 10:32:55 +0000 (10:32 +0000)
committerStephen Walker <stephendwalker@gmail.com>
Mon, 18 Jul 2011 10:32:55 +0000 (10:32 +0000)
SVN-Revision: 27682

ipv6/radvd/Makefile
ipv6/radvd/files/radvd.init

index 16d377c81ce4e71ce88012f3e22465e5dbbb1140..ca4327795a3d12ceb486b7c2cd2ae66a2d626449 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=radvd
 PKG_VERSION:=1.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://v6web.litech.org/radvd/dist \
@@ -20,16 +20,36 @@ PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/radvd
+define Package/radvd/Default
   SECTION:=ipv6
   CATEGORY:=IPv6
-  TITLE:=IPv6 Routing Advertisement Daemon
+  TITLE:=IPv6 Routing Advertisement
   URL:=http://v6web.litech.org/radvd/
   DEPENDS:=+kmod-ipv6
 endef
 
+define Package/radvd
+  $(call Package/radvd/Default)
+  TITLE+= Daemon
+endef
+
 define Package/radvd/description
-IPv6 Routing Advertisement Daemon.
+radvd is the router advertisement daemon for IPv6. It listens to router
+solicitations and sends router advertisements as described in "Neighbor
+Discovery for IP Version 6 (IPv6)" (RFC 4861).  With these advertisements hosts
+can automatically configure their addresses and some other parameters. They also
+can choose a default router based on these advertisements.
+endef
+
+define Package/radvdump
+  $(call Package/radvd/Default)
+  TITLE+= Dumper
+endef
+
+define Package/radvdump/description
+radvdump prints out the contents of incoming router advertisements sent by radvd
+or some other software implementing (parts of) "Neighbor Discovery for IP
+Version 6 (IPv6)" (RFC 4861).
 endef
 
 CONFIGURE_ARGS += \
@@ -50,7 +70,12 @@ define Package/radvd/install
        $(INSTALL_DATA) ./files/radvd.hotplug $(1)/etc/hotplug.d/iface/05-radvd
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvd $(1)/usr/sbin/
+endef
+
+define Package/radvdump/install
+       $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radvdump $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,radvd))
+$(eval $(call BuildPackage,radvdump))
index dbbe52cc8131ca0f0501bc9ae04fd8fbf4a0d6c3..d513bba29416c9e9dcd7e0d27048795ff1d4e11a 100644 (file)
@@ -6,13 +6,14 @@ RADVD_INTERFACE_STRING_OPTIONS='MaxRtrAdvInterval MinRtrAdvInterval MinDelayBetw
 RADVD_INTERFACE_BOOLEAN_OPTIONS='IgnoreIfMissing AdvSendAdvert UnicastOnly AdvManagedFlag AdvOtherConfigFlag AdvSourceLLAddress AdvHomeAgentFlag AdvHomeAgentInfo AdvMobRtrSupportFlag AdvIntervalOpt'
 
 RADVD_PREFIX_STRING_OPTIONS='AdvValidLifetime AdvPreferredLifetime'
-RADVD_PREFIX_BOOLEAN_OPTIONS='AdvOnLink AdvAutonomous AdvRouterAddr'
+RADVD_PREFIX_BOOLEAN_OPTIONS='AdvOnLink AdvAutonomous AdvRouterAddr DeprecatePrefix DecrementLifetimes'
 
 RADVD_ROUTE_STRING_OPTIONS='AdvRouteLifetime AdvRoutePreference'
+RADVD_ROUTE_BOOLEAN_OPTIONS='RemoveRoute'
 
-RADVD_RDNSS_STRING_OPTIONS='AdvRDNSSLifetime'
+RADVD_RDNSS_STRING_OPTIONS='AdvRDNSSLifetime FlushRDNSS'
 
-RADVD_DNSSL_STRING_OPTIONS='AdvDNSSLLifetime'
+RADVD_DNSSL_STRING_OPTIONS='AdvDNSSLLifetime FlushDNSSL'
 
 validate_varname() {
        local varname=$1
@@ -222,6 +223,13 @@ radvd_write_prefix() {
                        fi
                done
 
+               config_get value "$cfg" Base6Interface
+               if [ -n "$value" ]; then
+                       if ifname=$(get_ifname "$value"); then
+                               printf '\t\t%s %s;\n' "Base6Interface" "$ifname"
+                       fi
+               fi
+
                config_get value "$cfg" Base6to4Interface
                if [ -n "$value" ]; then
                        if ifname=$(get_ifname "$value"); then
@@ -267,6 +275,17 @@ radvd_write_route() {
                        printf '\t\t%s %s;\n' "$name" "$value"
                done
 
+               for name in $RADVD_ROUTE_BOOLEAN_OPTIONS; do
+                       config_get value "$cfg" "$name"
+                       [ -z "$value" ] && continue
+                       config_get_bool value "$cfg" "$name" 0
+                       if [ "$value" -ne 0 ]; then 
+                               printf '\t\t%s on;\n' "$name"
+                       else
+                               printf '\t\t%s off;\n' "$name"
+                       fi
+               done
+
                printf '\t};\n'
        done