Commit 176bb6f
Christian Korber
firewall4: enable mac ranges for rule
nft supports handling mac ranges and therefore this commit changes fw4
to support that feature. The src_mac is now allowed to be a range of two
addresses. If no range is given, the old logic is applied.
So this is now possible:
```
option src_mac '00:11:AA:00:00:00-00:11:AA:FF:FF:FF'
```
This is done by changing the regex to parse for an additional MAC address
if '-' is matched after the first MAC address.
Also negation with '!' at the beginning to block every MAC not in the
range is possible.
Signed-off-by: Christian Korber <ck@dev.tdt.de>1 parent b6e5157 commit 176bb6f
1 file changed
Lines changed: 10 additions & 2 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | | - | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1198 | 1205 | | |
1199 | 1206 | | |
| 1207 | + | |
1200 | 1208 | | |
1201 | 1209 | | |
1202 | 1210 | | |
| |||
0 commit comments