summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-02-22 22:57:11 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-02-22 22:57:11 +0100
commitbc6650141cfa7970e4f6e5e94abe2618f84313da (patch)
tree9ffe017756261afd03e206f2b1dccc817d10acd7 /src
parentd7f23732b6d24c35d6c0dbcc5ecec0207be0d977 (diff)
downloadfastd-bc6650141cfa7970e4f6e5e94abe2618f84313da.tar
fastd-bc6650141cfa7970e4f6e5e94abe2618f84313da.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/capabilities.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/capabilities.c b/src/capabilities.c
index 3feed89..d0811cd 100644
--- a/src/capabilities.c
+++ b/src/capabilities.c
@@ -79,8 +79,10 @@ static bool need_cap_net_admin(void) {
if (!fastd_config_persistent_ifaces() && conf.drop_caps != DROP_CAPS_FORCE)
return true;
+#ifdef USE_PACKET_MARK
if (!(ctx.sock_default_v4 || ctx.sock_default_v6) && conf.packet_mark)
return true;
+#endif
return false;
}