-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gluon-radv-filterd: migrate to nftables
- Loading branch information
Showing
3 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
package/gluon-radv-filterd/luasrc/lib/gluon/ebtables/400-radv-filterd
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
package/gluon-radv-filterd/luasrc/lib/gluon/nftables/400-radv-filterd.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
bridge_table('pre', [[set radv_allow { | ||
type ether_addr | ||
} | ||
set radv_filter { | ||
type ether_addr | ||
} | ||
]]) | ||
|
||
-- This rule starts filtering once the address is in radv_filter | ||
|
||
-- Daemon adds 00:00:../ff:ff:.. to radv_filter so everything gets picked up, | ||
-- effectivly turning radv_filter into a bool | ||
|
||
bridge_rule('FORWARD', 'ether saddr @radv_filter iifname "bat0" icmpv6 type nd-router-advert ether saddr != @radv_allow drop') |