mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-04 08:15:14 +00:00
Fix copyright; SA_LEN instead of SIN_LEN; formatting consistency
This commit is contained in:
9
dhcp.c
9
dhcp.c
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"@(#) Copyright (c) 1995 The Internet Software Consortium. All rights reserved.\n";
|
"@(#) Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -297,7 +297,7 @@ void nak_lease (packet, cip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
to.sin_family = AF_INET;
|
to.sin_family = AF_INET;
|
||||||
#ifdef HAVE_SIN_LEN
|
#ifdef HAVE_SA_LEN
|
||||||
to.sin_len = sizeof to;
|
to.sin_len = sizeof to;
|
||||||
#endif
|
#endif
|
||||||
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
||||||
@@ -533,7 +533,8 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
|
|
||||||
/* Sanity check the lease time. */
|
/* Sanity check the lease time. */
|
||||||
if ((lease->offered_expiry - cur_time) < 0)
|
if ((lease->offered_expiry - cur_time) < 0)
|
||||||
putULong(lease_time_buf, packet->subnet->default_lease_time);
|
putULong (lease_time_buf,
|
||||||
|
packet -> subnet -> default_lease_time);
|
||||||
else if (lease -> offered_expiry - cur_time >
|
else if (lease -> offered_expiry - cur_time >
|
||||||
packet -> subnet -> max_lease_time)
|
packet -> subnet -> max_lease_time)
|
||||||
putULong (lease_time_buf, packet -> subnet -> max_lease_time);
|
putULong (lease_time_buf, packet -> subnet -> max_lease_time);
|
||||||
@@ -582,7 +583,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
}
|
}
|
||||||
|
|
||||||
to.sin_family = AF_INET;
|
to.sin_family = AF_INET;
|
||||||
#ifdef HAVE_SIN_LEN
|
#ifdef HAVE_SA_LEN
|
||||||
to.sin_len = sizeof to;
|
to.sin_len = sizeof to;
|
||||||
#endif
|
#endif
|
||||||
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"@(#) Copyright (c) 1995 The Internet Software Consortium. All rights reserved.\n";
|
"@(#) Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -297,7 +297,7 @@ void nak_lease (packet, cip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
to.sin_family = AF_INET;
|
to.sin_family = AF_INET;
|
||||||
#ifdef HAVE_SIN_LEN
|
#ifdef HAVE_SA_LEN
|
||||||
to.sin_len = sizeof to;
|
to.sin_len = sizeof to;
|
||||||
#endif
|
#endif
|
||||||
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
||||||
@@ -533,7 +533,8 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
|
|
||||||
/* Sanity check the lease time. */
|
/* Sanity check the lease time. */
|
||||||
if ((lease->offered_expiry - cur_time) < 0)
|
if ((lease->offered_expiry - cur_time) < 0)
|
||||||
putULong(lease_time_buf, packet->subnet->default_lease_time);
|
putULong (lease_time_buf,
|
||||||
|
packet -> subnet -> default_lease_time);
|
||||||
else if (lease -> offered_expiry - cur_time >
|
else if (lease -> offered_expiry - cur_time >
|
||||||
packet -> subnet -> max_lease_time)
|
packet -> subnet -> max_lease_time)
|
||||||
putULong (lease_time_buf, packet -> subnet -> max_lease_time);
|
putULong (lease_time_buf, packet -> subnet -> max_lease_time);
|
||||||
@@ -582,7 +583,7 @@ void ack_lease (packet, lease, offer, when)
|
|||||||
}
|
}
|
||||||
|
|
||||||
to.sin_family = AF_INET;
|
to.sin_family = AF_INET;
|
||||||
#ifdef HAVE_SIN_LEN
|
#ifdef HAVE_SA_LEN
|
||||||
to.sin_len = sizeof to;
|
to.sin_len = sizeof to;
|
||||||
#endif
|
#endif
|
||||||
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
memset (to.sin_zero, 0, sizeof to.sin_zero);
|
||||||
|
Reference in New Issue
Block a user