net/mwan3: deviate max interface value from mmx_mask value
authorFlorian Eckert <redacted>
Wed, 14 Mar 2018 10:57:02 +0000 (11:57 +0100)
committerFlorian Eckert <redacted>
Fri, 16 Mar 2018 13:45:29 +0000 (14:45 +0100)
commit270245e6d47162d5b2400381e6ba66b528241ef4
tree8cec5f369cd3b7e1c258b99ed0b3c9c400fb0c73
parent7c178353f0984189c1a1a507585a827b70b65ec7
net/mwan3: deviate max interface value from mmx_mask value

We need always three of the firewall mask value for
* default routing table
* blackhole
* unreachable
the other will be used for the interfaces.

* If we have set the mmx_mask to max 0xFF00 (8 bit set) we could use max 252
  interfaces.
* If we have set the mmx_mask to min 0x0E00 (3 bit set) we could use max 4
  interfaces.

Only the ones are counting from the firewall mask value.
Minimal three firewall mask bit vaules must be set.
Maximal eight firewall mask bit vaules could be set.

Table overview mmx_mask value bits vs. max interfaces

mmx_mask value bits set 1 -> not usefull
mmx_mask value bits set 2 -> not usefull
mmx_mask value bits set 3 ->   4 Interfaces (mask example 0x0E)
mmx_mask value bits set 4 ->  12 Interfaces
mmx_mask value bits set 5 ->  28 Interfaces
mmx_mask value bits set 6 ->  60 Interfaces
mmx_mask value bits set 7 -> 124 Interfaces
mmx_mask value bits set 8 -> 252 Interfaces (mask example 0xFF)

Signed-off-by: Florian Eckert <redacted>
net/mwan3/files/lib/mwan3/mwan3.sh
net/mwan3/files/usr/sbin/mwan3
git clone https://git.99rst.org/PROJECT