MINOR: inet: report the faulty interface name in "bind" errors
When a "bind ... interface foo" statement fails, let's report the
interface name in the error message to help locating it in the file.
diff --git a/src/sock_inet.c b/src/sock_inet.c
index fb69981..1402dd0 100644
--- a/src/sock_inet.c
+++ b/src/sock_inet.c
@@ -362,7 +362,7 @@
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE,
rx->settings->interface,
strlen(rx->settings->interface) + 1) == -1) {
- memprintf(errmsg, "cannot bind receiver to device (%s)", strerror(errno));
+ memprintf(errmsg, "cannot bind receiver to device '%s' (%s)", rx->settings->interface, strerror(errno));
err |= ERR_WARN;
}
}