summaryrefslogtreecommitdiff
path: root/src/shared/firewall-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-06 21:20:59 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-09 15:45:31 +0200
commitd31645adefb3462d168b44bb950f92654c395021 (patch)
treecd1a31e91342ee8ac7ea9ad7d1ac5997b220edf8 /src/shared/firewall-util.c
parent938d25795446058cc2926fdc44dc0abf17ed0190 (diff)
tree-wide: port more code to use ifname_valid()
Diffstat (limited to 'src/shared/firewall-util.c')
-rw-r--r--src/shared/firewall-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/firewall-util.c b/src/shared/firewall-util.c
index ade2de7727..97865eac4a 100644
--- a/src/shared/firewall-util.c
+++ b/src/shared/firewall-util.c
@@ -44,6 +44,7 @@
#include "firewall-util.h"
#include "in-addr-util.h"
#include "macro.h"
+#include "socket-util.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(struct xtc_handle*, iptc_free);
@@ -59,10 +60,9 @@ static int entry_fill_basics(
assert(entry);
- if (out_interface && strlen(out_interface) >= IFNAMSIZ)
+ if (out_interface && !ifname_valid(out_interface))
return -EINVAL;
-
- if (in_interface && strlen(in_interface) >= IFNAMSIZ)
+ if (in_interface && !ifname_valid(in_interface))
return -EINVAL;
entry->ip.proto = protocol;