Commit 7272d4d
committed
fix: anygw fails to configure on some dsa devices
some devices using dsa, don't have an bridge called br-lan
instead it is present a configuration like
```
config device 'switch'
option name 'switch'
option type 'bridge'
config bridge-vlan 'lan_vlan'
option device 'switch'
option vlan '1'
option ports 'lan1 lan2 lan3 lan4'
config interface 'lan'
option device 'switch.1'
...
```
utils.lua should then check lan_vlan's device first, or fallback to lan's device
anygw.lua should configure it's macvlan on top of the device `switch.1` if present
or using the most common 'br-lan'
added then a dynamic retrieval of the right device from `network.lan.device`
tested on:
- dlink,dsl-2750b-b1 (bmips/bcm6328) dsa with switch.1
- tp-link,td-w8968-v3 (bmips/bcm6318) dsa with switch.1
- cudy,wr3000s-v1 (mediatek/filogic) dsa with br-lan1 parent fa5a22b commit 7272d4d
2 files changed
+6
-2
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
0 commit comments