bridgeif: sanity-check init_data->max_ports <= BRIDGEIF_MAX_PORTS

This commit is contained in:
goldsimon
2017-04-04 22:12:38 +02:00
parent 77df9ccd5a
commit 9c78909857
2 changed files with 4 additions and 0 deletions

View File

@@ -69,6 +69,8 @@
/** BRIDGEIF_MAX_PORTS: this is used to create a typedef used for forwarding
* bit-fields: the number of bits required is this + 1 (for the internal/cpu port)
* (63 is the maximum, resulting in an u64_t for the bit mask)
* ATTENTION: this controls the maximum number of the implementation only!
* The max. number of ports per bridge must still be passed via netif_add parameter!
*/
#ifndef BRIDGEIF_MAX_PORTS
#define BRIDGEIF_MAX_PORTS 7