diff options
author | 2019-04-01 06:40:05 +0000 | |
---|---|---|
committer | 2019-04-01 06:40:05 +0000 | |
commit | c57b6ddd17adb35bf2e3b9dfe8c7279c5761d053 (patch) | |
tree | e1302dfe521182bbd33f6bbe851415b4787b28e5 | |
parent | restore El removed in previous; (diff) | |
download | wireguard-openbsd-c57b6ddd17adb35bf2e3b9dfe8c7279c5761d053.tar.xz wireguard-openbsd-c57b6ddd17adb35bf2e3b9dfe8c7279c5761d053.zip |
if inet6 is not available, warn, but carry on
-rw-r--r-- | usr.sbin/rebound/rebound.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/rebound/rebound.c b/usr.sbin/rebound/rebound.c index 28b8649f072..8dab30cad79 100644 --- a/usr.sbin/rebound/rebound.c +++ b/usr.sbin/rebound/rebound.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rebound.c,v 1.107 2018/12/27 18:00:15 tedu Exp $ */ +/* $OpenBSD: rebound.c,v 1.108 2019/04/01 06:40:05 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org> * @@ -1393,6 +1393,10 @@ main(int argc, char **argv) bindaddr.i6.sin6_addr = in6addr_loopback; fd = socket(AF_INET6, SOCK_DGRAM, 0); + if (fd == -1 && errno == EPROTONOSUPPORT) { + logmsg(LOG_NOTICE, "no inet6 support available"); + goto noinet6; + } if (fd == -1) logerr("socket: %s", strerror(errno)); if (bind(fd, &bindaddr.a, bindaddr.a.sa_len) == -1) @@ -1408,7 +1412,7 @@ main(int argc, char **argv) if (listen(fd, 10) == -1) logerr("listen: %s", strerror(errno)); addfd(fd, &tcpfds, &numtcp); - +noinet6: if (debug) { int conffd = openconfig(confname, -1); return workerloop(conffd, udpfds, numudp, tcpfds, numtcp); |