From 9e9b2261b11db8aa7f73fafc4d6ed253db29fa3a Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Wed, 5 Jan 2000 18:17:10 +0000 Subject: Support new struct hardware. --- relay/dhcrelay.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'relay') diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index 80d9dd0d..9eeede99 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -22,7 +22,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhcrelay.c,v 1.36 1999/10/28 13:09:35 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhcrelay.c,v 1.37 2000/01/05 18:11:53 mellon Exp $ Copyright (c) 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -336,11 +336,9 @@ void relay (ip, packet, length, from_port, from, hfrom) to.sin_len = sizeof to; #endif - memcpy (hto.haddr, packet -> chaddr, - (packet -> hlen > sizeof hto.haddr - ? sizeof hto.haddr - : packet -> hlen)); - hto.htype = packet -> htype; + memcpy (&hto.hbuf [1], packet -> chaddr, packet -> hlen); + hto.hbuf [0] = packet -> htype; + hto.hlen = packet -> hlen + 1; /* Wipe out the agent relay options and, if possible, figure out which interface to use based on the contents of the -- cgit v1.2.1