summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-04-22 15:22:49 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-04-22 15:22:49 +0000
commit07ad12b9bcc09a28c09cb49248a600d6c9b2d8ed (patch)
tree2a4e84e86fd052bdbefff4c08172fea2721c6484 /usr.sbin
parentca99c31b79f8022ed3138bcb4fff8f63e30e8cfe (diff)
instead of using some lower 16 bits of some address on the stack that
even requires knowledge about wether the machine is 32 or 64 bit, use getpid() for the icmp id. that is not optimal, but matches what ping does and the way to go for now.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/dhcpd/dhcpd.h6
-rw-r--r--usr.sbin/dhcpd/icmp.c9
2 files changed, 3 insertions, 12 deletions
diff --git a/usr.sbin/dhcpd/dhcpd.h b/usr.sbin/dhcpd/dhcpd.h
index 7432afaff57..380a7bc5f33 100644
--- a/usr.sbin/dhcpd/dhcpd.h
+++ b/usr.sbin/dhcpd/dhcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.h,v 1.10 2004/04/21 09:11:58 canacar Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.11 2004/04/22 15:22:48 henning Exp $ */
/*
* Copyright (c) 1995, 1996, 1997, 1998, 1999
@@ -90,10 +90,6 @@ extern int h_errno;
#define HAVE_SA_LEN
#define HAVE_MKSTEMP
-#if defined(__alpha__) || (defined(__sparc64__) && defined(__arch64__))
-#define PTRSIZE_64BIT
-#endif
-
#include "dhcp.h"
#include "tree.h"
diff --git a/usr.sbin/dhcpd/icmp.c b/usr.sbin/dhcpd/icmp.c
index 271dd2ea379..ba39edc5bea 100644
--- a/usr.sbin/dhcpd/icmp.c
+++ b/usr.sbin/dhcpd/icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp.c,v 1.7 2004/04/21 22:44:35 henning Exp $ */
+/* $OpenBSD: icmp.c,v 1.8 2004/04/22 15:22:48 henning Exp $ */
/*
* Copyright (c) 1997, 1998 The Internet Software Consortium.
@@ -95,12 +95,7 @@ icmp_echorequest(struct iaddr *addr)
icmp.icmp_code = 0;
icmp.icmp_cksum = 0;
icmp.icmp_seq = 0;
-#ifdef PTRSIZE_64BIT
- icmp.icmp_id = (((u_int32_t) (u_int64_t) addr) ^
- (u_int32_t) (((u_int64_t) addr) >> 32));
-#else
- icmp.icmp_id = (u_int32_t) addr;
-#endif
+ icmp.icmp_id = getpid() & 0xffff;
icmp.icmp_cksum = wrapsum(checksum((unsigned char *)&icmp,
sizeof(icmp), 0));