mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-03 21:09:42 +02:00
ipv6-support: Preliminary support for dnsmasq >=2.66
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34858 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
68f7f699b6
commit
9f2f19e97c
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ipv6-support
|
PKG_NAME:=ipv6-support
|
||||||
PKG_VERSION:=2012-12-11
|
PKG_VERSION:=2012-12-22
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -172,8 +172,17 @@ disable_router() {
|
|||||||
# Notify the address distribution daemon
|
# Notify the address distribution daemon
|
||||||
ubus call 6distributed deliface '{"network": "'"$network"'"}'
|
ubus call 6distributed deliface '{"network": "'"$network"'"}'
|
||||||
|
|
||||||
# Disable advertisement daemon
|
|
||||||
|
# Start RD & DHCPv6 service
|
||||||
|
local router_service
|
||||||
|
config_get router_service global router_service
|
||||||
|
|
||||||
|
if [ "$router_service" == "dnsmasq" ]; then
|
||||||
|
rm -f "/var/etc/dnsmasq.d/ipv6-router-$network.conf"
|
||||||
|
/etc/init.d/dnsmasq restart
|
||||||
|
else
|
||||||
stop_service /usr/sbin/6relayd "/var/run/ipv6-router-$network.pid"
|
stop_service /usr/sbin/6relayd "/var/run/ipv6-router-$network.pid"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -424,8 +433,23 @@ enable_router() {
|
|||||||
[ "$length" -ne "0" ] && ubus call 6distributed newiface '{"network": "'"$network"'", "iface": "'"$device"'", "length": '"$length"'}'
|
[ "$length" -ne "0" ] && ubus call 6distributed newiface '{"network": "'"$network"'", "iface": "'"$device"'", "length": '"$length"'}'
|
||||||
|
|
||||||
# Start RD & DHCPv6 service
|
# Start RD & DHCPv6 service
|
||||||
|
local router_service
|
||||||
|
config_get router_service global router_service
|
||||||
|
|
||||||
|
if [ "$router_service" == "dnsmasq" ]; then
|
||||||
|
local dnsmasq_opts
|
||||||
|
config_get dnsmasq_opts global dnsmasq_opts
|
||||||
|
[ -z "$dnsmasq_opts" ] && dnsmasq_opts="ra-stateful,ra-names"
|
||||||
|
|
||||||
|
local conf="/var/etc/dnsmasq.d/ipv6-router-$network.conf"
|
||||||
|
mkdir -p $(dirname $conf)
|
||||||
|
echo "dhcp-range=::1,constructor:$device,$dnsmasq_opts" > $conf
|
||||||
|
echo "enable-ra" >> $conf
|
||||||
|
/etc/init.d/dnsmasq restart
|
||||||
|
else
|
||||||
local pid="/var/run/ipv6-router-$network.pid"
|
local pid="/var/run/ipv6-router-$network.pid"
|
||||||
start_service "/usr/sbin/6relayd -S . $device" "$pid"
|
start_service "/usr/sbin/6relayd -S . $device" "$pid"
|
||||||
|
fi
|
||||||
|
|
||||||
# Try relaying if necessary
|
# Try relaying if necessary
|
||||||
restart_master_relay "$network"
|
restart_master_relay "$network"
|
||||||
|
Loading…
Reference in New Issue
Block a user