summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-08-13 14:26:39 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-08-13 14:26:39 +0000
commitda5347436d8aed4066ef489f4883ee177884b769 (patch)
treed52e9e80537273572deab34864d609a4b1864cdd /usr.bin
parentbbd11eae68c0d21f37ab95e90d6d5f79baef57fc (diff)
Print a warning when rdomain is used on non-AF_INET sockets. Those are
currently not supported. Requested by djm sort of.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tcpbench/tcpbench.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index 41ee20bda83..bf8c4161bf4 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -506,7 +506,8 @@ serverloop(kvm_t *kvmh, u_long ktcbtab, struct addrinfo *aitop,
if (setsockopt(sock, IPPROTO_IP, SO_RDOMAIN,
&rdomain, sizeof(rdomain)) == -1)
err(1, "setsockopt SO_RDOMAIN");
- }
+ } else if (rdomain)
+ warnx("rdomain only supported on AF_INET");
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
&on, sizeof(on)) == -1)
warn("reuse port");
@@ -657,7 +658,8 @@ clientloop(kvm_t *kvmh, u_long ktcbtab, const char *host, const char *port,
if (setsockopt(sock, IPPROTO_IP, SO_RDOMAIN,
&rdomain, sizeof(rdomain)) == -1)
err(1, "setsockopt SO_RDOMAIN");
- }
+ } else if (rdomain)
+ warnx("rdomain only supported on AF_INET");
if (Sflag) {
if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF,
&Sflag, sizeof(Sflag)) == -1)