2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Add HAVE_SIN_LEN; encase debugging statements in ifdef DEBUG; fix destination port botch

This commit is contained in:
Ted Lemon
1996-03-06 10:40:08 +00:00
parent 8e3de495cb
commit be1b6e8227
2 changed files with 12 additions and 6 deletions

View File

@@ -249,7 +249,9 @@ void nak_lease (packet)
}
to.sin_family = AF_INET;
#ifdef HAVE_SIN_LEN
to.sin_len = sizeof to;
#endif
memset (to.sin_zero, 0, sizeof to.sin_zero);
note ("Sending dhcp NAK to %s, port %d",
@@ -261,7 +263,7 @@ void nak_lease (packet)
if (result < 0)
warn ("sendto: %m");
#if 0
#ifdef DEBUG
dump_packet (packet);
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
dump_packet (&outgoing);
@@ -510,9 +512,10 @@ void ack_lease (packet, lease, offer, when)
to.sin_port = htons (ntohs (server_port) + 1); /* XXX */
}
to.sin_port = htons (ntohs (server_port) + 1); /* XXX */
to.sin_family = AF_INET;
#ifdef HAVE_SIN_LEN
to.sin_len = sizeof to;
#endif
memset (to.sin_zero, 0, sizeof to.sin_zero);
note ("Sending dhcp reply to %s, port %d",
@@ -524,7 +527,7 @@ void ack_lease (packet, lease, offer, when)
if (result < 0)
warn ("sendto: %m");
#if 0
#ifdef DEBUG
dump_packet (packet);
dump_raw ((unsigned char *)packet -> raw, packet -> packet_length);
dump_packet (&outgoing);