[OpenWrt-Devel] Default gateway in another subnet
Currently openwrt doesn't accept a gateway that is in a different subnet in a static or dhcp config. That is due to $(route add default gw $gateway dev $iface) requiring that the $gateway is first reachable by another route. I've worked around this by editting /lib/network/config.sh and /usr/share/default.script, with something like this: ip route get $gateway /dev/null 2/dev/null || route add -host $gateway dev $iface route add default gw $gateway dev $iface This works ok, but it needs ip(8) which is not a good idea, I guess. Any other command I can use? Any brave awk/sed coder to parse route -n? Regards, -- + Nuno Gonçalves + nuno...@gmail.com + http://nunoassimassim.blogspot.com/ + PORTUGAL E-mail sent directly from Google Mail webmail using HTTPS on behalf of Nuno João Pinto Gonçalves, birth date 1986-11-16. E-mail headers provide good assurance that this message was not tampered and originates from nuno...@gmail.com. If you require additional security, I may provide on request X509 electronic signature under Portuguese government chain. Se precisar de assinatura digital do Cartão de Cidadão, de uma apitadela. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] iptables NAT not being updated on WAN changes
I have internet connections at eth0.2 and eth1. Config is like this: config interface wan option ifname eth1 option protodhcp After boot connection is ok. Computers behind router get NATed internet. Then I do ifdown wan, change eth1 to eth0.2 and ifup wan. Computers start getting Destination port unreachable to ping request. Inside the router I can ping the internet. Rebooting (with eth1 or eth0.2 selected, doesn't care) brings NATed connection back. /etc/init.d/network restart doesn't. r...@openwrt:/# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywherestate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere syn_flood tcp -- anywhere anywheretcp flags:FIN,SYN,RST,ACK/SYN input_rule all -- anywhere anywhere input all -- anywhere anywhere Chain FORWARD (policy DROP) target prot opt source destination zone_wan_MSSFIX all -- anywhere anywhere ACCEPT all -- anywhere anywherestate RELATED,ESTABLISHED forwarding_rule all -- anywhere anywhere forwardall -- anywhere anywhere reject all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywherestate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere output_rule all -- anywhere anywhere output all -- anywhere anywhere Chain forward (1 references) target prot opt source destination zone_lan_forward all -- anywhere anywhere zone_wan_forward all -- anywhere anywhere Chain forwarding_lan (1 references) target prot opt source destination Chain forwarding_rule (1 references) target prot opt source destination Chain forwarding_wan (1 references) target prot opt source destination Chain input (1 references) target prot opt source destination zone_lan all -- anywhere anywhere zone_wan all -- anywhere anywhere Chain input_lan (1 references) target prot opt source destination Chain input_rule (1 references) target prot opt source destination Chain input_wan (1 references) target prot opt source destination Chain output (1 references) target prot opt source destination zone_lan_ACCEPT all -- anywhere anywhere zone_wan_ACCEPT all -- anywhere anywhere Chain output_rule (1 references) target prot opt source destination Chain reject (5 references) target prot opt source destination REJECT tcp -- anywhere anywhere reject-with tcp-reset REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain syn_flood (1 references) target prot opt source destination RETURN tcp -- anywhere anywheretcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50 DROP all -- anywhere anywhere Chain zone_lan (1 references) target prot opt source destination input_lan all -- anywhere anywhere zone_lan_ACCEPT all -- anywhere anywhere Chain zone_lan_ACCEPT (2 references) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere Chain zone_lan_DROP (0 references) target prot opt source destination DROP all -- anywhere anywhere DROP all -- anywhere anywhere Chain zone_lan_MSSFIX (0 references) target prot opt source destination TCPMSS tcp -- anywhere anywheretcp flags:SYN,RST/SYN TCPMSS clamp to PMTU Chain zone_lan_REJECT (1 references) target prot opt source destination reject all -- anywhere anywhere reject all -- anywhere anywhere Chain zone_lan_forward (1 references) target prot opt source destination zone_wan_ACCEPT all -- anywhere anywhere forwarding_lan all -- anywhere anywhere zone_lan_REJECT all -- anywhere anywhere Chain zone_wan (1 references) target prot opt source destination ACCEPT udp -- anywhere anywhereudp dpt:68 ACCEPT icmp -- anywhere anywhereicmp echo-request input_wan all -- anywhere anywhere zone_wan_REJECT all -- anywhere anywhere Chain zone_wan_ACCEPT (2 references) target prot opt source destination ACCEPT all
Re: [OpenWrt-Devel] iptables NAT not being updated on WAN changes
Also tried /etc/init.d/firewall restart after restarting the network? Maddes On 18.04.2010 16:38, Nuno Gonçalves wrote: I have internet connections at eth0.2 and eth1. Config is like this: config interface wan option ifname eth1 option protodhcp After boot connection is ok. Computers behind router get NATed internet. Then I do ifdown wan, change eth1 to eth0.2 and ifup wan. Computers start getting Destination port unreachable to ping request. Inside the router I can ping the internet. Rebooting (with eth1 or eth0.2 selected, doesn't care) brings NATed connection back. /etc/init.d/network restart doesn't. r...@openwrt:/# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywherestate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere syn_flood tcp -- anywhere anywheretcp flags:FIN,SYN,RST,ACK/SYN input_rule all -- anywhere anywhere input all -- anywhere anywhere Chain FORWARD (policy DROP) target prot opt source destination zone_wan_MSSFIX all -- anywhere anywhere ACCEPT all -- anywhere anywherestate RELATED,ESTABLISHED forwarding_rule all -- anywhere anywhere forwardall -- anywhere anywhere reject all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywherestate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere output_rule all -- anywhere anywhere output all -- anywhere anywhere Chain forward (1 references) target prot opt source destination zone_lan_forward all -- anywhere anywhere zone_wan_forward all -- anywhere anywhere Chain forwarding_lan (1 references) target prot opt source destination Chain forwarding_rule (1 references) target prot opt source destination Chain forwarding_wan (1 references) target prot opt source destination Chain input (1 references) target prot opt source destination zone_lan all -- anywhere anywhere zone_wan all -- anywhere anywhere Chain input_lan (1 references) target prot opt source destination Chain input_rule (1 references) target prot opt source destination Chain input_wan (1 references) target prot opt source destination Chain output (1 references) target prot opt source destination zone_lan_ACCEPT all -- anywhere anywhere zone_wan_ACCEPT all -- anywhere anywhere Chain output_rule (1 references) target prot opt source destination Chain reject (5 references) target prot opt source destination REJECT tcp -- anywhere anywhere reject-with tcp-reset REJECT all -- anywhere anywhere reject-with icmp-port-unreachable Chain syn_flood (1 references) target prot opt source destination RETURN tcp -- anywhere anywheretcp flags:FIN,SYN,RST,ACK/SYN limit: avg 25/sec burst 50 DROP all -- anywhere anywhere Chain zone_lan (1 references) target prot opt source destination input_lan all -- anywhere anywhere zone_lan_ACCEPT all -- anywhere anywhere Chain zone_lan_ACCEPT (2 references) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere Chain zone_lan_DROP (0 references) target prot opt source destination DROP all -- anywhere anywhere DROP all -- anywhere anywhere Chain zone_lan_MSSFIX (0 references) target prot opt source destination TCPMSS tcp -- anywhere anywheretcp flags:SYN,RST/SYN TCPMSS clamp to PMTU Chain zone_lan_REJECT (1 references) target prot opt source destination reject all -- anywhere anywhere reject all -- anywhere anywhere Chain zone_lan_forward (1 references) target prot opt source destination zone_wan_ACCEPT all -- anywhere anywhere forwarding_lan all -- anywhere anywhere zone_lan_REJECT all -- anywhere anywhere Chain zone_wan (1 references) target prot opt source destination ACCEPT udp -- anywhere anywhereudp dpt:68 ACCEPT icmp -- anywhere
[OpenWrt-Devel] Etrax USB support
Is someone working on fixing the usb support for the Etrax platform? Trying to add the usb entry in the Makefile, kmod-sub-etrax compiles fine, but when pluggin someting in the usb port, the console give a lot of garbage on the screen and it doesn't respond anymore (i can see the garbage using the serial debug port). Thanks and have a nice day. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: adding support for zyxel nbg460n/550n/550nh boards
Michael Kurz írta: This patch adds support for the zyxel nbg460n/550n/550nh routers. Currently this only works if a second stage bootloader is also flashed, as the used switch needs extra initialization. Signed-off-by: Michael Kurz michi.k...@googlemail.com --- Applied: https://dev.openwrt.org/changeset/20990 Thanks, Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Package Maintainers Still Wanted
OpenWrt is still looking for more package maintainers. A list of current maintainers is located at https://dev.openwrt.org/wiki/packages . If you are interested please let me know and I will get you setup. I can volunteer to maintain the OLSR package. Travis, I'm going to write you offlist, what do you need ? A ssh public key ? Saverio ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Update lvm2 to 2.02.63
jdonohue654-openwrt == jdonohue654-openwrt jdonohue654-open...@yahoo.com writes: This proposed patch updates lvm2 build script to 2.02.63 ... the previous version (2.02.60) is no longer available for download. this update also necessitated some minor changes to patches/100-readline-link.patch (Previous attempt bounced ... apologies if you get 2 submissions). Signed-off-by: Jack Donohue jdonohue654-open...@yahoo.com Thanks, installed in r21002. Stefan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: adding support for zyxel nbg460n/550n/550nh boards
Hello Firstly, mask_flags in struct mtd_partition disables the given funtion afaik, so you made everyting but the CalibData partition read only. Also, don't you need to add a section to the image generation Makefile? Bernhard 2010/4/18 Michael Kurz michi.k...@googlemail.com: This patch adds support for the zyxel nbg460n/550n/550nh routers. Currently this only works if a second stage bootloader is also flashed, as the used switch needs extra initialization. Signed-off-by: Michael Kurz michi.k...@googlemail.com --- linux/ar71xx/config-2.6.32 | 1 linux/ar71xx/config-2.6.33 | 1 linux/ar71xx/config-2.6.34 | 1 linux/ar71xx/files/arch/mips/ar71xx/Kconfig | 8 linux/ar71xx/files/arch/mips/ar71xx/Makefile | 1 linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c | 215 +++ linux/ar71xx/files/arch/mips/ar71xx/machtype.h | 1 linux/ar71xx/profiles/zyxel.mk | 17 8 files changed, 245 insertions(+) Index: target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig === --- target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig (revision 20954) +++ target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig (working copy) @@ -160,6 +160,14 @@ config AR71XX_MACH_MZK_W300NH select AR71XX_DEV_LEDS_GPIO default n +config AR71XX_MACH_NBG460N + bool Zyxel NBG460N/550N/550NH board support + select AR71XX_DEV_M25P80 + select AR71XX_DEV_AR913X_WMAC + select AR71XX_DEV_GPIO_BUTTONS + select AR71XX_DEV_LEDS_GPIO + default n + config AR71XX_MACH_TL_WR741ND bool TP-LINK TL-WR741ND support select AR71XX_DEV_M25P80 Index: target/linux/ar71xx/files/arch/mips/ar71xx/Makefile === --- target/linux/ar71xx/files/arch/mips/ar71xx/Makefile (revision 20954) +++ target/linux/ar71xx/files/arch/mips/ar71xx/Makefile (working copy) @@ -35,6 +35,7 @@ obj-$(CONFIG_AR71XX_MACH_DIR_615_C1) += mach-dir-6 obj-$(CONFIG_AR71XX_MACH_DIR_825_B1) += mach-dir-825-b1.o obj-$(CONFIG_AR71XX_MACH_MZK_W04NU) += mach-mzk-w04nu.o obj-$(CONFIG_AR71XX_MACH_MZK_W300NH) += mach-mzk-w300nh.o +obj-$(CONFIG_AR71XX_MACH_NBG460N) += mach-nbg460n.o obj-$(CONFIG_AR71XX_MACH_PB42) += mach-pb42.o obj-$(CONFIG_AR71XX_MACH_PB44) += mach-pb44.o obj-$(CONFIG_AR71XX_MACH_PB92) += mach-pb92.o Index: target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h === --- target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h (revision 20954) +++ target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h (working copy) @@ -35,6 +35,7 @@ enum ar71xx_mach_type { AR71XX_MACH_PB92, /* Atheros PB92 */ AR71XX_MACH_MZK_W04NU, /* Planex MZK-W04NU */ AR71XX_MACH_MZK_W300NH, /* Planex MZK-W300NH */ + AR71XX_MACH_NBG460N, /* Zyxel NBG460N/550N/550NH */ AR71XX_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */ AR71XX_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */ AR71XX_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */ Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c === --- target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c (revision 0) +++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-nbg460n.c (revision 0) @@ -0,0 +1,215 @@ +/* + * Zyxel NBG 460N/550N/550NH board support + * + * Copyright (C) 2010 Michael Kurz michi.k...@googlemail.com + * + * based on mach-tl-wr1043nd.c + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include linux/platform_device.h +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include linux/delay.h +#include linux/rtl8366s.h + +#include linux/i2c.h +#include linux/i2c-algo-bit.h +#include linux/i2c-gpio.h + +#include asm/mach-ar71xx/ar71xx.h + +#include machtype.h +#include devices.h +#include dev-m25p80.h +#include dev-ar913x-wmac.h +#include dev-gpio-buttons.h +#include dev-leds-gpio.h + +/* LEDs */ +#define NBG460N_GPIO_LED_WPS 3 +#define NBG460N_GPIO_LED_WAN 6 +#define NBG460N_GPIO_LED_POWER 14 +#define NBG460N_GPIO_LED_WLAN 15 + +/* Buttons */ +#define NBG460N_GPIO_BTN_WPS 12 +#define NBG460N_GPIO_BTN_RESET 21 +#define NBG460N_BUTTONS_POLL_INTERVAL 20 + +/* RTC chip PCF8563 I2C interface */ +#define NBG460N_GPIO_PCF8563_SDA 8 +#define NBG460N_GPIO_PCF8563_SCK 7 + +/* Switch configuration I2C interface */ +#define NBG460N_GPIO_RTL8366_SDA 16 +#define
Re: [OpenWrt-Devel] [PATCH] ar71xx: adding support for zyxel nbg460n/550n/550nh boards
Hi, hmm, somehow i mixed that flags stuff up. I will correct it later. I totally missed that image generation part, thx for the hint. I will add that when i get that missing second stage bootloader ready. Michael On 18.04.2010 22:42, Bernhard Loos wrote: Hello Firstly, mask_flags in struct mtd_partition disables the given funtion afaik, so you made everyting but the CalibData partition read only. Also, don't you need to add a section to the image generation Makefile? Bernhard ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] openwrt-devel Digest, Vol 52, Issue 48
From: Matthias Buecher / Germany m...@maddes.net To: OpenWrt Development List openwrt-devel@lists.openwrt.org Subject: Re: [OpenWrt-Devel] iptables NAT not being updated on WAN changes Message-ID: 4bcb1ad8.3000...@maddes.net Content-Type: text/plain; charset=UTF-8 Also tried /etc/init.d/firewall restart after restarting the network? Maddes Restarting the firewall works. Is that something that I should do manually or just a bug? Regards ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] iptables NAT not being updated on WAN changes
You have to take care of it. Maddes On 18.04.2010 23:41, Nuno Gonçalves wrote: From: Matthias Buecher / Germany m...@maddes.net To: OpenWrt Development List openwrt-devel@lists.openwrt.org Subject: Re: [OpenWrt-Devel] iptables NAT not being updated on WAN changes Message-ID: 4bcb1ad8.3000...@maddes.net Content-Type: text/plain; charset=UTF-8 Also tried /etc/init.d/firewall restart after restarting the network? Maddes Restarting the firewall works. Is that something that I should do manually or just a bug? Regards ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel