Re: [OpenWrt-Devel] logd
yes, you should stop the loop before the test, otherwise you will see small variations John On 29/03/2014 04:59, Catalin Patulea wrote: Looks ok here: root@mat:~# uname -a Linux mat 3.10.34 #3 Fri Mar 28 23:39:15 EDT 2014 mips GNU/Linux root@mat:~# cat /etc/openwrt_version r40296 root@mat:~# uci show system.@system[-1].log_size system.cfg02e48a.log_size=1024 root@mat:~# logread | wc 6243 49984 1117225 root@mat:~# logread | wc 6243 49984 1117225 root@mat:~# logread | wc 6243 49984 1117225 root@mat:~# logread | wc 6243 49984 1117225 root@mat:~# logread | wc 6243 49984 1117225 This is after stopping 'while :; do logger; done', right? With the loop running, there is some small variance in the number of lines (+/- 40 lines), I'm guessing due to logread catching logd at various stages of garbage collecting old entries in the ring buffer? On Thu, Mar 27, 2014 at 9:46 AM, John Crispin j...@phrozen.org wrote: Hi, r40295 should fix #15357 Can someone try to verify that it is indeed fixed now ? below are my test results John root@OpenWrt:/# uci show system.@system[-1].log_size system.cfg02e48a.log_size=1024 root@OpenWrt:/# while true; do logger foo;done root@OpenWrt:/# logread a root@OpenWrt:/# ls -la a -rw-r--r--1 root root 1116960 Mar 27 12:12 a root@OpenWrt:/# logread b root@OpenWrt:/# ls -la b -rw-r--r-- 1 root root 1116960 Mar 27 12:12 b root@OpenWrt:/# logread | wc -l 6240 root@OpenWrt:/# logread | wc -l 6240 root@OpenWrt:/# logread | wc -l 6240 root@OpenWrt:/# logread | wc -l 6240 root@OpenWrt:/# logread | wc -l 6240 root@OpenWrt:/# ___ 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
Re: [OpenWrt-Devel] is anybody working on supporting Linksys WRT1900ac ?
On 28/03/2014 22:08, Catalin Patulea wrote: Maybe that's why core OpenWRT devs haven't been merging patches for over a month. what a pile if bullshit you are talking ... ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] BT Home Hub 2B support - nand driver patch (for comment only)
Hi, finally had time to test this. i will merge antonios patch for now, it fixes the basi nand vs pcie issue. i will look at the bthh2 issue afterwards. John On 22/01/2014 01:01, Luka Perkov wrote: On Tue, Jan 21, 2014 at 08:50:03PM +0100, Ben Mulvihill wrote: Any enlightenment you can provide will be gratefully received. I have not tested this patch yet but it could be related to your problem... Luka From ad77bb90cbebcd107e81722e1fbdcff91fe55614 Mon Sep 17 00:00:00 2001 From: Antonios Vamporakis a...@area128.com Date: Sun, 29 Dec 2013 23:40:15 +0100 Subject: [PATCH 03/14] lantiq: resolve EBU conflict between NAND and PCI Stop PCI IRQs from taking over the EBU wile NAND is accessed. Signed-off-by: Antonios Vamporakis a...@area128.com --- .../0203-xway-fix-nand-pci-conflict.patch | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch diff --git a/target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch b/target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch new file mode 100644 index 000..f4b5793 --- /dev/null +++ b/target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch @@ -0,0 +1,19 @@ +--- a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c +@@ -80,13 +80,16 @@ static void xway_reset_chip(struct nand_ + + static void xway_select_chip(struct mtd_info *mtd, int chip) + { ++static unsigned long csflags; + + switch (chip) { + case -1: + ltq_ebu_w32_mask(NAND_CON_CE, 0, EBU_NAND_CON); + ltq_ebu_w32_mask(NAND_CON_NANDM, 0, EBU_NAND_CON); ++spin_unlock_irqrestore(ebu_lock, csflags); + break; + case 0: ++spin_lock_irqsave(ebu_lock, csflags); + ltq_ebu_w32_mask(0, NAND_CON_NANDM, EBU_NAND_CON); + ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON); + break; ___ 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
[OpenWrt-Devel] [PATCH] ar71xx: add comments for image Makefile.
Signed-off-by: Yousong Zhou yszhou4t...@gmail.com --- target/linux/ar71xx/image/Makefile | 50 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 6e0ffe0..4fca1c3 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -13,6 +13,8 @@ JFFS2_BLOCKSIZE = 64k 128k 256k rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1))) +# $(1): rootfs type. +# $(2): board name. define imgname $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(call rootfs_type,$(1)) endef @@ -41,13 +43,23 @@ endef SINGLE_PROFILES:= +# $(1) : name of image build method to be used, e.g., TPLINK-LZMA, AthLzma. +# $(2) : name of the build template to be used, e.g. 64k, 64kraw, 128k, etc. +# $(3) : name of the profile to be defined. +# $(4) : board name. +# $(5)~$(7) : arguments for $(mkcmdline) +# board=$(1) console=$(2),$(3) +# $(8)~$(12): extra arguments. define SingleProfile + # $(1): action name, e.g. loader, buildkernel, squashfs, etc. define Image/Build/Profile/$(3) $$(call Image/Build/Template/$(2)/$$(1),$(1),$(4),$$(call mkcmdline,$(5),$(6),$(7)),$(8),$(9),$(10),$(11),$(12)) endef SINGLE_PROFILES += $(3) endef +# $(1), name of the MultiProfile to be added. +# $(2), name of Profiles to be included in the MultiProfile. define MultiProfile define Image/Build/Profile/$(1) $(foreach p,$(2), @@ -62,6 +74,9 @@ KDIR_TMP:=$(KDIR)/tmp VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage +# $(1): input file. +# $(2): output file. +# $(3): extra arguments for lzma. define CompressLzma $(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(3) $(2) endef @@ -76,6 +91,10 @@ define PatchKernel/initramfs cp $(KDIR_TMP)/vmlinux-initramfs-$(1) $(call imgname,initramfs,$(1)).bin endef +# $(1): board name. +# $(2): kernel command line. +# $(3): extra argumetns for lzma. +# $(4): name suffix, e.g. -initramfs. define PatchKernelLzma cp $(KDIR)/vmlinux$(4) $(KDIR_TMP)/vmlinux$(4)-$(1) $(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR_TMP)/vmlinux$(4)-$(1) $(strip $(2)) @@ -89,12 +108,21 @@ define PatchKernelGzip endef ifneq ($(SUBTARGET),mikrotik) +# $(1): compression method of the data. +# $(2): extra arguments. +# $(3): input data file. +# $(4): output file. define MkuImage mkimage -A mips -O linux -T kernel -a 0x8006 -C $(1) $(2) \ -e 0x8006 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ -d $(3) $(4) endef +# $(1): board name. +# $(2): kernel command line. +# $(3): extra arguments for lzma. +# $(4): name suffix, e.g. -initramfs. +# $(5): extra arguments for mkimage. define MkuImageLzma $(call PatchKernelLzma,$(1),$(2),$(3),$(4)) $(call MkuImage,lzma,$(5),$(KDIR_TMP)/vmlinux$(4)-$(1).bin.lzma,$(KDIR_TMP)/vmlinux$(4)-$(1).uImage) @@ -120,7 +148,12 @@ define MkuImageOKLI endef endif +# $(1): name of the 1st file. +# $(3): name of the 2nd file. +# $(5): name of the output file. +# $(6): padding size. define CatFiles + # $(4): size limit of the output file. if [ $(2) -eq 0 ]; then \ filename=$(3); fstype={filename##*\.}; \ case {fstype} in \ @@ -141,6 +174,8 @@ define CatFiles echo Warning: $(5) is too big ( $(4) bytes) 2; \ rm -f $(5); \ fi; \ + # $(2): size limit of the 1st file. + # $(4): size limit of the 2nd file. else if [ $(2) -gt 262144 ]; then \ if [ `stat -c%s $(1)` -gt $(2) ]; then \ echo Warning: $(1) is too big ( $(2) bytes) 2; \ @@ -149,6 +184,8 @@ define CatFiles else \ ( dd if=$(1) bs=$(2) conv=sync; dd if=$(3) ) $(5); \ fi; fi; \ + # $(2): padding size for the 2nd file. + # $(4): size limit of the output file. else \ ( dd if=$(1) bs=$(2) conv=sync; dd if=$(3) ) $(5); \ if [ `stat -c%s $(5)` -gt $(4) ]; then \ @@ -158,6 +195,11 @@ define CatFiles fi; fi endef +# $(1): rootfs type. +# $(2): board name. +# $(3): kernel image size limit. +# $(4): rootfs image size limit. +# $(5): padding argument for padjffs2. Sysupgrade/KR=$(call CatFiles,$(2),$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(5))) Sysupgrade/KRuImage=$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(2)),$(5)) Sysupgrade/RKuImage=$(call CatFiles,$(KDIR)/root.$(1),$(4),$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(call sysupname,$(1),$(2))) @@ -875,7 +917,14 @@ define Jffs2Template endef endef +# $(1): template name to be defined. +# $(2): squashfs suffix to be used. +# $(3): jffs2 suffix to be used. define BuildTemplate + # $(1) : name of build
[OpenWrt-Devel] [PATCH] dropbear: add options SSHKeepAlive and IdleTimeout.
Without timeout mechanism, if ssh client disconnected without sending FIN or RST, forked dropbear servers would hang there for KEX_RETRY_TIMEOUT seconds (8 hours). TCP keepalive is not implemented in dropbear yet, thus the name SSHKeepAlive. 300 seconds in this patch is selected from the default value of ServerAliveInterval for Debian ssh client (See man ssh_config). Signed-off-by: Yousong Zhou yszhou4t...@gmail.com --- package/network/services/dropbear/Makefile |2 +- .../network/services/dropbear/files/dropbear.init |6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 02be761..27a2560 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dropbear PKG_VERSION:=2013.59 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init index ebef526..b913cf0 100755 --- a/package/network/services/dropbear/files/dropbear.init +++ b/package/network/services/dropbear/files/dropbear.init @@ -44,7 +44,9 @@ validate_section_dropbear() 'rsakeyfile:file' \ 'dsskeyfile:file' \ 'BannerFile:file' \ - 'Port:list(port):22' + 'Port:list(port):22' \ + 'SSHKeepAlive:uinteger:300' \ + 'IdleTimeout:uinteger:0' return $? } @@ -74,6 +76,8 @@ dropbear_instance() [ -n ${BannerFile} ] procd_append_param command -b ${BannerFile} [ -n ${interface} ] network_get_device interface ${interface} append_ports ${interface} ${Port} + [ ${IdleTimeout} -ne 0 ] procd_append_param command -I ${IdleTimeout} + [ ${SSHKeepAlive} -ne 0 ] procd_append_param command -K ${SSHKeepAlive} procd_close_instance } -- 1.7.2.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: backport BCM5357 fix for GPIOs
This backports: bcma: gpio: register 32 GPIOs on BCM5357 Signed-off-by: Rafał Miłecki zaj...@gmail.com --- .../linux/generic/patches-3.10/025-bcma_backport.patch | 15 --- .../linux/generic/patches-3.12/025-bcma_backport.patch | 15 --- .../linux/generic/patches-3.13/025-bcma_backport.patch | 15 --- .../linux/generic/patches-3.14/025-bcma_backport.patch | 18 ++ 4 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 target/linux/generic/patches-3.14/025-bcma_backport.patch diff --git a/target/linux/generic/patches-3.10/025-bcma_backport.patch b/target/linux/generic/patches-3.10/025-bcma_backport.patch index ca911cd..c3f7ffb 100644 --- a/target/linux/generic/patches-3.10/025-bcma_backport.patch +++ b/target/linux/generic/patches-3.10/025-bcma_backport.patch @@ -479,17 +479,26 @@ chip-label = bcma_gpio; chip-owner = THIS_MODULE; -@@ -95,7 +215,9 @@ int bcma_gpio_init(struct bcma_drv_cc *c +@@ -95,8 +215,17 @@ int bcma_gpio_init(struct bcma_drv_cc *c chip-set = bcma_gpio_set_value; chip-direction_input = bcma_gpio_direction_input; chip-direction_output = bcma_gpio_direction_output; +#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC) chip-to_irq= bcma_gpio_to_irq; +- chip-ngpio = 16; +#endif - chip-ngpio = 16; ++ switch (cc-core-bus-chipinfo.id) { ++ case BCMA_CHIP_ID_BCM5357: ++ chip-ngpio = 32; ++ break; ++ default: ++ chip-ngpio = 16; ++ } ++ /* There is just one SoC in one device and its GPIO addresses should be * deterministic to address them more easily. The other buses could get -@@ -105,10 +227,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c +* a random base number. */ +@@ -105,10 +234,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c else chip-base = -1; diff --git a/target/linux/generic/patches-3.12/025-bcma_backport.patch b/target/linux/generic/patches-3.12/025-bcma_backport.patch index 3e86f69..1b88dfd 100644 --- a/target/linux/generic/patches-3.12/025-bcma_backport.patch +++ b/target/linux/generic/patches-3.12/025-bcma_backport.patch @@ -198,17 +198,26 @@ chip-label = bcma_gpio; chip-owner = THIS_MODULE; -@@ -95,7 +215,9 @@ int bcma_gpio_init(struct bcma_drv_cc *c +@@ -95,8 +215,17 @@ int bcma_gpio_init(struct bcma_drv_cc *c chip-set = bcma_gpio_set_value; chip-direction_input = bcma_gpio_direction_input; chip-direction_output = bcma_gpio_direction_output; +#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC) chip-to_irq= bcma_gpio_to_irq; +- chip-ngpio = 16; +#endif - chip-ngpio = 16; ++ switch (cc-core-bus-chipinfo.id) { ++ case BCMA_CHIP_ID_BCM5357: ++ chip-ngpio = 32; ++ break; ++ default: ++ chip-ngpio = 16; ++ } ++ /* There is just one SoC in one device and its GPIO addresses should be * deterministic to address them more easily. The other buses could get -@@ -105,10 +227,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c +* a random base number. */ +@@ -105,10 +234,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c else chip-base = -1; diff --git a/target/linux/generic/patches-3.13/025-bcma_backport.patch b/target/linux/generic/patches-3.13/025-bcma_backport.patch index 3aad2a1..dcb712d 100644 --- a/target/linux/generic/patches-3.13/025-bcma_backport.patch +++ b/target/linux/generic/patches-3.13/025-bcma_backport.patch @@ -198,17 +198,26 @@ chip-label = bcma_gpio; chip-owner = THIS_MODULE; -@@ -95,7 +215,9 @@ int bcma_gpio_init(struct bcma_drv_cc *c +@@ -95,8 +215,17 @@ int bcma_gpio_init(struct bcma_drv_cc *c chip-set = bcma_gpio_set_value; chip-direction_input = bcma_gpio_direction_input; chip-direction_output = bcma_gpio_direction_output; +#if IS_BUILTIN(CONFIG_BCMA_HOST_SOC) chip-to_irq= bcma_gpio_to_irq; +- chip-ngpio = 16; +#endif - chip-ngpio = 16; ++ switch (cc-core-bus-chipinfo.id) { ++ case BCMA_CHIP_ID_BCM5357: ++ chip-ngpio = 32; ++ break; ++ default: ++ chip-ngpio = 16; ++ } ++ /* There is just one SoC in one device and its GPIO addresses should be * deterministic to address them more easily. The other buses could get -@@ -105,10 +227,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c +* a random base number. */ +@@ -105,10 +234,21 @@ int bcma_gpio_init(struct bcma_drv_cc *c else chip-base = -1; diff --git
[OpenWrt-Devel] what's the relation with dnsmasq and dhcp ?
hello everyone I made a very weird discover , when I disable dnsmasq service on router( perform /etc/init.d/dnsmasq disable on OpenWRT System) , all devices could not connect to my Router by dhcp. why ? it's very confused me , BR Alan.Hoo,Code Monkey MSFT ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] what's the relation with dnsmasq and dhcp ?
I made a very weird discover , when I disable dnsmasq service on router( perform /etc/init.d/dnsmasq disable on OpenWRT System) , all devices could not connect to my Router by dhcp. No wonder, as dnsmasq is the default dhcp server component in Openwrt. That is explained in the module's description: https://dev.openwrt.org/browser/trunk/package/network/services/dnsmasq/Makefile#L28 More info at: http://thekelleys.org.uk/dnsmasq/doc.html ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] what's the relation with dnsmasq and dhcp ?
Thank you!! you are powerful!! -Original Message- From: openwrt-devel-boun...@lists.openwrt.org [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of Hannu Nyman Sent: Saturday, March 29, 2014 7:13 PM To: openwrt-devel@lists.openwrt.org Subject: Re: [OpenWrt-Devel] what's the relation with dnsmasq and dhcp ? I made a very weird discover , when I disable dnsmasq service on router( perform /etc/init.d/dnsmasq disable on OpenWRT System) , all devices could not connect to my Router by dhcp. No wonder, as dnsmasq is the default dhcp server component in Openwrt. That is explained in the module's description: https://dev.openwrt.org/browser/trunk/package/network/services/dnsmasq/Makefile#L28 More info at: http://thekelleys.org.uk/dnsmasq/doc.html ___ 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
Re: [OpenWrt-Devel] BT Home Hub 2B support - nand driver patch (for comment only)
Hi John, Thanks for getting back to me. I was just about to write to ask whether you had had chance to look at it, because I have my other bthh2 patches more or less ready now. I'll submit a complete set once you have merged Antonio's patch. Ben On Sat, 2014-03-29 at 08:28 +0100, John Crispin wrote: Hi, finally had time to test this. i will merge antonios patch for now, it fixes the basi nand vs pcie issue. i will look at the bthh2 issue afterwards. John On 22/01/2014 01:01, Luka Perkov wrote: On Tue, Jan 21, 2014 at 08:50:03PM +0100, Ben Mulvihill wrote: Any enlightenment you can provide will be gratefully received. I have not tested this patch yet but it could be related to your problem... Luka From ad77bb90cbebcd107e81722e1fbdcff91fe55614 Mon Sep 17 00:00:00 2001 From: Antonios Vamporakis a...@area128.com Date: Sun, 29 Dec 2013 23:40:15 +0100 Subject: [PATCH 03/14] lantiq: resolve EBU conflict between NAND and PCI Stop PCI IRQs from taking over the EBU wile NAND is accessed. Signed-off-by: Antonios Vamporakis a...@area128.com --- .../0203-xway-fix-nand-pci-conflict.patch | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch diff --git a/target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch b/target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch new file mode 100644 index 000..f4b5793 --- /dev/null +++ b/target/linux/lantiq/patches-3.10/0203-xway-fix-nand-pci-conflict.patch @@ -0,0 +1,19 @@ +--- a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c +@@ -80,13 +80,16 @@ static void xway_reset_chip(struct nand_ + + static void xway_select_chip(struct mtd_info *mtd, int chip) + { ++ static unsigned long csflags; + + switch (chip) { + case -1: + ltq_ebu_w32_mask(NAND_CON_CE, 0, EBU_NAND_CON); + ltq_ebu_w32_mask(NAND_CON_NANDM, 0, EBU_NAND_CON); ++ spin_unlock_irqrestore(ebu_lock, csflags); + break; + case 0: ++ spin_lock_irqsave(ebu_lock, csflags); + ltq_ebu_w32_mask(0, NAND_CON_NANDM, EBU_NAND_CON); + ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON); + break; ___ 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
Re: [OpenWrt-Devel] [v3, 1/4] Add kernel support for Sagemcom F@ST2704V2 ADSL router
SO GUYS, MERGE PLOX? On 9 Nov 2013 18:42, Weedy weedy2...@gmail.com wrote: On Sat, Nov 9, 2013 at 2:54 PM, David Lang da...@lang.hm wrote: That doesn't slow down bitrot of the patches, that just works for one person's systems, for not. Is there something wrong with this series that is preventing it from being merged upstream? do you need people to report that they need it to get it review priority? do you need reports of it working for people? do you need someone to sponsor reviews of it? There are a lot of people out there who would like to run OpenWRT on their ADSL router (myself included), so I would think that there's interest in adding support for these sorts of devices. ^ This. Pretty much anyone getting upgraded to VDSL in Canada could want this. We don't have a real bridge mode with the stock firmware and this is ass. David Lang On Fri, 8 Nov 2013, Martijn Zilverschoon wrote: Well if you need this that badly, you can patch it yourself :) Checkout the git repository: git clone git://git.openwrt.org/openwrt.git download the patches and apply them to the local git repo. the command for that is: git apply 'example.patch' (make sure that you are in the openwrt directory) I think you have to apply 4 patches since this one is 1/4. Sorry for the earlier message that was incomplete. -Martijn 2013/11/8 Martijn Zilverschoon thefriedzom...@gmail.com: Well if you need this that badly, you can patch it yourself :) git clone git://git.openwrt.org/openwrt.git 2013/11/8 Weedy weedy2...@gmail.com: Can this pretty please not die to bitrot? I need this merged so badly ;_; On Thu, Oct 31, 2013 at 7:33 PM, Marcin Jurkowski marci...@gmail.com wrote: This adds kernel support support for Sagemcom F@st 2704 wireless ADSL router. It's a BCM6328-based 802.11n wireless router with USB port and ADSL2+ modem equipped with 64 MiB RAM and 8 MiB flash. --- .../brcm63xx/patches-3.10/536-board_fast2704.patch | 133 + 1 file changed, 133 insertions(+) create mode 100644 target/linux/brcm63xx/patches-3.10/536-board_fast2704.patch diff --git a/target/linux/brcm63xx/patches-3.10/536-board_ fast2704.patch b/target/linux/brcm63xx/patches-3.10/536-board_fast2704.patch new file mode 100644 index 000..db34932 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.10/536-board_fast2704.patch @@ -0,0 +1,133 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -1477,6 +1477,122 @@ static struct board_info __initdata boar + }, + }; + ++static struct board_info __initdata board_FAST2704V2 = { ++ .name = F@ST2704V2, ++ .expected_cpu_id= 0x6328, ++ ++ .has_uart0 = 1, ++ .has_pci= 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .has_usbd = 1, ++ ++ .has_enetsw = 1, ++ ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = Port 1, ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = Port 2, ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = Port 3, ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = Port 4, ++ }, ++ }, ++ }, ++ ++ .leds = { ++ /* front LEDs */ ++ { ++ .name = F@ST2704V2:green:power, ++ .gpio = 4, ++ .active_low = 1, ++ .default_trigger= default-on, ++ }, ++ { ++ .name = F@ST2704V2 :red:power, ++ .gpio = 5, ++ .active_low = 1, ++ }, ++ { ++ .name = F@ST2704V2 :red:inet, ++ .gpio = 2, ++ .active_low = 1, ++ }, ++ { ++ .name = F@ST2704V2 :green:dsl, ++ .gpio = 3, ++ .active_low = 1, ++ }, ++ { ++
Re: [OpenWrt-Devel] [PATCH] dropbear: update to 2014.63
On 2014-02-24 07:02, Catalin Patulea wrote: Upstream changelog: https://matt.ucc.asn.au/dropbear/CHANGES This adds elliptic curve cryptography (ECC) support as an option, disabled by default. dropbear mips 34kc uClibc binary size: before: 161,672 bytes after, without ECC (default): 164,968 after, with ECC: 198,008 Signed-off-by: Catalin Patulea c...@vv.carleton.ca Committed in r40297, thanks - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] dropbear: add options SSHKeepAlive and IdleTimeout.
On 2014-03-29 09:19, Yousong Zhou wrote: Without timeout mechanism, if ssh client disconnected without sending FIN or RST, forked dropbear servers would hang there for KEX_RETRY_TIMEOUT seconds (8 hours). TCP keepalive is not implemented in dropbear yet, thus the name SSHKeepAlive. 300 seconds in this patch is selected from the default value of ServerAliveInterval for Debian ssh client (See man ssh_config). Signed-off-by: Yousong Zhou yszhou4t...@gmail.com Rebased and committed in r40299 Thanks, - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [comgt] add support for defining dial number in config file
Do I need to improve anything to get commited? --- Luiz Angelo Daros de Luca, Me. luizl...@gmail.com 2014-03-17 18:13 GMT-03:00 luizl...@gmail.com: From: Luiz Angelo Daros de Luca luizl...@gmail.com Signed-off-by: Luiz Angelo Daros de Luca luizl...@gmail.com --- package/network/utils/comgt/Makefile | 2 +- package/network/utils/comgt/files/3g.chat | 2 +- package/network/utils/comgt/files/3g.sh | 9 - 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index 5324903..89a21be 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=comgt PKG_VERSION:=0.32 -PKG_RELEASE:=21 +PKG_RELEASE:=22 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/comgt diff --git a/package/network/utils/comgt/files/3g.chat b/package/network/utils/comgt/files/3g.chat index a1fa2a0..6656240 100644 --- a/package/network/utils/comgt/files/3g.chat +++ b/package/network/utils/comgt/files/3g.chat @@ -8,5 +8,5 @@ OK ATE1 OK 'AT+CGDCONT=1,IP,$USE_APN' SAY Calling UMTS/GPRS TIMEOUT 30 -OK ATD*99***1# +OK ATD$DIALNUMBER CONNECT ' ' diff --git a/package/network/utils/comgt/files/3g.sh b/package/network/utils/comgt/files/3g.sh index 2dc719b..deca2c9 100644 --- a/package/network/utils/comgt/files/3g.sh +++ b/package/network/utils/comgt/files/3g.sh @@ -13,6 +13,7 @@ proto_3g_init_config() { proto_config_add_string apn proto_config_add_string service proto_config_add_string pincode + proto_config_add_string dialnumber } proto_3g_setup() { @@ -23,6 +24,7 @@ proto_3g_setup() { json_get_var apn apn json_get_var service service json_get_var pincode pincode + json_get_var dialnumber dialnumber [ -e $device ] || { proto_set_available $interface 0 @@ -74,10 +76,15 @@ proto_3g_setup() { [ -n $SIERRA ] { gcom -d $device -s /etc/gcom/getcarrier.gcom || return 1 } + + if [ -z $dialnumber ]; then + dialnumber=*99***1# + fi + ;; esac - connect=${apn:+USE_APN=$apn }/usr/sbin/chat -t5 -v -E -f $chat + connect=${apn:+USE_APN=$apn }DIALNUMBER=$dialnumber /usr/sbin/chat -t5 -v -E -f $chat ppp_generic_setup $interface \ noaccomp \ nopcomp \ -- 1.8.4.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] is anybody working on supporting Linksys WRT1900ac ?
Sorry, my comment was out of line. On Sat, Mar 29, 2014 at 2:49 AM, John Crispin j...@phrozen.org wrote: On 28/03/2014 22:08, Catalin Patulea wrote: Maybe that's why core OpenWRT devs haven't been merging patches for over a month. what a pile if bullshit you are talking ... ___ 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
[OpenWrt-Devel] [RFC PATCH] Getting more eyeballs on a better QoS system
CeroWrt has been working on a better fq_codel based QoS/AQM/packet scheduler system for eliminating bufferbloat on DSL devices and cable modems for quite some time now. I'd like it if it - or the ideas in it - made it into openwrt eventually - But: I'd rather like to get more eyeballs on it and feedback on how to improve it further. In particular, we are limited in CeroWrt to an aging wndr3800 based device, and run out of CPU rate limiting to about 60Mbit. I'd love to get people with higher end hardware trying these packages to see what sorts of results can be obtained with connections running at 90mbit or higher. secondly the code could use some eyeballs as to general openwrt package compliance and coding standards. (sqm-scripts was not written, but evolved thirdly adding in more of the features that are in qos-scripts would be nice... Gui interface coming up in the next patch ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RFC PATCH] packages: Smart Queue Management for AQM Packet Scheduling and Qos from CeroWrt
From: Dave Taht dave.t...@bufferbloat.net This adds support for the bufferbloat project's Smart Queue Management (SQM) system, which improves over openwrt's qos-scripts in the following ways + Uses HTB with two models for managing traffic a simplest one that merely uses fq_codel, and a three tier one that does some basic and tunable packet prioritization. + Works with ipv6 and ipv4 correctly (unlike qos-scripts) + extensive support for fixing ADSL and PPOe framing problems + Partial support for key diffserv markings + highly tuned fq_codel implementation especially for low bandwidths + Tested heavily on cable modems and on dsl devices It is a disimprovement in that: - There are no built-in tricks for doing l7 classification, or other forms of packet inspection. - We haven't explored hfsc all that much, prefering to rely on the predictable behavior of htb + fq_codel for everything - And there is support for a few qdiscs that are not in the linux kernel mainline that remain experimental. --- net/sqm-scripts/Makefile | 48 +++ net/sqm-scripts/files/etc/config/sqm | 11 + net/sqm-scripts/files/etc/init.d/sqm | 23 ++ net/sqm-scripts/files/usr/lib/sqm/functions.sh | 335 net/sqm-scripts/files/usr/lib/sqm/run.sh | 67 net/sqm-scripts/files/usr/lib/sqm/simple.qos | 187 +++ net/sqm-scripts/files/usr/lib/sqm/simple.qos.help |1 + net/sqm-scripts/files/usr/lib/sqm/simplest.qos | 84 + .../files/usr/lib/sqm/simplest.qos.help|1 + net/sqm-scripts/files/usr/lib/sqm/stop.sh | 22 ++ 10 files changed, 779 insertions(+) create mode 100644 net/sqm-scripts/Makefile create mode 100644 net/sqm-scripts/files/etc/config/sqm create mode 100755 net/sqm-scripts/files/etc/init.d/sqm create mode 100644 net/sqm-scripts/files/usr/lib/sqm/functions.sh create mode 100755 net/sqm-scripts/files/usr/lib/sqm/run.sh create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simple.qos create mode 100644 net/sqm-scripts/files/usr/lib/sqm/simple.qos.help create mode 100755 net/sqm-scripts/files/usr/lib/sqm/simplest.qos create mode 100644 net/sqm-scripts/files/usr/lib/sqm/simplest.qos.help create mode 100755 net/sqm-scripts/files/usr/lib/sqm/stop.sh diff --git a/net/sqm-scripts/Makefile b/net/sqm-scripts/Makefile new file mode 100644 index 000..1c92354 --- /dev/null +++ b/net/sqm-scripts/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sqm-scripts +PKG_VERSION:=5 +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/sqm-scripts + SECTION:=net + CATEGORY:=Base system + DEPENDS:=+tc +kmod-sched +kmod-ifb +iptables +iptables-mod-filter +iptables-mod-ipopt +iptables-mod-conntrack-extra + TITLE:=SQM Scripts + PKGARCH:=all +endef + +define Package/sqm-scripts/description + A set of scripts that does simple SQM configuration. +endef + +define Package/sqm-scripts/conffiles +/etc/config/sqm +endef + +define Build/Prepare +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/sqm-scripts/install + $(INSTALL_DIR) $(1) + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,sqm-scripts)) diff --git a/net/sqm-scripts/files/etc/config/sqm b/net/sqm-scripts/files/etc/config/sqm new file mode 100644 index 000..547d321 --- /dev/null +++ b/net/sqm-scripts/files/etc/config/sqm @@ -0,0 +1,11 @@ + +config queue 'ge00' +option enabled '0' +option interface 'ge00' +option download '2' +option upload '4000' +option qdisc 'fq_codel' +option script 'simple.qos' +option qdisc_advanced '0' +option linklayer 'none' + diff --git a/net/sqm-scripts/files/etc/init.d/sqm b/net/sqm-scripts/files/etc/init.d/sqm new file mode 100755 index 000..70307a6 --- /dev/null +++ b/net/sqm-scripts/files/etc/init.d/sqm @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common + +START=50 + +reload() +{ +/usr/lib/sqm/run.sh +} + +restart() +{ +reload +} + +start() +{ +reload +} + +stop() +{ +/usr/lib/sqm/run.sh stop +} \ No newline at end of file diff --git a/net/sqm-scripts/files/usr/lib/sqm/functions.sh b/net/sqm-scripts/files/usr/lib/sqm/functions.sh new file mode 100644 index 000..576af6d --- /dev/null +++ b/net/sqm-scripts/files/usr/lib/sqm/functions.sh @@ -0,0 +1,335 @@ + +insmod() { + lsmod | grep -q ^$1 || $INSMOD $1 +} + +ipt() { + d=`echo $* | sed s/-A/-D/g` + [ $d != $* ] { + iptables $d /dev/null 21 + ip6tables $d /dev/null 21 + } + iptables $* /dev/null 21 + ip6tables $* /dev/null 21 +} + +do_modules() { + insmod act_ipt + insmod sch_$QDISC + insmod sch_ingress + insmod act_mirred +
[OpenWrt-Devel] [RFC PATCH] luci: Add cerowrt SQM qos aqm and packet scheduler gui
From: Dave Taht dave.t...@bufferbloat.net --- applications/luci-app-sqm/Makefile | 66 +++ applications/luci-app-sqm/files/sqm-cbi.lua| 195 applications/luci-app-sqm/files/sqm-controller.lua | 26 +++ applications/luci-app-sqm/files/uci-defaults-sqm | 12 ++ 4 files changed, 299 insertions(+) create mode 100644 applications/luci-app-sqm/Makefile create mode 100644 applications/luci-app-sqm/files/sqm-cbi.lua create mode 100644 applications/luci-app-sqm/files/sqm-controller.lua create mode 100755 applications/luci-app-sqm/files/uci-defaults-sqm diff --git a/applications/luci-app-sqm/Makefile b/applications/luci-app-sqm/Makefile new file mode 100644 index 000..6b3fb07 --- /dev/null +++ b/applications/luci-app-sqm/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=luci-app-sqm +PKG_VERSION:=2 +PKG_RELEASE:=1 +LUCI_DIR:=/usr/lib/lua/luci + +include $(INCLUDE_DIR)/package.mk + +define Package/luci-app-sqm + SECTION:=luci + CATEGORY:=LuCI + TITLE:=SQM script LuCI interface + MAINTAINER:=Toke Høiland-Jørgensen t...@toke.dk + PKGARCH:=all + DEPENDS:= lua luci-lib-core +sqm-scripts + SUBMENU:=3. Applications +endef + +define Package/luci-app-sqm/description + Control the simple_qos SQM script +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/luci-app-sqm/install + $(INSTALL_DIR) $(1)$(LUCI_DIR)/controller $(1)$(LUCI_DIR)/model/cbi + $(INSTALL_DATA) ./files/sqm-controller.lua $(1)$(LUCI_DIR)/controller/sqm.lua + $(INSTALL_DATA) ./files/sqm-cbi.lua $(1)$(LUCI_DIR)/model/cbi/sqm.lua + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/uci-defaults-sqm $(1)/etc/uci-defaults/luci-sqm +endef + +define Package/luci-app-sqm/postinst +#!/bin/sh +which uci /dev/null || exit 0 +uci -q get ucitrack.@sqm[0] /dev/null || { + uci add ucitrack sqm /dev/null + uci set ucitrack.@sqm[0].init=sqm + uci add_list ucitrack.@firewall[0].affects=sqm + uci commit +} +endef + +define Package/luci-app-sqm/postrm +#!/bin/sh +which uci /dev/null || exit 0 +uci -q get ucitrack.@sqm[0] /dev/null { + uci delete ucitrack.@sqm[0] + uci del_list ucitrack.@firewall[0].affects=sqm + uci commit +} +endef + +$(eval $(call BuildPackage,luci-app-sqm)) diff --git a/applications/luci-app-sqm/files/sqm-cbi.lua b/applications/luci-app-sqm/files/sqm-cbi.lua new file mode 100644 index 000..52885c0 --- /dev/null +++ b/applications/luci-app-sqm/files/sqm-cbi.lua @@ -0,0 +1,195 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth ste...@midlink.org + +Licensed under the Apache License, Version 2.0 (the License); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +local wa = require luci.tools.webadmin +local fs = require nixio.fs +local net = require luci.model.network.init() +local ifaces = net:get_interfaces() +local path = /usr/lib/sqm + +m = Map(sqm, translate(Smart Queue Management), + translate(With abbr title=\Smart Queue Management\SQM/abbr you .. + can enable traffic shaping, better mixing (Fair Queueing), .. +active queue length management (AQM) .. +and prioritisation on one .. + network interface.)) + +s = m:section(TypedSection, queue, translate(Queues)) +s:tab(tab_basic, translate(Basic Settings)) +s:tab(tab_qdisc, translate(Queue Discipline)) +s:tab(tab_linklayer, translate(Link Layer Adaptation)) +s.addremove = false -- set to true to allow adding SQM instances in the GUI +s.anonymous = true + +-- BASIC +e = s:taboption(tab_basic, Flag, enabled, translate(Enable)) +e.rmempty = false + +n = s:taboption(tab_basic, ListValue, interface, translate(Interface name)) +for _, iface in ipairs(ifaces) do + if iface:is_up() then + n:value(iface:name()) + end +end +n.rmempty = false + +dl = s:taboption(tab_basic, Value, download, translate(Download speed (kbit/s) (ingress):)) +dl.datatype = and(uinteger,min(0)) +dl.rmempty = false + +ul = s:taboption(tab_basic, Value, upload, translate(Upload speed (kbit/s) (egress):)) +ul.datatype = and(uinteger,min(0)) +ul.rmempty = false + +-- QDISC + +c = s:taboption(tab_qdisc, ListValue, qdisc, translate(Queueing discipline)) +c:value(fq_codel, fq_codel (..translate(default)..)) +c:value(efq_codel) +c:value(nfq_codel) +c:value(sfq) +c:value(codel) +c:value(ns2_codel) +c:value(pie) +c:value(sfq) +c.default = fq_codel +c.rmempty = false + +local qos_desc = +sc = s:taboption(tab_qdisc, ListValue, script, translate(Queue setup script)) +for file in fs.dir(path) do + if string.find(file, .qos$) then +sc:value(file) + end + if
[OpenWrt-Devel] [RFC PATCH] luci support for SQM gui
This adds gui support to the SQM-scripts patch ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] BCP38 support for home routers
This package implements enough functionality (we hope) to make implementing BCP38 in openwrt a snap. By default it comes with an implementation suitable for natted hosts. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] packages: BCP38 support for openwrt
From: Dave Taht dave.t...@bufferbloat.net This adds firewall support for blocking common invalid address ranges, using ipset. --- net/bcp38/Makefile | 63 ++ net/bcp38/files/bcp38.config | 22 + net/bcp38/files/bcp38.defaults | 13 ++ net/bcp38/files/run.sh | 96 4 files changed, 194 insertions(+) create mode 100644 net/bcp38/Makefile create mode 100644 net/bcp38/files/bcp38.config create mode 100644 net/bcp38/files/bcp38.defaults create mode 100755 net/bcp38/files/run.sh diff --git a/net/bcp38/Makefile b/net/bcp38/Makefile new file mode 100644 index 000..d777e13 --- /dev/null +++ b/net/bcp38/Makefile @@ -0,0 +1,63 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# Please note this is not an officially released version of bcp38 + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bcp38 +PKG_VERSION:=4 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/bcp38 + SECTION:=net + CATEGORY:=Network + SUBMENU:=Routing and Redirection + TITLE:=BCP38 compliance + URL:=http://www.github.com/dtaht/bcp38 + MAINTAINER:=Dave Taht d+bc...@taht.net + DEPENDS:=+ipset +endef + +define Package/bcp38/description + bcp38 implements rfc bcp 38 for home routers. +endef + +define Package/bcp38/conffiles +/etc/config/bcp38 +endef + +define Build/Prepare +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/bcp38/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/bcp38.config $(1)/etc/config/bcp38 + $(INSTALL_DIR) $(1)/usr/lib/bcp38 + $(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38 +endef + +define Package/bcp38/postinst +#!/bin/sh +[ -x /etc/uci-defaults/bcp38 ] /etc/uci-defaults/bcp38 || exit 0 +endef + +define Package/bcp38/postrm +#!/bin/sh +uci delete firewall.bcp38 +uci commit +endef + +$(eval $(call BuildPackage,bcp38)) diff --git a/net/bcp38/files/bcp38.config b/net/bcp38/files/bcp38.config new file mode 100644 index 000..80431e5 --- /dev/null +++ b/net/bcp38/files/bcp38.config @@ -0,0 +1,22 @@ +config bcp38 + option enabled 1 + option interface 'ge00' + option detect_upstream 1 + list match '127.0.0.0/8' + list match '0.0.0.0/8' # RFC 1700 + list match '240.0.0.0/4' # RFC 5745 + list match '192.0.2.0/24'# RFC 5737 + list match '198.51.100.0/24' # RFC 5737 + list match '203.0.113.0/24' # RFC 5737 + list match '192.168.0.0/16' # RFC 1918 + list match '10.0.0.0/8' # RFC 1918 + list match '172.16.0.0/12' # RFC 1918 + list match '169.254.0.0/16' # RFC 3927 + +# list nomatch '172.26.0.0/21' # Example of something not to match +# There is a dhcp trigger to do this for the netmask of a +# double natted connection needed + +# I will argue that this level of indirection doesn't scale +# very well - see how to block china as an example +# http://www.okean.com/china.txt diff --git a/net/bcp38/files/bcp38.defaults b/net/bcp38/files/bcp38.defaults new file mode 100644 index 000..d7e0d80 --- /dev/null +++ b/net/bcp38/files/bcp38.defaults @@ -0,0 +1,13 @@ +#!/bin/sh + +uci -q batch -EOT + delete firewall.bcp38 + set firewall.bcp38=include + set firewall.bcp38.type=script + set firewall.bcp38.path=/usr/lib/bcp38/run.sh + set firewall.bcp38.family=IPv4 + set firewall.bcp38.reload=1 + commit firewall +EOT + +exit 0 diff --git a/net/bcp38/files/run.sh b/net/bcp38/files/run.sh new file mode 100755 index 000..33ec531 --- /dev/null +++ b/net/bcp38/files/run.sh @@ -0,0 +1,96 @@ +#!/bin/sh + +STOP=$1 +IPSET_NAME=bcp38-ipv4 +IPTABLES_CHAIN=BCP38 + +. /lib/functions.sh + +config_load bcp38 + +add_bcp38_rule() +{ + local subnet=$1 + local action=$2 + + if [ $action == nomatch ]; then + ipset add $IPSET_NAME $subnet nomatch + else + ipset add $IPSET_NAME $subnet + fi +} + +detect_upstream() +{ + local interface=$1 + + subnets=$(ip route show dev $interface | grep 'scope link' | awk '{print $1}') + for subnet in $subnets; do + # ipset test doesn't work for subnets, so strip out the subnet part + # and test for that; add as exception if there's a match + addr=$(echo $subnet | sed 's|/[0-9]\+$||') + ipset test $IPSET_NAME $addr 2/dev/null add_bcp38_rule $subnet nomatch + done +} + +run() { + local section=$1 + local enabled + local interface + local detect_upstream + config_get_bool enabled $section enabled 0 + config_get interface $section interface +
[OpenWrt-Devel] ceropackages feed
All the packages I just submitted are currently maintained in the ceropackages-3.10 repo on github. https://github.com/dtaht/ceropackages-3.10.git so you can add that feed to your feeds.conf if you like, and do a ./scripts/feeds update ./scripts/feeds install sqm-scripts luci-app-sqm bcp38 and enable them to be built and give 'em a shot that way, rather than trying the patches I just submitted. There are a ton of other packages in that repo of varying quality and specificity to CeroWrt, possibly worth browsing through also. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] util-linux: backport upstream fix for unshare utility
From: Dave Taht dave.t...@bufferbloat.net the unshare utility wasn't getting certain defines for mount anymore. --- ...lude-libmount.h-to-provide-missing-MS_-de.patch | 44 1 file changed, 44 insertions(+) create mode 100644 package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch diff --git a/package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch b/package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch new file mode 100644 index 000..27a4838 --- /dev/null +++ b/package/utils/util-linux/patches/003-unshare-include-libmount.h-to-provide-missing-MS_-de.patch @@ -0,0 +1,44 @@ +From d754315c54af9cb8222e0a04ed5b2b4b927ed176 Mon Sep 17 00:00:00 2001 +From: Ruediger Meier ruediger.me...@ga-group.nl +Date: Mon, 17 Mar 2014 11:48:47 +0100 +Subject: [PATCH 262/288] unshare: include libmount.h to provide missing MS_* + defines + +Since 6728ca10 we are using MS_PRIVATE and MS_REC which are not defined +in some systems's sys/mount.h. + +Signed-off-by: Ruediger Meier ruediger.me...@ga-group.nl +--- + sys-utils/Makemodule.am |1 + + sys-utils/unshare.c |3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am +index 30b5d3e..93a2c8d 100644 +--- a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am +@@ -296,6 +296,7 @@ usrbin_exec_PROGRAMS += unshare + dist_man_MANS += sys-utils/unshare.1 + unshare_SOURCES = sys-utils/unshare.c + unshare_LDADD = $(LDADD) libcommon.la ++unshare_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) + endif + + if BUILD_NSENTER +diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c +index 91e0ec7..1240293 100644 +--- a/sys-utils/unshare.c b/sys-utils/unshare.c +@@ -27,6 +27,9 @@ + #include sys/wait.h + #include sys/mount.h + ++/* we only need some defines missing in sys/mount.h, no libmount linkage */ ++#include libmount.h ++ + #include nls.h + #include c.h + #include closestream.h +-- +1.7.9.5 + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Ruby 1.9.x in trunk - fix for bug 9873
Hello Hauke, I noticed you updated ruby to version 1.9.3-p484. However, there is still a serious bug for any network access. https://dev.openwrt.org/ticket/9873 I created a patch sometime ago but it was not commited. Could you please take a look at https://github.com/luizluca/openwrt-packages/compare/ruby-fix_network?expand=1 It also updates ruby to its latest 1.9.3. Regards, --- Luiz Angelo Daros de Luca, Me. luizl...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel