*** From dhcp-server -- To unsubscribe, see the end of this message. ***
The patch I've included below will get the DHCP server and client
working, but there is still some fiddling I need to do.
_MelloN_
Index: packet.c
===================================================================
RCS file: /proj/src/isc/cvs-1/DHCP/common/packet.c,v
retrieving revision 1.24
diff -c -r1.24 packet.c
*** packet.c 1999/04/12 21:37:03 1.24
--- packet.c 1999/04/22 03:14:24
***************
*** 250,261 ****
return -1;
#endif /* USERLAND_FILTER */
- ++ip_packets_seen;
/* Check the IP header checksum - it should be zero. */
if (wrapsum (checksum (buf + bufix, ip_len, 0))) {
++ip_packets_bad_checksum;
if (ip_packets_seen > 4 &&
! (++ip_packets_seen / ++ip_packets_bad_checksum) < 2) {
log_info ("%d bad IP checksums seen in %d packets",
ip_packets_bad_checksum, ip_packets_seen);
ip_packets_seen = ip_packets_bad_checksum = 0;
--- 250,261 ----
return -1;
#endif /* USERLAND_FILTER */
/* Check the IP header checksum - it should be zero. */
+ ++ip_packets_seen;
if (wrapsum (checksum (buf + bufix, ip_len, 0))) {
++ip_packets_bad_checksum;
if (ip_packets_seen > 4 &&
! (ip_packets_seen / ip_packets_bad_checksum) < 2) {
log_info ("%d bad IP checksums seen in %d packets",
ip_packets_bad_checksum, ip_packets_seen);
ip_packets_seen = ip_packets_bad_checksum = 0;
***************
*** 279,285 ****
data = buf + bufix + ip_len + sizeof *udp;
len = ntohs (udp -> uh_ulen) - sizeof *udp;
++udp_packets_length_checked;
! if (len + data > buf + buflen) {
++udp_packets_length_overflow;
if (udp_packets_length_checked > 4 &&
(udp_packets_length_checked /
--- 279,285 ----
data = buf + bufix + ip_len + sizeof *udp;
len = ntohs (udp -> uh_ulen) - sizeof *udp;
++udp_packets_length_checked;
! if (len + data > buf + bufix + buflen) {
++udp_packets_length_overflow;
if (udp_packets_length_checked > 4 &&
(udp_packets_length_checked /
***************
*** 287,294 ****
log_info ("%d udp packets in %d too long - dropped",
udp_packets_length_overflow,
udp_packets_length_checked);
! udp_packets_length_overflow
! = udp_packets_length_checked = 0;
}
return -1;
}
--- 287,294 ----
log_info ("%d udp packets in %d too long - dropped",
udp_packets_length_overflow,
udp_packets_length_checked);
! udp_packets_length_overflow =
! udp_packets_length_checked = 0;
}
return -1;
}
***************
*** 310,319 ****
++udp_packets_seen;
if (usum && usum != sum) {
! ++udp_packets_bad_checksum;
if (udp_packets_seen > 4 &&
(udp_packets_seen / udp_packets_bad_checksum) < 2) {
! log_info ("%d bad udp checksums seen in %d packets",
udp_packets_bad_checksum, udp_packets_seen);
udp_packets_seen = udp_packets_bad_checksum = 0;
}
--- 310,319 ----
++udp_packets_seen;
if (usum && usum != sum) {
! udp_packets_bad_checksum++;
if (udp_packets_seen > 4 &&
(udp_packets_seen / udp_packets_bad_checksum) < 2) {
! log_info ("%d bad udp checksums in %d packets",
udp_packets_bad_checksum, udp_packets_seen);
udp_packets_seen = udp_packets_bad_checksum = 0;
}
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dhcp/lists
If you are without web access, or if you are having trouble with the web page,
please send mail to [EMAIL PROTECTED] Please try to use the web
page first - it will take a long time for your request to be processed by hand.
Archives for this mailing list are available at
http://www.webnology.com/list-archives/dhcp/dhcp-server
------------------------------------------------------------------------------