From: Ted Lemon Date: Fri, 23 Apr 1999 22:15:43 +0000 (+0000) Subject: Get rid of incorrect data after payload messages. X-Git-Tag: V3-ALPHA-19990423~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=609115bc982007253bc430e7f1e3d2163ba9b4c1;p=thirdparty%2Fdhcp.git Get rid of incorrect data after payload messages. --- diff --git a/common/packet.c b/common/packet.c index ff76bbb59..ea81580e8 100644 --- a/common/packet.c +++ b/common/packet.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: packet.c,v 1.25 1999/04/23 15:38:57 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: packet.c,v 1.26 1999/04/23 22:15:43 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -287,7 +287,7 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen) } return -1; } - if (len + data != buf + buflen) + if (len + data != buf + bufix + buflen) log_debug ("accepting packet with data after udp payload."); } @@ -303,7 +303,7 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen) (u_int32_t) ntohs (udp -> uh_ulen))))); - ++udp_packets_seen; + udp_packets_seen++; if (usum && usum != sum) { udp_packets_bad_checksum++; if (udp_packets_seen > 4 &&