mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-21 22:41:26 +00:00
Print address when failing to bind
This commit is contained in:
parent
d02f1b4f41
commit
8041e0368c
|
@ -205,7 +205,7 @@ open_dns_opt(struct sockaddr_storage *sockaddr, size_t sockaddr_len, int v6only)
|
|||
#endif
|
||||
|
||||
if (bind(fd, (struct sockaddr*) sockaddr, sockaddr_len) < 0)
|
||||
err(1, "bind");
|
||||
err(1, "bind() to %s", format_addr(sockaddr, sockaddr_len));
|
||||
|
||||
fprintf(stderr, "Opened IPv%d UDP socket\n", sockaddr->ss_family == AF_INET6 ? 6 : 4);
|
||||
|
||||
|
|
Loading…
Reference in a new issue