[LEDE-DEV] [PATCH v5] ar71xx: add ew-balin platform from Embedded Wireless

2018-01-15 Thread Catrinel Catrinescu
Add the Embedded Wireless "Balin" platform
 SoC: QCA AR9344 or AR9350
 RAM: DDR2-RAM 64MBytes
 Flash: SPI-NOR 16MBytes
 WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n
 Ethernet: 3 x 10/100 Mb/s
 USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up
 PCI-Express: 1 x lane PCIe 1.2
 UART: 1 x Normal, 1 x High-Speed
 JTAG: 1 x EJTAG
 GPIO: 10 x Input/Output multiplexed

The module comes already with the current vanilla OpenWrt firmware.
To update, use "sysupgrade" image directly in vendor firmware.

Signed-off-by: Catrinel Catrinescu 
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 target/linux/ar71xx/config-4.9 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 110 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/config-default |   1 +
 target/linux/ar71xx/image/generic.mk   |   9 ++
 12 files changed, 148 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 5a10a9f486..bc7a89fc33 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -370,6 +370,12 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
+   ew-balin)
+# usb0 is RNDIS interface over USB in device mode
+   ucidef_set_interface_raw "usb2" "usb0" "static"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
+   ;;
ew-dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 2720288e3d..8fb2252436 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -199,6 +199,9 @@ get_status_led() {
el-mini)
status_led="easylink:green:system"
;;
+   ew-balin)
+   status_led="balin:green:status"
+   ;;
ew-dorin|\
ew-dorin-router)
status_led="dorin:green:status"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b6642495de..7a00d5b909 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -643,6 +643,9 @@ ar71xx_board_detect() {
*"EL-MINI")
name="el-mini"
;;
+   *"EmbWir-Balin")
+   name="ew-balin"
+   ;;
*"EmbWir-Dorin")
name="ew-dorin"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3d7b1593e1..1e389db7a6 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -237,6 +237,7 @@ platform_check_image() {
epg5000|\
esr1750|\
esr900|\
+   ew-balin|\
ew-dorin|\
ew-dorin-router|\
gl-ar150|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 8ecf7e1355..4a8024b9a5 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -108,6 +108,7 @@ CONFIG_ATH79=y
 # CONFIG_ATH79_MACH_EPG5000 is not set
 # CONFIG_ATH79_MACH_ESR1750 is not set
 # CONFIG_ATH79_MACH_ESR900 is not set
+# CONFIG_ATH79_MACH_EW_BALIN is not set
 # CONFIG_ATH79_MACH_EW_DORIN is not set
 # CONFIG_ATH79_MACH_F9K1115V2 is not set
 # CONFIG_ATH79_MACH_FRITZ300E is not set
diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9
index 0e224ae1c4..19f3541de8 100644
--- a/target/linux/ar71xx/config-4.9
+++ b/target/linux/ar71xx/config-4.9
@@ -106,6 +106,7 @@ CONFIG_ATH79=y
 # CONFIG_ATH79_MACH_EPG5000 is not set
 # CONFIG_ATH79_MACH_ESR1750 is not set
 # CONFIG_ATH79_MACH_ESR900 is not set
+# CONFIG_ATH79_MACH_EW_BALIN is not set
 # CONFIG_ATH79_MACH_EW_DORIN is not set
 # CONFIG_ATH79_MACH_F9K1115V2 is not set
 # CONFIG_ATH79_MACH_FRITZ300E is not set
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 3ca77550bc..fe3564a5d0 100644
--- 

Re: [LEDE-DEV] [PATCH v4] ar71xx: add ew-balin platform from Embedded Wireless

2018-01-15 Thread Catrinel Catrinescu
Hi John & Piotr

Thank you for your advices. I updated the patch, inclusive your comments,
I hope now you can commit the new patch version v5.

Best regards
Catrinel


-Original Message-
From: Piotr Dymacz [mailto:pep...@gmail.com] 
Sent: Samstag, 13. Januar 2018 15:25
To: Catrinel Catrinescu; lede-dev@lists.infradead.org
Cc: 'i...@embeddedwireless.de'; j...@phrozen.org
Subject: Re: [LEDE-DEV] [PATCH v4] ar71xx: add ew-balin platform from Embedded 
Wireless

Hello Catrinel,

As John already wrote, it seems that your patch got whitespace mangled. 
Please, send new version using git send-email.

Also, please see minor comments inline, below.

On 13.01.2018 11:36, Catrinel Catrinescu wrote:
> Add the Embedded Wireless "Balin" platform, based on AR9344:
> http://www.embeddedwireless.de/uploads/Balin_data_2016_10.pdf

Please, drop url from commit message.

> SoC: QCA AR9344 or AR9350
> RAM: DDR2-RAM 64MBytes
> Flash: SPI-NOR 16MBytes
> WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n
> Ethernet: 3 x 10/100 Mb/s
> USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up
> PCI-Express: 1 x lane PCIe 1.2
> UART: 1 x Normal, 1 x High-Speed
> JTAG: 1 x EJTAG
> GPIO: 10 x Input/Output multiplexed
> The module comes already with the current vanilla OpenWRT firmware, so no 
> need to install "factory"-image, or any other stuff :-)

OpenWRT -> OpenWrt.

If the boards already runs OpenWrt, maybe it would be better to write 
something like this instead: Use "sysupgrade" image directly in vendor 
firmware which is based on OpenWrt.

I don't see any reason to mention that "factory" image is not required 
when your patch doesn't include code for it.

And please, drop ":-)" ;)

> 
> Signed-off-by: Catrinel Catrinescu 
> ---
>   .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
>   target/linux/ar71xx/base-files/etc/diag.sh |   3 +
>   .../etc/uci-defaults/03_network-switchX-migration  |   1 +
>   target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>   .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
>   target/linux/ar71xx/config-4.4 |   1 +
>   target/linux/ar71xx/config-4.9 |   1 +
>   .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
>   target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>   .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 112 
> +
>   .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>   target/linux/ar71xx/image/generic.mk   |   9 ++
>   target/linux/ar71xx/mikrotik/config-default|   1 +
>   target/linux/ar71xx/nand/config-default|   1 +
>   14 files changed, 152 insertions(+)
>   create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c
> 
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
> b/target/linux/ar71xx/base-files/etc/board.d/02_network
> index fb61792bf4..4919e7c983 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -368,6 +368,12 @@ ar71xx_setup_interfaces()
>   ucidef_add_switch "switch0" \
>   "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
>   ;;
> + ew-balin)
> + ucidef_set_interface_raw "usb2" "usb0" "static"
> + ucidef_set_interface_raw "usb3" "usb0" "static"

Could you please explain these two lines?
This code will create two static interfaces with the same netdev (usb0).

Is USB in this module/board set to device mode by default?

> + ucidef_add_switch "switch0" \
> + "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
> + ;;
>   ew-dorin)
>   ucidef_add_switch "switch0" \
>   "0@eth0" "1:lan" "2:lan" "3:wan"
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index 6cbb3576d8..ca73d5f62b 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -193,6 +193,9 @@ get_status_led() {
>   el-mini)
>   status_led="easylink:green:system"
>   ;;
> + ew-balin)
> + status_led="balin:green:status"
> + ;;
>   ew-dorin|\
>   ew-dorin-router)
>   status_led="dorin:green:status"
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index b5440230a5..162742a94c 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -640,6 +640,9 @@ ar71xx_board_detect() {
>   *"EL-MINI")
>   name="el-mini"
>   ;;
> + *EmbWir-Balin)

*"EmbWir-Balin")

> + name="ew-balin"
> + ;;
>   *"EmbWir-Dorin")
>   name="ew-dorin"
>   ;;
> diff --git 

[LEDE-DEV] DDNS for ipv6

2018-01-15 Thread e9hack
Hi,

ddns for ipv6 doesn't work since the last few updates related to the ddns 
package. From log file:

Mon Jan 15 17:35:21 2018 user.notice DEBUG: hotplug igmpproxy: device 'wan_6' 
action 'ifup'
Mon Jan 15 17:35:22 2018 user.notice ddns-scripts[7394]: dynv6_ipv6: PID '7394' 
started at 2018-01-15 17:35
Mon Jan 15 17:35:23 2018 user.err ddns-scripts[7394]: dynv6_ipv6: Can not 
detect local IP using network_get_ipaddr6
'wan_6' - Error: '1' - TERMINATE
Mon Jan 15 17:35:23 2018 user.warn ddns-scripts[7394]: dynv6_ipv6: PID '7394' 
exit WITH ERROR '1' at 2018-01-15 17:35

This is immediately after a sysupgrade. Restarting of the service brings it 
back.

Ddns provider is dynv6.com.

Regards,
Hartmut

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] mt7621: Add back CONFIG_SCHED_HRTICK to kernel config

2018-01-15 Thread Rosen Penev
Fixes FS #1242.

The way I figured this out was by using diff on config-4.4 from 17.01
and config-4.9 from trunk. First I removed CONFIG options. That did not work.
Then I started adding. This one seems to do the trick.

The issue is that anything in /dev/sdX starts returning bad data when read.
PCIe or USB does not matter. I have not tested NVME since I lack the hardware.
/dev/mtdblockX may or may not be impacted. No idea.

Signed-off-by: Rosen Penev 
---
 target/linux/ramips/mt7621/config-4.9 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/mt7621/config-4.9 
b/target/linux/ramips/mt7621/config-4.9
index f9765ed..0ea6798 100644
--- a/target/linux/ramips/mt7621/config-4.9
+++ b/target/linux/ramips/mt7621/config-4.9
@@ -233,6 +233,7 @@ CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
+CONFIG_SCHED_HRTICK=y
 # CONFIG_SCHED_INFO is not set
 CONFIG_SCHED_SMT=y
 # CONFIG_SCSI_DMA is not set
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] mt7621: Add back CONFIG_SCHED_HRTICK to kernel config

2018-01-15 Thread Rosen Penev
It is defined in generic yes. From discussions on IRC, the issue may
be related to something else. I will do further testing to see whether
or not this is correct. Should take me another week or so...

I still have no idea why in 17.01 CONIG_SCHED_HRTICK is defined in
generic and in a bunch of architectures whereas it;'s only defined in
trunk in generic.

On Mon, Jan 15, 2018 at 1:20 PM, Mathias Kresin  wrote:
> 15.01.2018 21:09, Rosen Penev:
>>
>> Fixes FS #1242.
>>
>> The way I figured this out was by using diff on config-4.4 from 17.01
>> and config-4.9 from trunk. First I removed CONFIG options. That did not
>> work.
>> Then I started adding. This one seems to do the trick.
>>
>> The issue is that anything in /dev/sdX starts returning bad data when
>> read.
>> PCIe or USB does not matter. I have not tested NVME since I lack the
>> hardware.
>> /dev/mtdblockX may or may not be impacted. No idea.
>>
>> Signed-off-by: Rosen Penev 
>> ---
>>   target/linux/ramips/mt7621/config-4.9 | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/target/linux/ramips/mt7621/config-4.9
>> b/target/linux/ramips/mt7621/config-4.9
>> index f9765ed..0ea6798 100644
>> --- a/target/linux/ramips/mt7621/config-4.9
>> +++ b/target/linux/ramips/mt7621/config-4.9
>> @@ -233,6 +233,7 @@ CONFIG_RTC_CLASS=y
>>   CONFIG_RTC_DRV_PCF8563=y
>>   CONFIG_RTC_I2C_AND_SPI=y
>>   CONFIG_RTC_MC146818_LIB=y
>> +CONFIG_SCHED_HRTICK=y
>>   # CONFIG_SCHED_INFO is not set
>>   CONFIG_SCHED_SMT=y
>>   # CONFIG_SCSI_DMA is not set
>
>
> What ever the root cause of your issue is, it isn't CONFIG_SCHED_HRTICK
> since it is already enabled for mt7621:
>
> $ git grep CONFIG_SCHED_HRTICK
> target/linux/gemini/config-4.4:# CONFIG_SCHED_HRTICK is not set
> target/linux/generic/config-4.14:CONFIG_SCHED_HRTICK=y
> target/linux/generic/config-4.4:CONFIG_SCHED_HRTICK=y
> target/linux/generic/config-4.9:CONFIG_SCHED_HRTICK=y
> target/linux/mcs814x/config-3.18:# CONFIG_SCHED_HRTICK is not set
> target/linux/omap24xx/config-4.1:CONFIG_SCHED_HRTICK=y
> target/linux/ppc40x/config-3.18:CONFIG_SCHED_HRTICK=y
> target/linux/ppc44x/config-3.18:CONFIG_SCHED_HRTICK=y
> target/linux/rb532/config-4.9:# CONFIG_SCHED_HRTICK is not set
>
> For further patches, please explain in the commit message why the change
> fixes the issue and move the not commit message related text below the tear
> line.
>
> Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] SCHED_HRTICK missing in modern kernels.

2018-01-15 Thread Rosen Penev
So it seems that SCHED_HRTICK got removed from a lot of targets when
moving from 4.4 to 4.9. Anyone know why?

I'm about to submit a patch for mt7621 that fixes a major regression
with the target resulting from this.

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] DDNS for ipv6

2018-01-15 Thread Christian Schoenebeck
Hi Hartmut,

either try newest scripts from github (updated last weekend)

or insert "network_flush_cache" at about line 900 inside 
dynamic_dns_functions.sh function get_local_ip()

while : ; do
if [ -n "$ip_network" ]; then
# set correct program
-->>network_flush_cache # force re-read data from ubus
[ $use_ipv6 -eq 0 ] && __RUNPROG="network_get_ipaddr" \
|| __RUNPROG="network_get_ipaddr6"

or set option ip_source "interface" instead of "network"

Christian


Am 15.01.2018 um 18:39 schrieb e9hack:
> Hi,
> 
> ddns for ipv6 doesn't work since the last few updates related to the ddns 
> package. From log file:
> 
> Mon Jan 15 17:35:21 2018 user.notice DEBUG: hotplug igmpproxy: device 'wan_6' 
> action 'ifup'
> Mon Jan 15 17:35:22 2018 user.notice ddns-scripts[7394]: dynv6_ipv6: PID 
> '7394' started at 2018-01-15 17:35
> Mon Jan 15 17:35:23 2018 user.err ddns-scripts[7394]: dynv6_ipv6: Can not 
> detect local IP using network_get_ipaddr6
> 'wan_6' - Error: '1' - TERMINATE
> Mon Jan 15 17:35:23 2018 user.warn ddns-scripts[7394]: dynv6_ipv6: PID '7394' 
> exit WITH ERROR '1' at 2018-01-15 17:35
> 
> This is immediately after a sysupgrade. Restarting of the service brings it 
> back.
> 
> Ddns provider is dynv6.com.
> 
> Regards,
> Hartmut
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v1] dnsmasq: use SIGINT for dnssec time valid

2018-01-15 Thread Hans Dedecker
On Mon, Jan 15, 2018 at 1:45 PM, Kevin Darbyshire-Bryant
 wrote:
> Dnsmasq used SIGHUP to do too many things: 1) set dnssec time validation
> enabled, 2) bump SOA zone serial, 3) clear dns cache, 4) reload hosts
> files, 5) reload resolvers/servers files.
>
> Many subsystems within LEDE can send SIGHUP to dnsmasq: 1) ntpd hotplug
> (to indicate time is valid for dnssec) 2) odhcpd (to indicate a
> new/removed host - typically DHCPv6 leases) 3) procd on interface state
> changes 4) procd on system config state changes, 5) service reload.
>
> If dnssec time validation is enabled before the system clock has been
> set to a sensible time, name resolution will fail.  Because name
> resolution fails, ntpd is unable to resolve time server names to
> addresses, so is unable to set time.  Classic chicken/egg.
>
> Since commits 23bba9cb330cd298739a16e350b0029ed9429eef (service reload) &
> 4f02285d8b4a66359a8fa46f22a3efde391b5419 (system config)  make it more
> likely a SIGHUP will be sent for events other than 'ntpd has set time'
> it is more likely that an errant 'name resolution is failing for
> everything' situation will be encountered.
>
> Fortunately the upstream dnsmasq people agree and have moved 'check
> dnssec timestamp enable' from SIGHUP handler to SIGINT.
>
> Backport the upstream patch to use SIGINT.
> ntpd hotplug script updated to use SIGINT.
>
> Signed-off-by: Kevin Darbyshire-Bryant 
> ---
>  package/network/services/dnsmasq/Makefile  |   2 +-
>  .../services/dnsmasq/files/dnsmasqsec.hotplug  |   2 +-
>  .../dnsmasq/patches/260-dnssec-SIGINT.patch| 120 
> +
>  3 files changed, 122 insertions(+), 2 deletions(-)
>  create mode 100644 
> package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch
>
> diff --git a/package/network/services/dnsmasq/Makefile 
> b/package/network/services/dnsmasq/Makefile
> index c6d2739f03..1224ad86f8 100644
> --- a/package/network/services/dnsmasq/Makefile
> +++ b/package/network/services/dnsmasq/Makefile
> @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
>
>  PKG_NAME:=dnsmasq
>  PKG_VERSION:=2.78
> -PKG_RELEASE:=7
> +PKG_RELEASE:=8
>
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>  PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/
> diff --git a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug 
> b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
> index a155eb0f6e..781d533734 100644
> --- a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
> +++ b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
> @@ -9,6 +9,6 @@ TIMEVALIDFILE="/var/state/dnsmasqsec"
>  [ -f "$TIMEVALIDFILE" ] || {
> echo "ntpd says time is valid" >$TIMEVALIDFILE
> /etc/init.d/dnsmasq enabled && {
> -   procd_send_signal dnsmasq
> +   procd_send_signal dnsmasq '*' INT
> }
>  }
> diff --git a/package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch 
> b/package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch
> new file mode 100644
> index 00..e280142f75
> --- /dev/null
> +++ b/package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch
> @@ -0,0 +1,120 @@
> +From 3c973ad92d317df736d5a8fde67baba6b102d91e Mon Sep 17 00:00:00 2001
> +From: Simon Kelley 
> +Date: Sun, 14 Jan 2018 21:05:37 +
> +Subject: [PATCH] Use SIGINT (instead of overloading SIGHUP) to turn on DNSSEC
> + time validation.
> +
> +---
> + src/dnsmasq.c |   36 +---
> + src/dnsmasq.h |1 +
> + src/helper.c  |3 ++-
> + 5 files changed, 38 insertions(+), 14 deletions(-)
> +
> +--- a/src/dnsmasq.c
>  b/src/dnsmasq.c
> +@@ -137,7 +137,8 @@ int main (int argc, char **argv)
> +   sigaction(SIGTERM, , NULL);
> +   sigaction(SIGALRM, , NULL);
> +   sigaction(SIGCHLD, , NULL);
> +-
> ++  sigaction(SIGINT, , NULL);
> ++
> +   /* ignore SIGPIPE */
> +   sigact.sa_handler = SIG_IGN;
> +   sigaction(SIGPIPE, , NULL);
> +@@ -815,7 +816,7 @@ int main (int argc, char **argv)
> +
> +   daemon->dnssec_no_time_check = option_bool(OPT_DNSSEC_TIME);
> +   if (option_bool(OPT_DNSSEC_TIME) && !daemon->back_to_the_future)
> +-  my_syslog(LOG_INFO, _("DNSSEC signature timestamps not checked until 
> first cache reload"));
> ++  my_syslog(LOG_INFO, _("DNSSEC signature timestamps not checked until 
> receipt of SIGINT"));
> +
> +   if (rc == 1)
> +   my_syslog(LOG_INFO, _("DNSSEC signature timestamps not checked until 
> system time valid"));
> +@@ -1142,7 +1143,7 @@ static void sig_handler(int sig)
> + {
> +   /* ignore anything other than TERM during startup
> +and in helper proc. (helper ignore TERM too) */
> +-  if (sig == SIGTERM)
> ++  if (sig == SIGTERM || sig == SIGINT)
> +   exit(EC_MISC);
> + }
> +   else if (pid != getpid())
> +@@ -1168,6 +1169,15 @@ static void sig_handler(int sig)
> +   event = EVENT_DUMP;
> +   

Re: [LEDE-DEV] [PATCH] mt7621: Add back CONFIG_SCHED_HRTICK to kernel config

2018-01-15 Thread Mathias Kresin

15.01.2018 21:09, Rosen Penev:

Fixes FS #1242.

The way I figured this out was by using diff on config-4.4 from 17.01
and config-4.9 from trunk. First I removed CONFIG options. That did not work.
Then I started adding. This one seems to do the trick.

The issue is that anything in /dev/sdX starts returning bad data when read.
PCIe or USB does not matter. I have not tested NVME since I lack the hardware.
/dev/mtdblockX may or may not be impacted. No idea.

Signed-off-by: Rosen Penev 
---
  target/linux/ramips/mt7621/config-4.9 | 1 +
  1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/mt7621/config-4.9 
b/target/linux/ramips/mt7621/config-4.9
index f9765ed..0ea6798 100644
--- a/target/linux/ramips/mt7621/config-4.9
+++ b/target/linux/ramips/mt7621/config-4.9
@@ -233,6 +233,7 @@ CONFIG_RTC_CLASS=y
  CONFIG_RTC_DRV_PCF8563=y
  CONFIG_RTC_I2C_AND_SPI=y
  CONFIG_RTC_MC146818_LIB=y
+CONFIG_SCHED_HRTICK=y
  # CONFIG_SCHED_INFO is not set
  CONFIG_SCHED_SMT=y
  # CONFIG_SCSI_DMA is not set


What ever the root cause of your issue is, it isn't CONFIG_SCHED_HRTICK 
since it is already enabled for mt7621:


$ git grep CONFIG_SCHED_HRTICK
target/linux/gemini/config-4.4:# CONFIG_SCHED_HRTICK is not set
target/linux/generic/config-4.14:CONFIG_SCHED_HRTICK=y
target/linux/generic/config-4.4:CONFIG_SCHED_HRTICK=y
target/linux/generic/config-4.9:CONFIG_SCHED_HRTICK=y
target/linux/mcs814x/config-3.18:# CONFIG_SCHED_HRTICK is not set
target/linux/omap24xx/config-4.1:CONFIG_SCHED_HRTICK=y
target/linux/ppc40x/config-3.18:CONFIG_SCHED_HRTICK=y
target/linux/ppc44x/config-3.18:CONFIG_SCHED_HRTICK=y
target/linux/rb532/config-4.9:# CONFIG_SCHED_HRTICK is not set

For further patches, please explain in the commit message why the change 
fixes the issue and move the not commit message related text below the 
tear line.


Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] mt7621: Add back CONFIG_SCHED_HRTICK to kernel config

2018-01-15 Thread Mathias Kresin

15.01.2018 22:30, Rosen Penev:

It is defined in generic yes. From discussions on IRC, the issue may
be related to something else. I will do further testing to see whether
or not this is correct. Should take me another week or so...

I still have no idea why in 17.01 CONIG_SCHED_HRTICK is defined in
generic and in a bunch of architectures whereas it;'s only defined in
trunk in generic.


It is as simple as the 17.01 (sub)target kernel configs weren't updated 
at some point. A 'make kernel_menuconfig CONFIG_TARGET=subtarget' will 
drop the redundant kernel config symbol from the 17.01 (sub)target 
configs as well.


Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] ar71xx: mach-rbspi: simplify reset button registration

2018-01-15 Thread Gabor Juhos
The setup code defines four individual structures for the
Reset buttons of the supported boards. The only difference
between the definitions is the GPIO number used for the
button.

Replace the different structures with one generic variant,
and add a helper function to simplify the button registration.

Signed-off-by: Gabor Juhos 
---
 .../ar71xx/files/arch/mips/ath79/mach-rbspi.c  | 94 +++---
 1 file changed, 30 insertions(+), 64 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
index 8d8dd40e8a..0c827ed566 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c
@@ -137,40 +137,17 @@ static struct flash_platform_data rbspi_spi_flash_data = {
.nr_parts = ARRAY_SIZE(rbspi_spi_partitions),
 };
 
-/* Several boards only have a single reset button, wired to GPIO 1, 16 or 20 */
-#define RBSPI_GPIO_BTN_RESET01 1
-#define RBSPI_GPIO_BTN_RESET16 16
-#define RBSPI_GPIO_BTN_RESET20 20
-
-static struct gpio_keys_button rbspi_gpio_keys_reset01[] __initdata = {
-   {
-   .desc = "Reset button",
-   .type = EV_KEY,
-   .code = KEY_RESTART,
-   .debounce_interval = RBSPI_KEYS_DEBOUNCE_INTERVAL,
-   .gpio = RBSPI_GPIO_BTN_RESET01,
-   .active_low = 1,
-   },
-};
-
-static struct gpio_keys_button rbspi_gpio_keys_reset16[] __initdata = {
-   {
-   .desc = "Reset button",
-   .type = EV_KEY,
-   .code = KEY_RESTART,
-   .debounce_interval = RBSPI_KEYS_DEBOUNCE_INTERVAL,
-   .gpio = RBSPI_GPIO_BTN_RESET16,
-   .active_low = 1,
-   },
-};
-
-static struct gpio_keys_button rbspi_gpio_keys_reset20[] __initdata = {
+/*
+ * Several boards only have a single reset button, use a common
+ * structure for that.
+ */
+static struct gpio_keys_button rbspi_gpio_keys_reset[] __initdata = {
{
.desc = "Reset button",
.type = EV_KEY,
.code = KEY_RESTART,
.debounce_interval = RBSPI_KEYS_DEBOUNCE_INTERVAL,
-   .gpio = RBSPI_GPIO_BTN_RESET20,
+   .gpio = -ENOENT, /* filled dynamically */
.active_low = 1,
},
 };
@@ -180,6 +157,7 @@ static struct gpio_keys_button rbspi_gpio_keys_reset20[] 
__initdata = {
 #define RBMAPL_GPIO_LED_USER   14
 #define RBMAPL_GPIO_LED_ETH4
 #define RBMAPL_GPIO_LED_WLAN   11
+#define RBMAPL_GPIO_BTN_RESET  16
 
 static struct gpio_led rbmapl_leds[] __initdata = {
{
@@ -204,6 +182,8 @@ static struct gpio_led rbmapl_leds[] __initdata = {
 
 /* RB 941L-2nD gpios */
 #define RBHAPL_GPIO_LED_USER   14
+#define RBHAPL_GPIO_BTN_RESET  16
+
 static struct gpio_led rbhapl_leds[] __initdata = {
{
.name = "rb:green:user",
@@ -228,6 +208,7 @@ static struct gpio_led rbhapl_leds[] __initdata = {
 #define RB952_GPIO_LED_USER4
 #define RB952_GPIO_POE_POWER   14
 #define RB952_GPIO_POE_STATUS  12
+#define RB952_GPIO_BTN_RESET   16
 #define RB952_GPIO_USB_POWER   RBSPI_SSR_GPIO(RB952_SSR_BIT_USB_POWER)
 #define RB952_GPIO_LED_LAN1RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN1)
 #define RB952_GPIO_LED_LAN2RBSPI_SSR_GPIO(RB952_SSR_BIT_LED_LAN2)
@@ -274,6 +255,7 @@ static struct gpio_led rb952_leds[] __initdata = {
 #define RB962_GPIO_POE_POWER   3
 #define RB962_GPIO_LED_USER12
 #define RB962_GPIO_USB_POWER   13
+#define RB962_GPIO_BTN_RESET   20
 
 static struct gpio_led rb962_leds_gpio[] __initdata = {
{
@@ -348,6 +330,7 @@ static struct mdio_board_info rb962_mdio0_info[] = {
 /* RB wAP-2nD gpios */
 #define RBWAP_GPIO_LED_USER14
 #define RBWAP_GPIO_LED_WLAN11
+#define RBWAP_GPIO_BTN_RESET   16
 
 static struct gpio_led rbwap_leds[] __initdata = {
{
@@ -396,6 +379,7 @@ static struct gpio_led rbcap_leds[] __initdata = {
 #define RBMAP_SSR_BIT_LED_WLAN 4
 #define RBMAP_SSR_BIT_USB_POWER5
 #define RBMAP_SSR_BIT_LED_APCAP6
+#define RBMAP_GPIO_BTN_RESET   16
 #define RBMAP_GPIO_SSR_CS  11
 #define RBMAP_GPIO_LED_POWER   4
 #define RBMAP_GPIO_POE_POWER   14
@@ -489,22 +473,12 @@ static struct gpio_led rblhg_leds[] __initdata = {
},
 };
 
-static struct gpio_keys_button rblhg_gpio_keys[] __initdata = {
-   {
-   .desc = "Reset button",
-   .type = EV_KEY,
-   .code = KEY_RESTART,
-   .debounce_interval = RBSPI_KEYS_DEBOUNCE_INTERVAL,
-   .gpio = RBLHG_GPIO_BTN_RESET,
-   .active_low = 1,
-   },
-};
-
 /* RB w APG-5HacT2HnD (wAP AC) gpios*/
 #define RBWAPGSC_LED1  1
 #define RBWAPGSC_LED2  8
 #define RBWAPGSC_LED3  9
 #define RBWAPGSC_POWERLED  16
+#define RBWAPGSC_GPIO_BTN_RESET1
 #define RBWAPGSC_GPIO_MDIO_MDC 12
 #define 

Re: [LEDE-DEV] [OpenWrt-Devel] owrt landing page

2018-01-15 Thread Paul Oranje
A practica;l note on the style differences.
The white LEDE style is very clearly different from the darkish OpenWrt style: 
one does notice very easily which version of the wiki (and other stuff as well) 
one sees.

A good reason to maintain the visual different styles for the near future.
Paul

p.s.
And personally I like the light style better as it looks less crowded.


> Op 14 jan. 2018, om 18:39 heeft Thomas Endt  het volgende 
> geschreven:
> 
> FYI - LEDE wiki styling updated
> 
> - Sidebar background added
> - Sidebar fontsize increased
> 
> --> https://lede-project.org/_media/wiki/ledewiki-owrtstyling2.jpg
> 
> Of course, sidebar content to be adapted to OpenWrt i/o LEDE, but apart from 
> that: Can we go live with that styling?
> 
> Thomas
> 
>> -Ursprüngliche Nachricht-
>> Von: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] Im Auftrag
>> von Alberto Bursi
>> Gesendet: Donnerstag, 11. Januar 2018 19:54
>> An: lede-dev@lists.infradead.org
>> Betreff: Re: [LEDE-DEV] [OpenWrt-Devel] owrt landing page
>> 
>> 1) sidebar
>> 
>> I think it should have some background to make it readable, and
>> possible a slight font increase.
>> 
>> 
>> 2)  logo
>> 
>> see [1] for the thread about the logo. Nothing was decided.
>> 
>> I personally agree that having one of the logos from there would be
>> great, we'd need to ask the developers/project owners for a vote on
>> this
>> as the logo is their own decision to make.
>> 
>> This will probably take months, so for now just use the current logo.
>> 
>> 3) my idea was to move in a "legacy" section only the parts the current
>> LEDE wiki already has (and are the up-to-date ones), while all other
>> stuff that does not have an equivalent is just added as-is to the
>> current wiki (just linked in the right place).
>> 
>> 
>> 
>> 1. http://lists.infradead.org/pipermail/lede-dev/2017-May/007783.html
>> 
>> -Alberto
>> 
>> 
>> On 01/10/2018 10:56 PM, Thomas Endt wrote:
>>> Hi John,
>>> 
>>> First results on a private demowiki, see: https://lede-
>> project.org/_media/wiki/ledewiki-owrtstyling.jpg
>>> 
>>> 1) red marking: What are we going to do with the sidebar (raw,
>> untouched styling; could be beautified)? Keep or remove?
>>> 2) blue marking: I remember there was some discussion about a new,
>> fresh logo.
>>>I think now with the move to the LEDE codebase is the right time
>> to refresh the wiki a bit too.
>>>Does anybody remember where that discussion happened and what the
>> outcome was?
>>> 3) I changed my mind regarding hard cut. The OpenWrt wiki is still
>> rw, and we should keep it that way until we have a plan on how to
>> accomplish the actual merge of the wikis.
>>> 
>>> 
>>> Thomas
>>> 
 -Ursprüngliche Nachricht-
 Von: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
>> Im
 Auftrag von Thomas Endt
 Gesendet: Samstag, 6. Januar 2018 18:06
 An: 'John Crispin'; 'LEDE Development List'; 'LEDE Project
 Administration'; 'OpenWrt Development List'
 Betreff: Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page
 
 Hi John,
 
 Since the styling is based on CSS, we would need the OpenWrt wiki's
>> CSS
 for that. Once we have that, it will be relatively easy.
 But instead of doing the merge of the wikis step by step, I would
 suggest a hard cut.
 
 1.) Make OpenWrt wiki read only -> I can do that or Imre
 2.) Create .tgz of OpenWrt wiki and hand it over to LEDE wiki admins
>> ->
 Imre
 3.) Move LEDE wiki to OpenWrt styling (apply OpenWrt theme and CSS
>> to
 LEDE
 wiki) -> I can do that. Some help of CSS experienced guys could be
 necessary for hard cases.
 4.) Move content of old OpenWrt wiki to new OpenWrt wiki (former
>> LEDE)
 -> I can take the toh part (devicepages); dataentries will be
>> taken
 from LEDE since they are way more up to date and contain more
 datafields.
 -> Rest of the wiki: A plan needs to be worked out what will be
 carried over from old to new OpenWrt wiki -> Community discussion
 
 I'm in the starting blocks since weeks, waiting only for the GO and
>> the
 OpenWrt wiki sources, and I'm sure, we will have some helping heands
 ready to start the wiki merge.
 
 Thomas
 
> -Ursprüngliche Nachricht-
> Von: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] Im
 Auftrag
> von John Crispin
> Gesendet: Freitag, 5. Januar 2018 18:54
> An: LEDE Development List; LEDE Project Administration; OpenWrt
> Development List
> Betreff: [LEDE-DEV] owrt landing page
> 
> Hi,
> 
> could someone please help us with rebranding the lede landing page
>> to
> an openwrt colour/theme ? i would like to see this swithced over
> within the next 7 days.
> 
> John
>>> 
>>> ___
>>> Lede-dev mailing list
>>> Lede-dev@lists.infradead.org
>>> 

[LEDE-DEV] [PATCH] ar71xx: fix format of the 701-MIPS-ath79-add-routerboard-detection patches

2018-01-15 Thread Gabor Juhos
Commit e15c63a37574 ("ar71xx: add support for MikroTik RouterBOARD wAP
G-5HacT2HnD (wAP AC") broke the format of the patches. In unified diff
format, the unchanged, contextual lines must be preceded by a space
character.

Refresh the patches with quilt to fix them.

Fixes: e15c63a37574 ("ar71xx: add support for MikroTik RouterBOARD 
wAPG-5HacT2HnD (wAP AC")
Signed-off-by: Gabor Juhos 
---
 .../ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch   | 2 +-
 .../ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
 
b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
index 1d9d761d71..625bb19ba5 100644
--- 
a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
+++ 
b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch
@@ -29,5 +29,5 @@
 +  strstr(arcs_cmdline, "board=922gs"))
 +  ath79_prom_append_cmdline("console", "ttyS0,115200");
  }
-
+ 
  void __init prom_free_prom_memory(void)
diff --git 
a/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch
 
b/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch
index 1d9d761d71..625bb19ba5 100644
--- 
a/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch
+++ 
b/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch
@@ -29,5 +29,5 @@
 +  strstr(arcs_cmdline, "board=922gs"))
 +  ath79_prom_append_cmdline("console", "ttyS0,115200");
  }
-
+ 
  void __init prom_free_prom_memory(void)
-- 
2.14.3

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v1] dnsmasq: use SIGINT for dnssec time valid

2018-01-15 Thread Kevin Darbyshire-Bryant
Dnsmasq used SIGHUP to do too many things: 1) set dnssec time validation
enabled, 2) bump SOA zone serial, 3) clear dns cache, 4) reload hosts
files, 5) reload resolvers/servers files.

Many subsystems within LEDE can send SIGHUP to dnsmasq: 1) ntpd hotplug
(to indicate time is valid for dnssec) 2) odhcpd (to indicate a
new/removed host - typically DHCPv6 leases) 3) procd on interface state
changes 4) procd on system config state changes, 5) service reload.

If dnssec time validation is enabled before the system clock has been
set to a sensible time, name resolution will fail.  Because name
resolution fails, ntpd is unable to resolve time server names to
addresses, so is unable to set time.  Classic chicken/egg.

Since commits 23bba9cb330cd298739a16e350b0029ed9429eef (service reload) &
4f02285d8b4a66359a8fa46f22a3efde391b5419 (system config)  make it more
likely a SIGHUP will be sent for events other than 'ntpd has set time'
it is more likely that an errant 'name resolution is failing for
everything' situation will be encountered.

Fortunately the upstream dnsmasq people agree and have moved 'check
dnssec timestamp enable' from SIGHUP handler to SIGINT.

Backport the upstream patch to use SIGINT.
ntpd hotplug script updated to use SIGINT.

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/services/dnsmasq/Makefile  |   2 +-
 .../services/dnsmasq/files/dnsmasqsec.hotplug  |   2 +-
 .../dnsmasq/patches/260-dnssec-SIGINT.patch| 120 +
 3 files changed, 122 insertions(+), 2 deletions(-)
 create mode 100644 
package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch

diff --git a/package/network/services/dnsmasq/Makefile 
b/package/network/services/dnsmasq/Makefile
index c6d2739f03..1224ad86f8 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.78
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/
diff --git a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug 
b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
index a155eb0f6e..781d533734 100644
--- a/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
+++ b/package/network/services/dnsmasq/files/dnsmasqsec.hotplug
@@ -9,6 +9,6 @@ TIMEVALIDFILE="/var/state/dnsmasqsec"
 [ -f "$TIMEVALIDFILE" ] || {
echo "ntpd says time is valid" >$TIMEVALIDFILE
/etc/init.d/dnsmasq enabled && {
-   procd_send_signal dnsmasq
+   procd_send_signal dnsmasq '*' INT
}
 }
diff --git a/package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch 
b/package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch
new file mode 100644
index 00..e280142f75
--- /dev/null
+++ b/package/network/services/dnsmasq/patches/260-dnssec-SIGINT.patch
@@ -0,0 +1,120 @@
+From 3c973ad92d317df736d5a8fde67baba6b102d91e Mon Sep 17 00:00:00 2001
+From: Simon Kelley 
+Date: Sun, 14 Jan 2018 21:05:37 +
+Subject: [PATCH] Use SIGINT (instead of overloading SIGHUP) to turn on DNSSEC
+ time validation.
+
+---
+ src/dnsmasq.c |   36 +---
+ src/dnsmasq.h |1 +
+ src/helper.c  |3 ++-
+ 5 files changed, 38 insertions(+), 14 deletions(-)
+
+--- a/src/dnsmasq.c
 b/src/dnsmasq.c
+@@ -137,7 +137,8 @@ int main (int argc, char **argv)
+   sigaction(SIGTERM, , NULL);
+   sigaction(SIGALRM, , NULL);
+   sigaction(SIGCHLD, , NULL);
+-
++  sigaction(SIGINT, , NULL);
++  
+   /* ignore SIGPIPE */
+   sigact.sa_handler = SIG_IGN;
+   sigaction(SIGPIPE, , NULL);
+@@ -815,7 +816,7 @@ int main (int argc, char **argv)
+   
+   daemon->dnssec_no_time_check = option_bool(OPT_DNSSEC_TIME);
+   if (option_bool(OPT_DNSSEC_TIME) && !daemon->back_to_the_future)
+-  my_syslog(LOG_INFO, _("DNSSEC signature timestamps not checked until 
first cache reload"));
++  my_syslog(LOG_INFO, _("DNSSEC signature timestamps not checked until 
receipt of SIGINT"));
+   
+   if (rc == 1)
+   my_syslog(LOG_INFO, _("DNSSEC signature timestamps not checked until 
system time valid"));
+@@ -1142,7 +1143,7 @@ static void sig_handler(int sig)
+ {
+   /* ignore anything other than TERM during startup
+and in helper proc. (helper ignore TERM too) */
+-  if (sig == SIGTERM)
++  if (sig == SIGTERM || sig == SIGINT)
+   exit(EC_MISC);
+ }
+   else if (pid != getpid())
+@@ -1168,6 +1169,15 @@ static void sig_handler(int sig)
+   event = EVENT_DUMP;
+   else if (sig == SIGUSR2)
+   event = EVENT_REOPEN;
++  else if (sig == SIGINT)
++  {
++/* Handle SIGINT normally in debug mode, so
++   ctrl-c continues to operate. */
++if (option_bool(OPT_DEBUG))
++  exit(EC_MISC);
++else
++  event =