Skip to content

Commit

Permalink
Ground routing support untagged ports too
Browse files Browse the repository at this point in the history
  • Loading branch information
G10h4ck authored and altergui committed Mar 27, 2017
1 parent 4a741e2 commit 33fdbc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/lime-hwd-ground-routing/src/ground_routing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ function ground_routing.detect_hardware()

local sw_secname = ground_routing.sectionNamePrefix..link_name.."_sw_"..switch_dev.."_"..vlan
local ports = switch_cpu_port.."t"
for _,p in pairs(section["switch_ports"]) do ports = ports.." "..p.."t" end
for _,p in pairs(section["switch_ports"]) do
ports = ports.." "..p
end

uci:set("network", sw_secname, "switch_vlan")
uci:set("network", sw_secname, "device", switch_dev)
Expand Down
4 changes: 2 additions & 2 deletions packages/lime-system/files/etc/config/lime-example
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ config lime wifi

#config hwd_gr link1
# option net_dev 'eth0' # Plain ethernet device on top of which 802.1q vlan will be constructed. In case of doubts rely on wiki.openwrt.org
# option vlan '5' # Vlan id to use for this ground routing link, use little one because cheap switch doesn't supports big ids, this will be used also as 802.1q vid
# option vlan '5' # Vlan id to use for this ground routing link, use little one because cheap switch doesn't supports big ids, this will be used also as 802.1q vid on tagged ports
# option switch_dev 'switch0' # These options regarding switch need to be set only if your ethernet device is connected to a switch chip. If the switch exists you can read its name (like switch0) in /etc/config/network file
# option switch_cpu_port '0' # Refer to switch port map of your device on wiki.openwrt.org to know CPU port index
# list switch_ports '4' # List switch ports on which you want the vlan being passed, refer to wiki.openwrt.org for correspondence with physical ports
# list switch_ports '4t' # List switch ports on which you want the vlan being passed, use the 't' suffix to specify the port being tagged, refer to wiki.openwrt.org for correspondence with physical ports

### Proto BGP specific sections
### One section for each BGP peer
Expand Down

0 comments on commit 33fdbc9

Please sign in to comment.