Re: [OpenWrt-Devel] [PATCHv2 2/2] odhcp6c: Add renew handler for proto dhcpv6
On Wed, Mar 26, 2014 at 8:25 PM, Bastian Bittorf bitt...@bluebottle.com wrote: * Jonas Gorski j...@openwrt.org [26.03.2014 20:18]: +proto_dhcpv6_renew() { + local interface=$1 + # SIGUSR1 forces odhcp6c to renew its lease + proto_kill_command $interface 16 SIGUSR1 is 16 only for mips; other arches use different values (see e.g. http://de.wikipedia.org/wiki/Signal_(Computer)#G.C3.A4ngige_UNIX-Signale). yes, have this on my todo-list: the signal should be humanreadable e.g. 'SIGUSR1' and then translated to the specific value, e.g. in /lib/netifd/netifd-proto.sh proto_kill_command() { local signal=$2 # e.g. USR1 local code=$( kill -l | grep $signal | cut -d')' -f1 ) ... } can i send a patch or is this a bad idea? I have a new version already in my local repo. Will send out later ... Helmut ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2 2/2] odhcp6c: Add renew handler for proto dhcpv6
Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com --- Changes in v2: Tell netifd core that we have a renew handler package/network/ipv6/odhcp6c/files/dhcpv6.sh | 8 1 file changed, 8 insertions(+) diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index 9b6275e..cd03c25 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -5,6 +5,8 @@ init_proto $@ proto_dhcpv6_init_config() { + renew_handler=1 + proto_config_add_string 'reqaddress:or(try,force,none)' proto_config_add_string 'reqprefix:or(auto,no,range(0, 64))' proto_config_add_string clientid @@ -67,6 +69,12 @@ proto_dhcpv6_setup() { $opts $iface } +proto_dhcpv6_renew() { + local interface=$1 + # SIGUSR1 forces odhcp6c to renew its lease + proto_kill_command $interface 16 +} + proto_dhcpv6_teardown() { local interface=$1 proto_kill_command $interface -- 1.8.1.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 2/2] odhcp6c: Add renew handler for proto dhcpv6
On Wed, Mar 26, 2014 at 5:41 PM, Jonas Gorski j...@openwrt.org wrote: On Wed, Mar 26, 2014 at 5:11 PM, Helmut Schaa helmut.sc...@googlemail.com wrote: Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com --- Changes in v2: Tell netifd core that we have a renew handler package/network/ipv6/odhcp6c/files/dhcpv6.sh | 8 1 file changed, 8 insertions(+) diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index 9b6275e..cd03c25 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -5,6 +5,8 @@ init_proto $@ proto_dhcpv6_init_config() { + renew_handler=1 + proto_config_add_string 'reqaddress:or(try,force,none)' proto_config_add_string 'reqprefix:or(auto,no,range(0, 64))' proto_config_add_string clientid @@ -67,6 +69,12 @@ proto_dhcpv6_setup() { $opts $iface } +proto_dhcpv6_renew() { + local interface=$1 + # SIGUSR1 forces odhcp6c to renew its lease + proto_kill_command $interface 16 SIGUSR1 is 16 only for mips; other arches use different values (see e.g. http://de.wikipedia.org/wiki/Signal_(Computer)#G.C3.A4ngige_UNIX-Signale). Ouch, thanks for catching that! Helmut ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 2/2] odhcp6c: Add renew handler for proto dhcpv6
On Wed, Mar 26, 2014 at 5:11 PM, Helmut Schaa helmut.sc...@googlemail.com wrote: Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com --- Changes in v2: Tell netifd core that we have a renew handler package/network/ipv6/odhcp6c/files/dhcpv6.sh | 8 1 file changed, 8 insertions(+) diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index 9b6275e..cd03c25 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -5,6 +5,8 @@ init_proto $@ proto_dhcpv6_init_config() { + renew_handler=1 + proto_config_add_string 'reqaddress:or(try,force,none)' proto_config_add_string 'reqprefix:or(auto,no,range(0, 64))' proto_config_add_string clientid @@ -67,6 +69,12 @@ proto_dhcpv6_setup() { $opts $iface } +proto_dhcpv6_renew() { + local interface=$1 + # SIGUSR1 forces odhcp6c to renew its lease + proto_kill_command $interface 16 SIGUSR1 is 16 only for mips; other arches use different values (see e.g. http://de.wikipedia.org/wiki/Signal_(Computer)#G.C3.A4ngige_UNIX-Signale). Regards Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 2/2] odhcp6c: Add renew handler for proto dhcpv6
* Jonas Gorski j...@openwrt.org [26.03.2014 20:18]: +proto_dhcpv6_renew() { + local interface=$1 + # SIGUSR1 forces odhcp6c to renew its lease + proto_kill_command $interface 16 SIGUSR1 is 16 only for mips; other arches use different values (see e.g. http://de.wikipedia.org/wiki/Signal_(Computer)#G.C3.A4ngige_UNIX-Signale). yes, have this on my todo-list: the signal should be humanreadable e.g. 'SIGUSR1' and then translated to the specific value, e.g. in /lib/netifd/netifd-proto.sh proto_kill_command() { local signal=$2 # e.g. USR1 local code=$( kill -l | grep $signal | cut -d')' -f1 ) ... } can i send a patch or is this a bad idea? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2 2/2] odhcp6c: Add renew handler for proto dhcpv6
Hi Bastian, Le 26/03/2014 20:25, Bastian Bittorf a écrit : * Jonas Gorski j...@openwrt.org [26.03.2014 20:18]: +proto_dhcpv6_renew() { + local interface=$1 + # SIGUSR1 forces odhcp6c to renew its lease + proto_kill_command $interface 16 SIGUSR1 is 16 only for mips; other arches use different values (see e.g. http://de.wikipedia.org/wiki/Signal_(Computer)#G.C3.A4ngige_UNIX-Signale). yes, have this on my todo-list: the signal should be humanreadable e.g. 'SIGUSR1' and then translated to the specific value, e.g. in /lib/netifd/netifd-proto.sh proto_kill_command() { local signal=$2 # e.g. USR1 local code=$( kill -l | grep $signal | cut -d')' -f1 ) ... } can i send a patch or is this a bad idea? The Busybox kill applet accepts named as well as numeric signals, i.e. kill -USR1 pid should work. -- Michel bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel