MINOR: listener: move the interface to the struct settings
The interface is common to all listeners/receivers and is used to bind
the listening socket so it must be in the receiver settings and not in
the listener. This removes some unnecessary loops.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 57bef86..7be6882 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -649,9 +649,10 @@
#ifdef SO_BINDTODEVICE
/* Note: this might fail if not CAP_NET_RAW */
- if (!ext && listener->interface) {
+ if (!ext && listener->bind_conf->settings.interface) {
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE,
- listener->interface, strlen(listener->interface) + 1) == -1) {
+ listener->bind_conf->settings.interface,
+ strlen(listener->bind_conf->settings.interface) + 1) == -1) {
msg = "cannot bind listener to device";
err |= ERR_WARN;
}