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_udp.c b/src/proto_udp.c
index 5ec8bc7..5337ac4 100644
--- a/src/proto_udp.c
+++ b/src/proto_udp.c
@@ -252,9 +252,10 @@
#ifdef SO_BINDTODEVICE
/* Note: this might fail if not CAP_NET_RAW */
- if (listener->interface) {
+ if (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;
}