mirror of
https://github.com/neocturne/fastd.git
synced 2025-05-14 04:15:08 +02:00
capabilities: guard packet mark check with USE_PACKET_MARK
At the moment, both capabilities and packet marks are supported on Linux only, so this doesn't really matter except for testing.
This commit is contained in:
parent
d7f23732b6
commit
bc6650141c
1 changed files with 2 additions and 0 deletions
|
@ -79,8 +79,10 @@ static bool need_cap_net_admin(void) {
|
||||||
if (!fastd_config_persistent_ifaces() && conf.drop_caps != DROP_CAPS_FORCE)
|
if (!fastd_config_persistent_ifaces() && conf.drop_caps != DROP_CAPS_FORCE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
#ifdef USE_PACKET_MARK
|
||||||
if (!(ctx.sock_default_v4 || ctx.sock_default_v6) && conf.packet_mark)
|
if (!(ctx.sock_default_v4 || ctx.sock_default_v6) && conf.packet_mark)
|
||||||
return true;
|
return true;
|
||||||
|
#endif
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue