[BUG] interface binding: length must include the trailing zero
The interface length passed to the setsockopt(SO_BINDTODEVICE) must
include the trailing \0. Otherwise it will randomly fail.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 78f63fc..2fb6a85 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -245,7 +245,7 @@
/* Note: this might fail if not CAP_NET_RAW */
if (listener->interface) {
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE,
- listener->interface, strlen(listener->interface)) == -1) {
+ listener->interface, strlen(listener->interface) + 1) == -1) {
msg = "cannot bind listener to device";
err |= ERR_WARN;
}