summaryrefslogtreecommitdiff
path: root/server/FirewallController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/FirewallController.cpp')
-rw-r--r--server/FirewallController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/FirewallController.cpp b/server/FirewallController.cpp
index 07463165..17c6da42 100644
--- a/server/FirewallController.cpp
+++ b/server/FirewallController.cpp
@@ -69,6 +69,11 @@ int FirewallController::isFirewallEnabled(void) {
}
int FirewallController::setInterfaceRule(const char* iface, FirewallRule rule) {
+ if (!isIfaceName(iface)) {
+ errno = ENOENT;
+ return -1;
+ }
+
const char* op;
if (rule == ALLOW) {
op = "-I";