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:
Matthias Schiffer 2016-02-22 22:57:11 +01:00
parent d7f23732b6
commit bc6650141c

View file

@ -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;
} }