[OpenWrt-Devel] [PATCH]netifd: Fix source routing for IPv6 prefix address

2013-12-18 Thread Hans Dedecker
Fixes source routing for IPv6 prefix address on the interface
to which a prefix is assigned. If a packet is received on this
interface with as destination address the IPv6 prefix address
coming from a different prefix then this networking rule will
take care of the selection of the correct IPv6 routing table.
This rule lines up with proto address networking rules behavior.

Signed-off-by: Hans Dedecker dedec...@gmail.com
---
 interface-ip.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/interface-ip.c b/interface-ip.c
index 3771b5d..27ec009 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -639,6 +639,9 @@ interface_set_prefix_address(struct 
device_prefix_assignment *assignment,
addr.valid_until = now + 7200;
system_add_address(l3_downlink, addr);
if (prefix-iface) {
+   set_ip_source_policy(false, true, IPRULE_PRIORITY_ADDR, 
addr.addr,
+   128, prefix-iface-ip6table, NULL, 
NULL);
+
set_ip_source_policy(false, true, IPRULE_PRIORITY_NW, 
addr.addr,
addr.mask, prefix-iface-ip6table, 
iface, NULL);
 
@@ -650,6 +653,9 @@ interface_set_prefix_address(struct 
device_prefix_assignment *assignment,
} else if (add  (iface-state == IFS_UP || iface-state == 
IFS_SETUP)) {
system_add_address(l3_downlink, addr);
if (prefix-iface  !assignment-enabled) {
+   set_ip_source_policy(true, true, IPRULE_PRIORITY_ADDR, 
addr.addr,
+   128, prefix-iface-ip6table, NULL, 
NULL);
+
set_ip_source_policy(true, true, 
IPRULE_PRIORITY_REJECT, addr.addr,
addr.mask, 0, iface, unreachable);
 
-- 
1.7.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Updating vlan interface link on switch port link change?

2013-12-18 Thread Rafał Miłecki
Some routers (a lot of/all Broadcom's BCM47xx based models) have only
a one network card attached to a switch. In such situation you usually
use one VLAN for WAN port and another VLAN for LAN ports.

The problem is that WAN is a virtual VLAN interface and it's always
up. Even if I disconnect ethernet cable from the WAN, eth0.X is still
up.

Do you have any idea how this could be improved?
Could we for example keep a list of VLANs with only one port assigned
and adjust VLAN interface state to match current port state? Is this
the right thing to do?
How otherwise we can know that WAN is disconnected/not working?

-- 
Rafał
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH]netifd: Fix source routing for IPv6 prefix address

2013-12-18 Thread Steven Barth

Hello Hans,

could you please explain your patch again. I didn't quite get the 
paragraph you've written. It seems the sentence is a bit garbled.



Thanks,

Steven
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Q: hotplug / button / reset

2013-12-18 Thread Bastian Bittorf
on a 'TP-LINK TL-WDR4900 v1' there is a button labeled
'WPS/reset'. when i press it, i get a hotplug call with

$BUTTON = reset and 
$ACTION = pressed / released

after this the router restarts. who does this? procd?
do i have a chance to relabel this button to e.g. 'wps'
without recompiling?

bye, bastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] report of sysupgrade incompatibility with mount-utils

2013-12-18 Thread Sebastian Moeller
Hi John,


On Dec 17, 2013, at 12:51 , John Crispin j...@phrozen.org wrote:

 On 17/12/13 12:49, Sebastian Moeller wrote:
 replacing all invocations of mount with /usr/mount
 
 
 i think this would be the correct approach.

So, should I send a patch? Against what version, or should I contact 
the maintainer (do you happen to know who that would be?)

Best Regards
Sebastian

 
   John
 ___
 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] report of sysupgrade incompatibility with mount-utils

2013-12-18 Thread John Crispin

On 18/12/13 11:41, Sebastian Moeller wrote:

So, should I send a patch? Against what version, or should I contact 
the maintainer (do you happen to know who that would be?)


Hi,

that would be me, i will fix it after i had lunch

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] report of sysupgrade incompatibility with mount-utils

2013-12-18 Thread Sebastian Moeller
Hi John,



On Dec 18, 2013, at 11:42 , John Crispin j...@phrozen.org wrote:

 On 18/12/13 11:41, Sebastian Moeller wrote:
  So, should I send a patch? Against what version, or should I contact 
 the maintainer (do you happen to know who that would be?)
 
 Hi,
 
 that would be me, i will fix it after i had lunch

Thank you very much!

Best Regards
Sebastian


 
   John
 ___
 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] ramips: add support for RT-N14U (mt7620n based) board

2013-12-18 Thread Pavel Löbl
added dts file and userspace scripts modified to support Asus RT-N14U board

current support status:
usbworks
ethernet   works
buttonsreset, wps
leds   asus:blue:[usb|lan|wan|air|power]
i2cnot tested
uart   not tested
wifi   not yet

Signed-off-by: Pavel Löbl lobl.pa...@gmail.com
---
 .../ramips/base-files/etc/uci-defaults/01_leds |   7 ++
 .../ramips/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/RT-N14U.dts| 118 +
 target/linux/ramips/image/Makefile |   2 +
 6 files changed, 132 insertions(+)
 create mode 100644 target/linux/ramips/dts/RT-N14U.dts

diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 44951d8..fe22875 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -141,6 +141,13 @@ case $board in
wnce2001)
set_wifi_led netgear:green:wlan
;;
+   rt-n14u)
+   ucidef_set_led_default power power asus:blue:power 1
+   ucidef_set_led_netdev lan lan asus:blue:lan eth0.1
+   ucidef_set_led_netdev wan wan asus:blue:wan eth0.2
+   set_wifi_led asus:blue:air
+   set_usb_led asus:blue:usb
+   ;;
rp-n53)
ucidef_set_led_netdev eth Network asus:white:back eth0
set_wifi_led asus:blue:wifi
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index 63458ed..a9914fd 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -87,6 +87,7 @@ ramips_setup_interfaces()
f5d8235-v1 | \
f5d8235-v2 | \
hg255d | \
+   rt-n14u | \
ur-326n4g)
ucidef_set_interfaces_lan_wan eth0.1 eth0.2
ucidef_add_switch switch0 1 1
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 972f415..d62002e 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -127,6 +127,9 @@ ramips_board_detect() {
*La Fonera 2.0N)
name=fonera20n
;;
+   *Asus RT-N14U)
+   name=rt-n14u
+   ;;
*Asus RT-N13U)
name=rt-n13u
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 6836e16..babeaf2 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -63,6 +63,7 @@ platform_check_image() {
rp-n53 | \
rt-g32-b1 | \
rt-n10-plus | \
+   rt-n14u | \
rt-n15 | \
rt-n56u | \
sl-r7205 | \
diff --git a/target/linux/ramips/dts/RT-N14U.dts 
b/target/linux/ramips/dts/RT-N14U.dts
new file mode 100644
index 000..d95365b
--- /dev/null
+++ b/target/linux/ramips/dts/RT-N14U.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = asus,rt-n14u, ralink,mt7620n-soc;
+   model = Asus RT-N14U;
+
+   palmbus@1000 {
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   #compatible = mx25l6405d;
+   compatible = w25q128;
+   reg = 0 0;
+   linux,modalias = m25p80, w25q128;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = factory;
+   reg = 0x4 0x1;
+   read-only;
+   };
+
+