Skip to content

Commit

Permalink
Make bmx6 MTU configurable on config/lime
Browse files Browse the repository at this point in the history
Signed-off-by: Pau Escrich <p4u@dabax.net>
  • Loading branch information
p4u committed Mar 26, 2017
1 parent 2ab2ff0 commit 60b045b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/lime-proto-bmx6/src/bmx6.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ function bmx6.setup_interface(ifname, args)
local owrtInterfaceName, linux802adIfName, owrtDeviceName = network.createVlanIface(ifname, vlanId, nameSuffix, vlanProto)

local uci = libuci:cursor()
uci:set("network", owrtDeviceName, "mtu", "1398")

local mtu = config.get("network","bmx6_mtu") or "1398"
uci:set("network", owrtDeviceName, "mtu", mtu)

-- BEGIN [Workaround issue 38]
if ifname:match("^wlan%d+") then
Expand Down
1 change: 1 addition & 0 deletions packages/lime-system/files/etc/config/lime-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ config lime network
option primary_interface eth0
option main_ipv4_address '10.%N1.0.0/16'
option main_ipv6_address '2a00:1508:0a%N1:%N200::/64'
option bmx6_mtu '1398'
list protocols adhoc
list protocols lan
list protocols anygw
Expand Down
1 change: 1 addition & 0 deletions packages/lime-system/files/etc/config/lime-example
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ config lime network
# option bmx6_over_batman false # Disables Bmx6 meshing on top of batman
option main_ipv4_address '10.%N1.0.0/16' # Here you have 4 possibilities: set a static IP and the subnet, like '192.0.2.1/16'; parametrize with %Mn and %Nn, and set the subnet, like '192.%N1.%M5.%M6/16'; set a whole network address (so not a specific IP) for getting the IP autocompleted in that network with bits from MAC address, this works also with netmasks other than /24 or /16, like '192.0.128.0/17' (but not valid network addresses, for example '192.0.128.0/16' or '192.0.129.0/17', won't get parametrized); set two different parameters, the first for subnet and the second for IP parametrization, like '192.0.128.0/16/17', this results in /16 subnet but IP parametrized in a /17 range.
option main_ipv6_address '2a00:1508:0a%N1:%N200::/64' # Parametrizable in the same way as main_ipv4_address. If used, the IP autocompletion will fill maximum the last 24 bits, so specifying an IP autocompletion range bigger than /104 is not useful.
option bmx6_mtu '1398' # Set MTU for bmx6 tunnel interfaces
list protocols adhoc # List of protocols configured by LiMe, some of these require the relative package "lime-proto-...". Note that if you set here some protocols, you overwrite the *whole* list of protocols set in /etc/config/lime-defaults
list protocols lan
list protocols anygw
Expand Down

0 comments on commit 60b045b

Please sign in to comment.