summaryrefslogtreecommitdiffstats
path: root/sbin/ping/ping.c
diff options
context:
space:
mode:
authordhill <dhill@openbsd.org>2018-11-13 14:30:36 +0000
committerdhill <dhill@openbsd.org>2018-11-13 14:30:36 +0000
commit6669aa477925f34e7ea891bfbc3651d339d8b58c (patch)
treeceb1d5be1904490ac831c0af1c161b4eef593eb2 /sbin/ping/ping.c
parentAdd regress tests for pipe fcntl(fd, F_GETOWN). (diff)
downloadwireguard-openbsd-6669aa477925f34e7ea891bfbc3651d339d8b58c.tar.xz
wireguard-openbsd-6669aa477925f34e7ea891bfbc3651d339d8b58c.zip
Fix previous, which broke ping -T.
ok dlg@
Diffstat (limited to 'sbin/ping/ping.c')
-rw-r--r--sbin/ping/ping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 3e458d5d17e..b3b7d6ba8d6 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.233 2018/11/11 01:40:31 dlg Exp $ */
+/* $OpenBSD: ping.c,v 1.234 2018/11/13 14:30:36 dhill Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -714,7 +714,7 @@ main(int argc, char *argv[])
struct ip *ip = (struct ip *)outpackhdr;
if (setsockopt(s, IPPROTO_IP, IP_HDRINCL,
- &optval, sizeof(optval)) < 1)
+ &optval, sizeof(optval)) < 0)
err(1, "setsockopt(IP_HDRINCL)");
ip->ip_v = IPVERSION;
ip->ip_hl = sizeof(struct ip) >> 2;