Merge branch 'f24'
This commit is contained in:
commit
896e81f5e6
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,3 +28,4 @@
|
|||||||
/dhcp-4.3.3b1.tar.gz
|
/dhcp-4.3.3b1.tar.gz
|
||||||
/dhcp-4.3.3.tar.gz
|
/dhcp-4.3.3.tar.gz
|
||||||
/dhcp-4.3.3-P1.tar.gz
|
/dhcp-4.3.3-P1.tar.gz
|
||||||
|
/dhcp-4.3.4.tar.gz
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
diff -up dhcp-4.3.2b1/common/lpf.c.IPoIB-log-id dhcp-4.3.2b1/common/lpf.c
|
diff -up dhcp-4.3.4/server/dhcp.c.IPoIB-log-id dhcp-4.3.4/server/dhcp.c
|
||||||
--- dhcp-4.3.2b1/common/lpf.c.IPoIB-log-id 2015-02-08 17:37:47.055023959 +0100
|
--- dhcp-4.3.4/server/dhcp.c.IPoIB-log-id 2016-04-29 12:52:14.285061620 +0200
|
||||||
+++ dhcp-4.3.2b1/common/lpf.c 2015-02-08 17:41:21.294972666 +0100
|
+++ dhcp-4.3.4/server/dhcp.c 2016-04-29 12:53:59.535088020 +0200
|
||||||
diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
@@ -85,6 +85,42 @@ const int dhcp_type_name_max = ((sizeof
|
||||||
--- dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id 2015-02-08 17:37:46.980025024 +0100
|
|
||||||
+++ dhcp-4.3.2b1/server/dhcp.c 2015-02-08 17:37:47.061023874 +0100
|
|
||||||
@@ -77,6 +77,42 @@ const int dhcp_type_name_max = ((sizeof
|
|
||||||
# define send_packet trace_packet_send
|
# define send_packet trace_packet_send
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -47,7 +44,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
void
|
void
|
||||||
dhcp (struct packet *packet) {
|
dhcp (struct packet *packet) {
|
||||||
int ms_nulltp = 0;
|
int ms_nulltp = 0;
|
||||||
@@ -105,9 +141,7 @@ dhcp (struct packet *packet) {
|
@@ -127,9 +163,7 @@ dhcp (struct packet *packet) {
|
||||||
|
|
||||||
log_info("%s from %s via %s: %s", s,
|
log_info("%s from %s via %s: %s", s,
|
||||||
(packet->raw->htype
|
(packet->raw->htype
|
||||||
@ -58,8 +55,8 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
: "<no identifier>"),
|
: "<no identifier>"),
|
||||||
packet->raw->giaddr.s_addr
|
packet->raw->giaddr.s_addr
|
||||||
? inet_ntoa(packet->raw->giaddr)
|
? inet_ntoa(packet->raw->giaddr)
|
||||||
@@ -289,9 +323,7 @@ void dhcpdiscover (packet, ms_nulltp)
|
@@ -326,9 +360,7 @@ void dhcpdiscover (packet, ms_nulltp)
|
||||||
*/
|
#endif
|
||||||
snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
|
snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
|
||||||
(packet -> raw -> htype
|
(packet -> raw -> htype
|
||||||
- ? print_hw_addr (packet -> raw -> htype,
|
- ? print_hw_addr (packet -> raw -> htype,
|
||||||
@ -69,7 +66,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
: (lease
|
: (lease
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
: "<no identifier>")),
|
: "<no identifier>")),
|
||||||
@@ -481,9 +513,7 @@ void dhcprequest (packet, ms_nulltp, ip_
|
@@ -540,9 +572,7 @@ void dhcprequest (packet, ms_nulltp, ip_
|
||||||
"DHCPREQUEST for %s%s from %s %s%s%svia %s",
|
"DHCPREQUEST for %s%s from %s %s%s%svia %s",
|
||||||
piaddr (cip), smbuf,
|
piaddr (cip), smbuf,
|
||||||
(packet -> raw -> htype
|
(packet -> raw -> htype
|
||||||
@ -80,7 +77,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
: (lease
|
: (lease
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
: "<no identifier>")),
|
: "<no identifier>")),
|
||||||
@@ -724,9 +754,7 @@ void dhcprelease (packet, ms_nulltp)
|
@@ -783,9 +813,7 @@ void dhcprelease (packet, ms_nulltp)
|
||||||
if ((oc = lookup_option (&dhcp_universe, packet -> options,
|
if ((oc = lookup_option (&dhcp_universe, packet -> options,
|
||||||
DHO_DHCP_REQUESTED_ADDRESS))) {
|
DHO_DHCP_REQUESTED_ADDRESS))) {
|
||||||
log_info ("DHCPRELEASE from %s specified requested-address.",
|
log_info ("DHCPRELEASE from %s specified requested-address.",
|
||||||
@ -91,7 +88,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
oc = lookup_option (&dhcp_universe, packet -> options,
|
oc = lookup_option (&dhcp_universe, packet -> options,
|
||||||
@@ -800,9 +828,7 @@ void dhcprelease (packet, ms_nulltp)
|
@@ -877,9 +905,7 @@ void dhcprelease (packet, ms_nulltp)
|
||||||
"DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
|
"DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
|
||||||
cstr,
|
cstr,
|
||||||
(packet -> raw -> htype
|
(packet -> raw -> htype
|
||||||
@ -102,7 +99,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
: (lease
|
: (lease
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
: "<no identifier>")),
|
: "<no identifier>")),
|
||||||
@@ -891,9 +917,7 @@ void dhcpdecline (packet, ms_nulltp)
|
@@ -984,9 +1010,7 @@ void dhcpdecline (packet, ms_nulltp)
|
||||||
"DHCPDECLINE of %s from %s %s%s%svia %s",
|
"DHCPDECLINE of %s from %s %s%s%svia %s",
|
||||||
piaddr (cip),
|
piaddr (cip),
|
||||||
(packet -> raw -> htype
|
(packet -> raw -> htype
|
||||||
@ -113,7 +110,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
: (lease
|
: (lease
|
||||||
? print_hex_1(lease->uid_len, lease->uid, 60)
|
? print_hex_1(lease->uid_len, lease->uid, 60)
|
||||||
: "<no identifier>")),
|
: "<no identifier>")),
|
||||||
@@ -1544,8 +1568,7 @@ void dhcpinform (packet, ms_nulltp)
|
@@ -1683,8 +1707,7 @@ void dhcpinform (packet, ms_nulltp)
|
||||||
/* Report what we're sending. */
|
/* Report what we're sending. */
|
||||||
snprintf(msgbuf, sizeof msgbuf, "DHCPACK to %s (%s) via", piaddr(cip),
|
snprintf(msgbuf, sizeof msgbuf, "DHCPACK to %s (%s) via", piaddr(cip),
|
||||||
(packet->raw->htype && packet->raw->hlen) ?
|
(packet->raw->htype && packet->raw->hlen) ?
|
||||||
@ -123,8 +120,8 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
"<no client hardware address>");
|
"<no client hardware address>");
|
||||||
log_info("%s %s", msgbuf, gip.len ? piaddr(gip) :
|
log_info("%s %s", msgbuf, gip.len ? piaddr(gip) :
|
||||||
packet->interface->name);
|
packet->interface->name);
|
||||||
@@ -1711,9 +1734,7 @@ void nak_lease (packet, cip, network_gro
|
@@ -1862,9 +1885,7 @@ void nak_lease (packet, cip, network_gro
|
||||||
/* Report what we're sending... */
|
#endif
|
||||||
log_info ("DHCPNAK on %s to %s via %s",
|
log_info ("DHCPNAK on %s to %s via %s",
|
||||||
piaddr (*cip),
|
piaddr (*cip),
|
||||||
- print_hw_addr (packet -> raw -> htype,
|
- print_hw_addr (packet -> raw -> htype,
|
||||||
@ -134,7 +131,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
packet -> raw -> giaddr.s_addr
|
packet -> raw -> giaddr.s_addr
|
||||||
? inet_ntoa (packet -> raw -> giaddr)
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
: packet -> interface -> name);
|
: packet -> interface -> name);
|
||||||
@@ -3617,7 +3638,7 @@ void dhcp_reply (lease)
|
@@ -3859,7 +3880,7 @@ void dhcp_reply (lease)
|
||||||
? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
|
? (state -> offer == DHCPACK ? "DHCPACK" : "DHCPOFFER")
|
||||||
: "BOOTREPLY"),
|
: "BOOTREPLY"),
|
||||||
piaddr (lease -> ip_addr),
|
piaddr (lease -> ip_addr),
|
||||||
@ -143,7 +140,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
? print_hw_addr (lease -> hardware_addr.hbuf [0],
|
? print_hw_addr (lease -> hardware_addr.hbuf [0],
|
||||||
lease -> hardware_addr.hlen - 1,
|
lease -> hardware_addr.hlen - 1,
|
||||||
&lease -> hardware_addr.hbuf [1])
|
&lease -> hardware_addr.hbuf [1])
|
||||||
@@ -4171,10 +4192,7 @@ int find_lease (struct lease **lp,
|
@@ -4408,10 +4429,7 @@ int find_lease (struct lease **lp,
|
||||||
if (uid_lease) {
|
if (uid_lease) {
|
||||||
if (uid_lease->binding_state == FTS_ACTIVE) {
|
if (uid_lease->binding_state == FTS_ACTIVE) {
|
||||||
log_error ("client %s has duplicate%s on %s",
|
log_error ("client %s has duplicate%s on %s",
|
||||||
@ -155,7 +152,7 @@ diff -up dhcp-4.3.2b1/server/dhcp.c.IPoIB-log-id dhcp-4.3.2b1/server/dhcp.c
|
|||||||
" leases",
|
" leases",
|
||||||
(ip_lease -> subnet ->
|
(ip_lease -> subnet ->
|
||||||
shared_network -> name));
|
shared_network -> name));
|
||||||
@@ -4341,9 +4359,7 @@ int find_lease (struct lease **lp,
|
@@ -4578,9 +4596,7 @@ int find_lease (struct lease **lp,
|
||||||
log_error("uid lease %s for client %s is duplicate "
|
log_error("uid lease %s for client %s is duplicate "
|
||||||
"on %s",
|
"on %s",
|
||||||
piaddr(uid_lease->ip_addr),
|
piaddr(uid_lease->ip_addr),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.1b1/client/dhc6.c.mRfpsB dhcp-4.3.1b1/client/dhc6.c
|
diff -up dhcp-4.3.4/client/dhc6.c.PPP dhcp-4.3.4/client/dhc6.c
|
||||||
--- dhcp-4.3.1b1/client/dhc6.c.mRfpsB 2014-07-10 17:48:03.779424870 +0200
|
--- dhcp-4.3.4/client/dhc6.c.PPP 2016-04-29 12:46:29.824988665 +0200
|
||||||
+++ dhcp-4.3.1b1/client/dhc6.c 2014-07-10 17:48:03.795424644 +0200
|
+++ dhcp-4.3.4/client/dhc6.c 2016-04-29 12:46:29.828988666 +0200
|
||||||
@@ -5088,7 +5088,8 @@ make_client6_options(struct client_state
|
@@ -5641,7 +5641,8 @@ make_client6_options(struct client_state
|
||||||
*/
|
*/
|
||||||
if ((oc = lookup_option(&dhcpv6_universe, *op,
|
if ((oc = lookup_option(&dhcpv6_universe, *op,
|
||||||
D6O_CLIENTID)) == NULL) {
|
D6O_CLIENTID)) == NULL) {
|
||||||
@ -11,10 +11,10 @@ diff -up dhcp-4.3.1b1/client/dhc6.c.mRfpsB dhcp-4.3.1b1/client/dhc6.c
|
|||||||
MDL))
|
MDL))
|
||||||
log_fatal("Failure assembling a DUID.");
|
log_fatal("Failure assembling a DUID.");
|
||||||
|
|
||||||
diff -up dhcp-4.3.1b1/client/dhclient.c.mRfpsB dhcp-4.3.1b1/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.PPP dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.1b1/client/dhclient.c.mRfpsB 2014-07-10 17:39:25.853763858 +0200
|
--- dhcp-4.3.4/client/dhclient.c.PPP 2016-04-29 12:46:29.815988664 +0200
|
||||||
+++ dhcp-4.3.1b1/client/dhclient.c 2014-07-10 17:49:49.882925843 +0200
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:46:29.830988666 +0200
|
||||||
@@ -948,8 +948,8 @@ main(int argc, char **argv) {
|
@@ -1077,8 +1077,8 @@ main(int argc, char **argv) {
|
||||||
if (default_duid.buffer != NULL)
|
if (default_duid.buffer != NULL)
|
||||||
data_string_forget(&default_duid, MDL);
|
data_string_forget(&default_duid, MDL);
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.mRfpsB dhcp-4.3.1b1/client/dhclient.c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3267,7 +3267,7 @@ write_options(struct client_state *clien
|
@@ -3808,7 +3808,7 @@ write_options(struct client_state *clien
|
||||||
* is not how it is intended. Upcoming rearchitecting the client should
|
* is not how it is intended. Upcoming rearchitecting the client should
|
||||||
* address this "one daemon model."
|
* address this "one daemon model."
|
||||||
*/
|
*/
|
||||||
@ -34,7 +34,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.mRfpsB dhcp-4.3.1b1/client/dhclient.c
|
|||||||
form_duid(struct data_string *duid, const char *file, int line)
|
form_duid(struct data_string *duid, const char *file, int line)
|
||||||
{
|
{
|
||||||
struct interface_info *ip;
|
struct interface_info *ip;
|
||||||
@@ -3280,6 +3280,15 @@ form_duid(struct data_string *duid, cons
|
@@ -3821,6 +3821,15 @@ form_duid(struct data_string *duid, cons
|
||||||
if (ip == NULL)
|
if (ip == NULL)
|
||||||
log_fatal("Impossible condition at %s:%d.", MDL);
|
log_fatal("Impossible condition at %s:%d.", MDL);
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.mRfpsB dhcp-4.3.1b1/client/dhclient.c
|
|||||||
if ((ip->hw_address.hlen == 0) ||
|
if ((ip->hw_address.hlen == 0) ||
|
||||||
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
||||||
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
||||||
@@ -3323,6 +3332,8 @@ form_duid(struct data_string *duid, cons
|
@@ -3866,6 +3875,8 @@ form_duid(struct data_string *duid, cons
|
||||||
log_info("Created duid %s.", str);
|
log_info("Created duid %s.", str);
|
||||||
dfree(str, MDL);
|
dfree(str, MDL);
|
||||||
}
|
}
|
||||||
@ -59,10 +59,10 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.mRfpsB dhcp-4.3.1b1/client/dhclient.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Write the default DUID to the lease store. */
|
/* Write the default DUID to the lease store. */
|
||||||
diff -up dhcp-4.3.1b1/common/bpf.c.mRfpsB dhcp-4.3.1b1/common/bpf.c
|
diff -up dhcp-4.3.4/common/bpf.c.PPP dhcp-4.3.4/common/bpf.c
|
||||||
--- dhcp-4.3.1b1/common/bpf.c.mRfpsB 2014-07-10 17:39:25.797764653 +0200
|
--- dhcp-4.3.4/common/bpf.c.PPP 2016-04-29 12:46:29.794988660 +0200
|
||||||
+++ dhcp-4.3.1b1/common/bpf.c 2014-07-10 17:48:03.797424616 +0200
|
+++ dhcp-4.3.4/common/bpf.c 2016-04-29 12:46:29.830988666 +0200
|
||||||
@@ -600,6 +600,22 @@ get_hw_addr(const char *name, struct har
|
@@ -599,6 +599,22 @@ get_hw_addr(const char *name, struct har
|
||||||
memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
|
memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen);
|
||||||
break;
|
break;
|
||||||
#endif /* IFT_FDDI */
|
#endif /* IFT_FDDI */
|
||||||
@ -85,10 +85,10 @@ diff -up dhcp-4.3.1b1/common/bpf.c.mRfpsB dhcp-4.3.1b1/common/bpf.c
|
|||||||
default:
|
default:
|
||||||
log_fatal("Unsupported device type %d for \"%s\"",
|
log_fatal("Unsupported device type %d for \"%s\"",
|
||||||
sa->sdl_type, name);
|
sa->sdl_type, name);
|
||||||
diff -up dhcp-4.3.1b1/common/lpf.c.mRfpsB dhcp-4.3.1b1/common/lpf.c
|
diff -up dhcp-4.3.4/common/lpf.c.PPP dhcp-4.3.4/common/lpf.c
|
||||||
--- dhcp-4.3.1b1/common/lpf.c.mRfpsB 2014-07-10 17:39:25.744765404 +0200
|
--- dhcp-4.3.4/common/lpf.c.PPP 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.1b1/common/lpf.c 2014-07-10 17:48:03.797424616 +0200
|
+++ dhcp-4.3.4/common/lpf.c 2016-04-29 12:46:29.830988666 +0200
|
||||||
@@ -511,6 +511,22 @@ get_hw_addr(const char *name, struct har
|
@@ -548,6 +548,22 @@ get_hw_addr(const char *name, struct har
|
||||||
hw->hbuf[0] = HTYPE_FDDI;
|
hw->hbuf[0] = HTYPE_FDDI;
|
||||||
memcpy(&hw->hbuf[1], sa->sa_data, 6);
|
memcpy(&hw->hbuf[1], sa->sa_data, 6);
|
||||||
break;
|
break;
|
||||||
@ -111,21 +111,21 @@ diff -up dhcp-4.3.1b1/common/lpf.c.mRfpsB dhcp-4.3.1b1/common/lpf.c
|
|||||||
default:
|
default:
|
||||||
log_fatal("Unsupported device type %ld for \"%s\"",
|
log_fatal("Unsupported device type %ld for \"%s\"",
|
||||||
(long int)sa->sa_family, name);
|
(long int)sa->sa_family, name);
|
||||||
diff -up dhcp-4.3.1b1/includes/dhcpd.h.mRfpsB dhcp-4.3.1b1/includes/dhcpd.h
|
diff -up dhcp-4.3.4/includes/dhcpd.h.PPP dhcp-4.3.4/includes/dhcpd.h
|
||||||
--- dhcp-4.3.1b1/includes/dhcpd.h.mRfpsB 2014-07-10 17:48:03.761425124 +0200
|
--- dhcp-4.3.4/includes/dhcpd.h.PPP 2016-04-29 12:46:29.831988667 +0200
|
||||||
+++ dhcp-4.3.1b1/includes/dhcpd.h 2014-07-10 17:48:03.798424601 +0200
|
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:47:13.167995959 +0200
|
||||||
@@ -2839,7 +2839,7 @@ void client_dns_remove(struct client_sta
|
@@ -2990,7 +2990,7 @@ void client_dns_remove(struct client_sta
|
||||||
|
|
||||||
void dhcpv4_client_assignments(void);
|
void dhcpv4_client_assignments(void);
|
||||||
void dhcpv6_client_assignments(void);
|
void dhcpv6_client_assignments(void);
|
||||||
-void form_duid(struct data_string *duid, const char *file, int line);
|
-void form_duid(struct data_string *duid, const char *file, int line);
|
||||||
+isc_result_t form_duid(struct data_string *duid, const char *file, int line);
|
+isc_result_t form_duid(struct data_string *duid, const char *file, int line);
|
||||||
|
|
||||||
/* dhc6.c */
|
void dhcp4o6_start(void);
|
||||||
void dhc6_lease_destroy(struct dhc6_lease **src, const char *file, int line);
|
|
||||||
diff -up dhcp-4.3.1b1/includes/dhcp.h.mRfpsB dhcp-4.3.1b1/includes/dhcp.h
|
diff -up dhcp-4.3.4/includes/dhcp.h.PPP dhcp-4.3.4/includes/dhcp.h
|
||||||
--- dhcp-4.3.1b1/includes/dhcp.h.mRfpsB 2014-07-10 17:48:03.761425124 +0200
|
--- dhcp-4.3.4/includes/dhcp.h.PPP 2016-04-29 12:46:29.822988665 +0200
|
||||||
+++ dhcp-4.3.1b1/includes/dhcp.h 2014-07-10 17:48:03.798424601 +0200
|
+++ dhcp-4.3.4/includes/dhcp.h 2016-04-29 12:46:29.832988667 +0200
|
||||||
@@ -81,6 +81,8 @@ struct dhcp_packet {
|
@@ -81,6 +81,8 @@ struct dhcp_packet {
|
||||||
* is no standard for this so we
|
* is no standard for this so we
|
||||||
* just steal a type */
|
* just steal a type */
|
||||||
@ -135,10 +135,10 @@ diff -up dhcp-4.3.1b1/includes/dhcp.h.mRfpsB dhcp-4.3.1b1/includes/dhcp.h
|
|||||||
/* Magic cookie validating dhcp options field (and bootp vendor
|
/* Magic cookie validating dhcp options field (and bootp vendor
|
||||||
extensions field). */
|
extensions field). */
|
||||||
#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
|
#define DHCP_OPTIONS_COOKIE "\143\202\123\143"
|
||||||
diff -up dhcp-4.3.1b1/server/dhcpv6.c.mRfpsB dhcp-4.3.1b1/server/dhcpv6.c
|
diff -up dhcp-4.3.4/server/dhcpv6.c.PPP dhcp-4.3.4/server/dhcpv6.c
|
||||||
--- dhcp-4.3.1b1/server/dhcpv6.c.mRfpsB 2014-07-10 17:47:31.464881409 +0200
|
--- dhcp-4.3.4/server/dhcpv6.c.PPP 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.1b1/server/dhcpv6.c 2014-07-10 17:48:03.800424573 +0200
|
+++ dhcp-4.3.4/server/dhcpv6.c 2016-04-29 12:46:29.833988667 +0200
|
||||||
@@ -330,6 +330,9 @@ generate_new_server_duid(void) {
|
@@ -454,6 +454,9 @@ generate_new_server_duid(void) {
|
||||||
if (p->hw_address.hlen > 0) {
|
if (p->hw_address.hlen > 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
From 7a1862a392038407371d6889e49b06848efa637f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jiri Popelka <jpopelka@redhat.com>
|
|
||||||
Date: Thu, 3 Sep 2015 18:25:42 +0200
|
|
||||||
Subject: [PATCH] VLAN ID is only bottom 12-bits of TCI
|
|
||||||
|
|
||||||
The upper 4 bits contain metadata used for quality of service
|
|
||||||
management.
|
|
||||||
|
|
||||||
TCI(16b) = PCP(3b) + DEI(1b) + VID(12b)
|
|
||||||
|
|
||||||
TCI = Tag control information
|
|
||||||
PCP = Priority code point
|
|
||||||
DEI = Drop eligible indicator
|
|
||||||
VID = VLAN identifier
|
|
||||||
---
|
|
||||||
common/lpf.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/common/lpf.c b/common/lpf.c
|
|
||||||
index 7889b6b..4c835e6 100644
|
|
||||||
--- a/common/lpf.c
|
|
||||||
+++ b/common/lpf.c
|
|
||||||
@@ -425,7 +425,8 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|
||||||
/* Discard packets with stripped vlan id */
|
|
||||||
|
|
||||||
#ifdef VLAN_TCI_PRESENT
|
|
||||||
- if (aux->tp_vlan_tci != 0)
|
|
||||||
+ /* VLAN ID is only bottom 12-bits of TCI */
|
|
||||||
+ if (aux->tp_vlan_tci & 0x0fff)
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.1b1/client/dhclient.8.zzftXp dhcp-4.3.1b1/client/dhclient.8
|
diff -up dhcp-4.3.4/client/dhclient.8.capability dhcp-4.3.4/client/dhclient.8
|
||||||
--- dhcp-4.3.1b1/client/dhclient.8.zzftXp 2014-07-10 17:38:26.938599402 +0200
|
--- dhcp-4.3.4/client/dhclient.8.capability 2016-04-29 12:19:40.657129322 +0200
|
||||||
+++ dhcp-4.3.1b1/client/dhclient.8 2014-07-10 17:39:25.852763873 +0200
|
+++ dhcp-4.3.4/client/dhclient.8 2016-04-29 12:19:40.715129297 +0200
|
||||||
@@ -128,6 +128,9 @@ dhclient - Dynamic Host Configuration Pr
|
@@ -134,6 +134,9 @@ dhclient - Dynamic Host Configuration Pr
|
||||||
.B -w
|
.B -w
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
@ -11,7 +11,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.8.zzftXp dhcp-4.3.1b1/client/dhclient.8
|
|||||||
.B -B
|
.B -B
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
@@ -304,6 +307,32 @@ has been added or removed, so that the c
|
@@ -318,6 +321,32 @@ has been added or removed, so that the c
|
||||||
address on that interface.
|
address on that interface.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
@ -44,11 +44,11 @@ diff -up dhcp-4.3.1b1/client/dhclient.8.zzftXp dhcp-4.3.1b1/client/dhclient.8
|
|||||||
.BI \-B
|
.BI \-B
|
||||||
Set the BOOTP broadcast flag in request packets so servers will always
|
Set the BOOTP broadcast flag in request packets so servers will always
|
||||||
broadcast replies.
|
broadcast replies.
|
||||||
diff -up dhcp-4.3.1b1/client/dhclient.c.zzftXp dhcp-4.3.1b1/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.capability dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.1b1/client/dhclient.c.zzftXp 2014-07-10 17:39:25.797764653 +0200
|
--- dhcp-4.3.4/client/dhclient.c.capability 2016-04-29 12:19:40.691129307 +0200
|
||||||
+++ dhcp-4.3.1b1/client/dhclient.c 2014-07-10 17:39:25.853763858 +0200
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:21:07.620091930 +0200
|
||||||
@@ -39,6 +39,10 @@
|
@@ -40,6 +40,10 @@
|
||||||
#include <limits.h>
|
#include <isc/file.h>
|
||||||
#include <dns/result.h>
|
#include <dns/result.h>
|
||||||
|
|
||||||
+#ifdef HAVE_LIBCAP_NG
|
+#ifdef HAVE_LIBCAP_NG
|
||||||
@ -58,7 +58,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.zzftXp dhcp-4.3.1b1/client/dhclient.c
|
|||||||
/*
|
/*
|
||||||
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
|
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
|
||||||
* that when building ISC code.
|
* that when building ISC code.
|
||||||
@@ -143,6 +147,9 @@ main(int argc, char **argv) {
|
@@ -237,6 +241,9 @@ main(int argc, char **argv) {
|
||||||
int timeout_arg = 0;
|
int timeout_arg = 0;
|
||||||
char *arg_conf = NULL;
|
char *arg_conf = NULL;
|
||||||
int arg_conf_len = 0;
|
int arg_conf_len = 0;
|
||||||
@ -68,7 +68,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.zzftXp dhcp-4.3.1b1/client/dhclient.c
|
|||||||
|
|
||||||
/* Initialize client globals. */
|
/* Initialize client globals. */
|
||||||
memset(&default_duid, 0, sizeof(default_duid));
|
memset(&default_duid, 0, sizeof(default_duid));
|
||||||
@@ -425,6 +432,10 @@ main(int argc, char **argv) {
|
@@ -537,6 +544,10 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
dhclient_request_options = argv[i];
|
dhclient_request_options = argv[i];
|
||||||
@ -77,9 +77,9 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.zzftXp dhcp-4.3.1b1/client/dhclient.c
|
|||||||
+ keep_capabilities = 1;
|
+ keep_capabilities = 1;
|
||||||
+#endif
|
+#endif
|
||||||
} else if (argv[i][0] == '-') {
|
} else if (argv[i][0] == '-') {
|
||||||
usage();
|
usage("Unknown command: %s", argv[i]);
|
||||||
} else if (interfaces_requested < 0) {
|
} else if (interfaces_requested < 0) {
|
||||||
@@ -473,6 +484,19 @@ main(int argc, char **argv) {
|
@@ -597,6 +608,19 @@ main(int argc, char **argv) {
|
||||||
path_dhclient_script = s;
|
path_dhclient_script = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,9 +99,9 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.zzftXp dhcp-4.3.1b1/client/dhclient.c
|
|||||||
/* Set up the initial dhcp option universe. */
|
/* Set up the initial dhcp option universe. */
|
||||||
initialize_common_option_spaces();
|
initialize_common_option_spaces();
|
||||||
|
|
||||||
diff -up dhcp-4.3.1b1/client/dhclient-script.8.zzftXp dhcp-4.3.1b1/client/dhclient-script.8
|
diff -up dhcp-4.3.4/client/dhclient-script.8.capability dhcp-4.3.4/client/dhclient-script.8
|
||||||
--- dhcp-4.3.1b1/client/dhclient-script.8.zzftXp 2014-07-10 17:39:25.761765163 +0200
|
--- dhcp-4.3.4/client/dhclient-script.8.capability 2016-04-29 12:19:40.668129317 +0200
|
||||||
+++ dhcp-4.3.1b1/client/dhclient-script.8 2014-07-10 17:39:25.851763887 +0200
|
+++ dhcp-4.3.4/client/dhclient-script.8 2016-04-29 12:19:40.717129296 +0200
|
||||||
@@ -243,6 +243,16 @@ repeatedly initialized to the values pro
|
@@ -243,6 +243,16 @@ repeatedly initialized to the values pro
|
||||||
the other. Assuming the information provided by both servers is
|
the other. Assuming the information provided by both servers is
|
||||||
valid, this shouldn't cause any real problems, but it could be
|
valid, this shouldn't cause any real problems, but it could be
|
||||||
@ -119,10 +119,10 @@ diff -up dhcp-4.3.1b1/client/dhclient-script.8.zzftXp dhcp-4.3.1b1/client/dhclie
|
|||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
|
dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
|
||||||
dhclient.leases(5).
|
dhclient.leases(5).
|
||||||
diff -up dhcp-4.3.1b1/client/Makefile.am.zzftXp dhcp-4.3.1b1/client/Makefile.am
|
diff -up dhcp-4.3.4/client/Makefile.am.capability dhcp-4.3.4/client/Makefile.am
|
||||||
--- dhcp-4.3.1b1/client/Makefile.am.zzftXp 2014-07-10 17:38:10.778828583 +0200
|
--- dhcp-4.3.4/client/Makefile.am.capability 2016-04-29 12:19:40.652129324 +0200
|
||||||
+++ dhcp-4.3.1b1/client/Makefile.am 2014-07-10 17:39:25.851763887 +0200
|
+++ dhcp-4.3.4/client/Makefile.am 2016-04-29 12:19:40.717129296 +0200
|
||||||
@@ -10,7 +10,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
@@ -13,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
||||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||||
scripts/solaris scripts/openwrt
|
scripts/solaris scripts/openwrt
|
||||||
@ -131,10 +131,10 @@ diff -up dhcp-4.3.1b1/client/Makefile.am.zzftXp dhcp-4.3.1b1/client/Makefile.am
|
|||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
diff -up dhcp-4.3.1b1/configure.ac.zzftXp dhcp-4.3.1b1/configure.ac
|
diff -up dhcp-4.3.4/configure.ac.capability dhcp-4.3.4/configure.ac
|
||||||
--- dhcp-4.3.1b1/configure.ac.zzftXp 2014-07-10 17:38:10.779828569 +0200
|
--- dhcp-4.3.4/configure.ac.capability 2016-04-29 12:19:40.652129324 +0200
|
||||||
+++ dhcp-4.3.1b1/configure.ac 2014-07-10 17:39:25.854763844 +0200
|
+++ dhcp-4.3.4/configure.ac 2016-04-29 12:19:40.717129296 +0200
|
||||||
@@ -499,6 +499,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
|
@@ -585,6 +585,41 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
|
||||||
# Look for optional headers.
|
# Look for optional headers.
|
||||||
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
|
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
|
||||||
|
|
||||||
@ -176,12 +176,12 @@ diff -up dhcp-4.3.1b1/configure.ac.zzftXp dhcp-4.3.1b1/configure.ac
|
|||||||
# Solaris needs some libraries for functions
|
# Solaris needs some libraries for functions
|
||||||
AC_SEARCH_LIBS(socket, [socket])
|
AC_SEARCH_LIBS(socket, [socket])
|
||||||
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
AC_SEARCH_LIBS(inet_ntoa, [nsl])
|
||||||
diff -up dhcp-4.3.1b1/relay/dhcrelay.c.zzftXp dhcp-4.3.1b1/relay/dhcrelay.c
|
diff -up dhcp-4.3.4/relay/dhcrelay.c.capability dhcp-4.3.4/relay/dhcrelay.c
|
||||||
--- dhcp-4.3.1b1/relay/dhcrelay.c.zzftXp 2014-07-10 17:39:25.799764624 +0200
|
--- dhcp-4.3.4/relay/dhcrelay.c.capability 2016-04-29 12:19:40.694129306 +0200
|
||||||
+++ dhcp-4.3.1b1/relay/dhcrelay.c 2014-07-10 17:40:19.191007421 +0200
|
+++ dhcp-4.3.4/relay/dhcrelay.c 2016-04-29 12:22:30.278056386 +0200
|
||||||
@@ -31,6 +31,11 @@
|
@@ -32,6 +32,11 @@
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <isc/file.h>
|
||||||
|
|
||||||
+#ifdef HAVE_LIBCAP_NG
|
+#ifdef HAVE_LIBCAP_NG
|
||||||
+# include <cap-ng.h>
|
+# include <cap-ng.h>
|
||||||
@ -191,8 +191,8 @@ diff -up dhcp-4.3.1b1/relay/dhcrelay.c.zzftXp dhcp-4.3.1b1/relay/dhcrelay.c
|
|||||||
TIME default_lease_time = 43200; /* 12 hours... */
|
TIME default_lease_time = 43200; /* 12 hours... */
|
||||||
TIME max_lease_time = 86400; /* 24 hours... */
|
TIME max_lease_time = 86400; /* 24 hours... */
|
||||||
struct tree_cache *global_options[256];
|
struct tree_cache *global_options[256];
|
||||||
@@ -376,6 +381,10 @@ main(int argc, char **argv) {
|
@@ -454,6 +459,10 @@ main(int argc, char **argv) {
|
||||||
usage();
|
usage(use_noarg, argv[i-1]);
|
||||||
dhcrelay_sub_id = argv[i];
|
dhcrelay_sub_id = argv[i];
|
||||||
#endif
|
#endif
|
||||||
+ } else if (!strcmp(argv[i], "-nc")) {
|
+ } else if (!strcmp(argv[i], "-nc")) {
|
||||||
@ -201,8 +201,8 @@ diff -up dhcp-4.3.1b1/relay/dhcrelay.c.zzftXp dhcp-4.3.1b1/relay/dhcrelay.c
|
|||||||
+#endif
|
+#endif
|
||||||
} else if (!strcmp(argv[i], "-pf")) {
|
} else if (!strcmp(argv[i], "-pf")) {
|
||||||
if (++i == argc)
|
if (++i == argc)
|
||||||
usage();
|
usage(use_noarg, argv[i-1]);
|
||||||
@@ -446,6 +455,17 @@ main(int argc, char **argv) {
|
@@ -528,6 +537,17 @@ main(int argc, char **argv) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ diff -up dhcp-4.3.1b1/relay/dhcrelay.c.zzftXp dhcp-4.3.1b1/relay/dhcrelay.c
|
|||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
log_info("%s %s", message, PACKAGE_VERSION);
|
log_info("%s %s", message, PACKAGE_VERSION);
|
||||||
log_info(copyright);
|
log_info(copyright);
|
||||||
@@ -598,6 +618,15 @@ main(int argc, char **argv) {
|
@@ -680,6 +700,15 @@ main(int argc, char **argv) {
|
||||||
signal(SIGTERM, dhcp_signal_handler); /* kill */
|
signal(SIGTERM, dhcp_signal_handler); /* kill */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -236,9 +236,9 @@ diff -up dhcp-4.3.1b1/relay/dhcrelay.c.zzftXp dhcp-4.3.1b1/relay/dhcrelay.c
|
|||||||
/* Start dispatching packets and timeouts... */
|
/* Start dispatching packets and timeouts... */
|
||||||
dispatch();
|
dispatch();
|
||||||
|
|
||||||
diff -up dhcp-4.3.1b1/relay/Makefile.am.zzftXp dhcp-4.3.1b1/relay/Makefile.am
|
diff -up dhcp-4.3.4/relay/Makefile.am.capability dhcp-4.3.4/relay/Makefile.am
|
||||||
--- dhcp-4.3.1b1/relay/Makefile.am.zzftXp 2014-07-10 17:38:10.780828554 +0200
|
--- dhcp-4.3.4/relay/Makefile.am.capability 2016-04-29 12:19:40.653129323 +0200
|
||||||
+++ dhcp-4.3.1b1/relay/Makefile.am 2014-07-10 17:39:25.854763844 +0200
|
+++ dhcp-4.3.4/relay/Makefile.am 2016-04-29 12:19:40.718129295 +0200
|
||||||
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||||
|
|
||||||
sbin_PROGRAMS = dhcrelay
|
sbin_PROGRAMS = dhcrelay
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
diff -up dhcp-4.3.1/client/dhclient.c.bind-iface dhcp-4.3.1/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.bind-iface dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.1/client/dhclient.c.bind-iface 2015-02-03 12:06:57.040989568 +0100
|
--- dhcp-4.3.4/client/dhclient.c.bind-iface 2016-04-29 13:06:50.595257108 +0200
|
||||||
+++ dhcp-4.3.1/client/dhclient.c 2015-02-03 12:08:28.716684946 +0100
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 13:08:30.237281528 +0200
|
||||||
@@ -2661,6 +2661,14 @@ void send_request (cpp)
|
@@ -3023,6 +3023,14 @@ void send_request (cpp)
|
||||||
|
#endif
|
||||||
if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
|
if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
|
||||||
fallback_interface) {
|
fallback_interface) {
|
||||||
+#if defined(SO_BINDTODEVICE)
|
+#if defined(SO_BINDTODEVICE)
|
||||||
@ -16,7 +16,7 @@ diff -up dhcp-4.3.1/client/dhclient.c.bind-iface dhcp-4.3.1/client/dhclient.c
|
|||||||
result = send_packet(fallback_interface, NULL, &client->packet,
|
result = send_packet(fallback_interface, NULL, &client->packet,
|
||||||
client->packet_length, from, &destination,
|
client->packet_length, from, &destination,
|
||||||
NULL);
|
NULL);
|
||||||
@@ -2670,6 +2678,13 @@ void send_request (cpp)
|
@@ -3032,6 +3040,13 @@ void send_request (cpp)
|
||||||
client->packet_length,
|
client->packet_length,
|
||||||
fallback_interface->name);
|
fallback_interface->name);
|
||||||
}
|
}
|
||||||
@ -30,9 +30,9 @@ diff -up dhcp-4.3.1/client/dhclient.c.bind-iface dhcp-4.3.1/client/dhclient.c
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Send out a packet. */
|
/* Send out a packet. */
|
||||||
@@ -2749,6 +2764,14 @@ void send_release (cpp)
|
@@ -3144,6 +3159,14 @@ void send_release (cpp)
|
||||||
ntohs (destination.sin_port), ntohl(client -> xid));
|
} else
|
||||||
|
#endif
|
||||||
if (fallback_interface) {
|
if (fallback_interface) {
|
||||||
+#if defined(SO_BINDTODEVICE)
|
+#if defined(SO_BINDTODEVICE)
|
||||||
+ if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
|
+ if (setsockopt(fallback_interface -> wfdesc, SOL_SOCKET,
|
||||||
@ -45,7 +45,7 @@ diff -up dhcp-4.3.1/client/dhclient.c.bind-iface dhcp-4.3.1/client/dhclient.c
|
|||||||
result = send_packet(fallback_interface, NULL, &client->packet,
|
result = send_packet(fallback_interface, NULL, &client->packet,
|
||||||
client->packet_length, from, &destination,
|
client->packet_length, from, &destination,
|
||||||
NULL);
|
NULL);
|
||||||
@@ -2758,6 +2781,13 @@ void send_release (cpp)
|
@@ -3153,6 +3176,13 @@ void send_release (cpp)
|
||||||
client->packet_length,
|
client->packet_length,
|
||||||
fallback_interface->name);
|
fallback_interface->name);
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
diff -up dhcp-4.3.0a1/client/clparse.c.requested dhcp-4.3.0a1/client/clparse.c
|
diff -up dhcp-4.3.4/client/clparse.c.requested dhcp-4.3.4/client/clparse.c
|
||||||
--- dhcp-4.3.0a1/client/clparse.c.requested 2013-12-19 15:13:27.276631307 +0100
|
--- dhcp-4.3.4/client/clparse.c.requested 2016-04-29 12:18:50.157151352 +0200
|
||||||
+++ dhcp-4.3.0a1/client/clparse.c 2013-12-19 15:13:27.313630789 +0100
|
+++ dhcp-4.3.4/client/clparse.c 2016-04-29 12:19:22.235137243 +0200
|
||||||
@@ -37,7 +37,7 @@
|
@@ -31,7 +31,7 @@
|
||||||
|
|
||||||
struct client_config top_level_config;
|
struct client_config top_level_config;
|
||||||
|
|
||||||
-#define NUM_DEFAULT_REQUESTED_OPTS 9
|
-#define NUM_DEFAULT_REQUESTED_OPTS 9
|
||||||
+#define NUM_DEFAULT_REQUESTED_OPTS 14
|
+#define NUM_DEFAULT_REQUESTED_OPTS 14
|
||||||
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
|
/* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
|
||||||
|
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1];
|
||||||
|
|
||||||
static void parse_client_default_duid(struct parse *cfile);
|
@@ -116,6 +116,31 @@ isc_result_t read_client_conf ()
|
||||||
@@ -119,6 +119,31 @@ isc_result_t read_client_conf ()
|
|
||||||
option_code_hash_lookup(&default_requested_options[8],
|
option_code_hash_lookup(&default_requested_options[8],
|
||||||
dhcpv6_universe.code_hash, &code, 0, MDL);
|
dhcpv6_universe.code_hash, &code, 0, MDL);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.1b1/client/dhclient.c.JwFUZj dhcp-4.3.1b1/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.backoff dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.1b1/client/dhclient.c.JwFUZj 2014-07-10 17:38:50.511265091 +0200
|
--- dhcp-4.3.4/client/dhclient.c.backoff 2016-04-29 12:16:26.976245611 +0200
|
||||||
+++ dhcp-4.3.1b1/client/dhclient.c 2014-07-10 17:39:16.164901267 +0200
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:16:26.979245609 +0200
|
||||||
@@ -1281,6 +1281,8 @@ void state_init (cpp)
|
@@ -1423,6 +1423,8 @@ void state_init (cpp)
|
||||||
void *cpp;
|
void *cpp;
|
||||||
{
|
{
|
||||||
struct client_state *client = cpp;
|
struct client_state *client = cpp;
|
||||||
@ -10,7 +10,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.JwFUZj dhcp-4.3.1b1/client/dhclient.c
|
|||||||
|
|
||||||
ASSERT_STATE(state, S_INIT);
|
ASSERT_STATE(state, S_INIT);
|
||||||
|
|
||||||
@@ -1293,9 +1295,18 @@ void state_init (cpp)
|
@@ -1435,9 +1437,18 @@ void state_init (cpp)
|
||||||
client -> first_sending = cur_time;
|
client -> first_sending = cur_time;
|
||||||
client -> interval = client -> config -> initial_interval;
|
client -> interval = client -> config -> initial_interval;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.JwFUZj dhcp-4.3.1b1/client/dhclient.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1592,6 +1603,7 @@ void bind_lease (client)
|
@@ -1734,6 +1745,7 @@ void bind_lease (client)
|
||||||
"try (declined). Exiting.");
|
"try (declined). Exiting.");
|
||||||
exit(2);
|
exit(2);
|
||||||
} else {
|
} else {
|
||||||
@ -40,7 +40,7 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.JwFUZj dhcp-4.3.1b1/client/dhclient.c
|
|||||||
state_init(client);
|
state_init(client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4059,6 +4071,7 @@ void client_location_changed ()
|
@@ -4626,6 +4638,7 @@ void client_location_changed ()
|
||||||
case S_INIT:
|
case S_INIT:
|
||||||
case S_REBINDING:
|
case S_REBINDING:
|
||||||
case S_STOPPED:
|
case S_STOPPED:
|
||||||
@ -48,10 +48,10 @@ diff -up dhcp-4.3.1b1/client/dhclient.c.JwFUZj dhcp-4.3.1b1/client/dhclient.c
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
client -> state = S_INIT;
|
client -> state = S_INIT;
|
||||||
diff -up dhcp-4.3.1b1/includes/dhcpd.h.JwFUZj dhcp-4.3.1b1/includes/dhcpd.h
|
diff -up dhcp-4.3.4/includes/dhcpd.h.backoff dhcp-4.3.4/includes/dhcpd.h
|
||||||
--- dhcp-4.3.1b1/includes/dhcpd.h.JwFUZj 2014-07-10 17:38:26.941599360 +0200
|
--- dhcp-4.3.4/includes/dhcpd.h.backoff 2016-04-29 12:16:26.980245609 +0200
|
||||||
+++ dhcp-4.3.1b1/includes/dhcpd.h 2014-07-10 17:38:50.526264878 +0200
|
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:17:30.893203533 +0200
|
||||||
@@ -1087,7 +1087,8 @@ enum dhcp_state {
|
@@ -1171,7 +1171,8 @@ enum dhcp_state {
|
||||||
S_BOUND = 5,
|
S_BOUND = 5,
|
||||||
S_RENEWING = 6,
|
S_RENEWING = 6,
|
||||||
S_REBINDING = 7,
|
S_REBINDING = 7,
|
||||||
@ -60,4 +60,4 @@ diff -up dhcp-4.3.1b1/includes/dhcpd.h.JwFUZj dhcp-4.3.1b1/includes/dhcpd.h
|
|||||||
+ S_DECLINED = 9
|
+ S_DECLINED = 9
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Authentication and BOOTP policy possibilities (not all values work
|
/* Possible pending client operations. */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.3b1/client/clparse.c.options dhcp-4.3.3b1/client/clparse.c
|
diff -up dhcp-4.3.4/client/clparse.c.options dhcp-4.3.4/client/clparse.c
|
||||||
--- dhcp-4.3.3b1/client/clparse.c.options 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/client/clparse.c.options 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/client/clparse.c 2015-08-10 10:44:46.958074760 +0200
|
+++ dhcp-4.3.4/client/clparse.c 2016-04-29 12:06:13.485470579 +0200
|
||||||
@@ -148,6 +148,7 @@ isc_result_t read_client_conf ()
|
@@ -189,6 +189,7 @@ isc_result_t read_client_conf ()
|
||||||
/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
|
/* Requested lease time, used by DHCPv6 (DHCPv4 uses the option cache)
|
||||||
*/
|
*/
|
||||||
top_level_config.requested_lease = 7200;
|
top_level_config.requested_lease = 7200;
|
||||||
@ -9,7 +9,7 @@ diff -up dhcp-4.3.3b1/client/clparse.c.options dhcp-4.3.3b1/client/clparse.c
|
|||||||
|
|
||||||
group_allocate (&top_level_config.on_receipt, MDL);
|
group_allocate (&top_level_config.on_receipt, MDL);
|
||||||
if (!top_level_config.on_receipt)
|
if (!top_level_config.on_receipt)
|
||||||
@@ -353,7 +354,8 @@ void read_client_leases ()
|
@@ -394,7 +395,8 @@ void read_client_leases ()
|
||||||
interface-declaration |
|
interface-declaration |
|
||||||
LEASE client-lease-statement |
|
LEASE client-lease-statement |
|
||||||
ALIAS client-lease-statement |
|
ALIAS client-lease-statement |
|
||||||
@ -19,9 +19,9 @@ diff -up dhcp-4.3.3b1/client/clparse.c.options dhcp-4.3.3b1/client/clparse.c
|
|||||||
|
|
||||||
void parse_client_statement (cfile, ip, config)
|
void parse_client_statement (cfile, ip, config)
|
||||||
struct parse *cfile;
|
struct parse *cfile;
|
||||||
@@ -771,6 +773,12 @@ void parse_client_statement (cfile, ip,
|
@@ -817,6 +819,12 @@ void parse_client_statement (cfile, ip,
|
||||||
parse_reject_statement (cfile, config);
|
parse_lease_id_format(cfile);
|
||||||
return;
|
break;
|
||||||
|
|
||||||
+ case BOOTP_BROADCAST_ALWAYS:
|
+ case BOOTP_BROADCAST_ALWAYS:
|
||||||
+ token = next_token(&val, (unsigned*)0, cfile);
|
+ token = next_token(&val, (unsigned*)0, cfile);
|
||||||
@ -29,13 +29,13 @@ diff -up dhcp-4.3.3b1/client/clparse.c.options dhcp-4.3.3b1/client/clparse.c
|
|||||||
+ parse_semi (cfile);
|
+ parse_semi (cfile);
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
|
|
||||||
default:
|
default:
|
||||||
lose = 0;
|
lose = 0;
|
||||||
stmt = (struct executable_statement *)0;
|
diff -up dhcp-4.3.4/client/dhclient.8.options dhcp-4.3.4/client/dhclient.8
|
||||||
diff -up dhcp-4.3.3b1/client/dhclient.8.options dhcp-4.3.3b1/client/dhclient.8
|
--- dhcp-4.3.4/client/dhclient.8.options 2016-03-22 14:16:51.000000000 +0100
|
||||||
--- dhcp-4.3.3b1/client/dhclient.8.options 2015-07-30 15:17:16.000000000 +0200
|
+++ dhcp-4.3.4/client/dhclient.8 2016-04-29 11:59:50.446590077 +0200
|
||||||
+++ dhcp-4.3.3b1/client/dhclient.8 2015-08-10 10:44:46.958074760 +0200
|
@@ -134,6 +134,33 @@ dhclient - Dynamic Host Configuration Pr
|
||||||
@@ -128,6 +128,33 @@ dhclient - Dynamic Host Configuration Pr
|
|
||||||
.B -w
|
.B -w
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
@ -69,7 +69,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.8.options dhcp-4.3.3b1/client/dhclient.8
|
|||||||
.B -v
|
.B -v
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
@@ -275,6 +302,69 @@ not to exit when it doesn't find any suc
|
@@ -289,6 +316,69 @@ not to exit when it doesn't find any suc
|
||||||
program can then be used to notify the client when a network interface
|
program can then be used to notify the client when a network interface
|
||||||
has been added or removed, so that the client can attempt to configure an IP
|
has been added or removed, so that the client can attempt to configure an IP
|
||||||
address on that interface.
|
address on that interface.
|
||||||
@ -139,11 +139,11 @@ diff -up dhcp-4.3.3b1/client/dhclient.8.options dhcp-4.3.3b1/client/dhclient.8
|
|||||||
.TP
|
.TP
|
||||||
.BI \-n
|
.BI \-n
|
||||||
Do not configure any interfaces. This is most likely to be useful in
|
Do not configure any interfaces. This is most likely to be useful in
|
||||||
diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.options dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.3b1/client/dhclient.c.options 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/client/dhclient.c.options 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/client/dhclient.c 2015-08-10 10:44:46.959074757 +0200
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:12:14.182364093 +0200
|
||||||
@@ -39,6 +39,12 @@
|
@@ -40,6 +40,12 @@
|
||||||
#include <limits.h>
|
#include <isc/file.h>
|
||||||
#include <dns/result.h>
|
#include <dns/result.h>
|
||||||
|
|
||||||
+/*
|
+/*
|
||||||
@ -155,20 +155,34 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
TIME default_lease_time = 43200; /* 12 hours... */
|
TIME default_lease_time = 43200; /* 12 hours... */
|
||||||
TIME max_lease_time = 86400; /* 24 hours... */
|
TIME max_lease_time = 86400; /* 24 hours... */
|
||||||
|
|
||||||
@@ -88,6 +94,9 @@ int wanted_ia_na = -1; /* the absolute
|
@@ -100,6 +106,10 @@ char *mockup_relay = NULL;
|
||||||
int wanted_ia_ta = 0;
|
|
||||||
int wanted_ia_pd = 0;
|
char *progname = NULL;
|
||||||
char *mockup_relay = NULL;
|
|
||||||
+int bootp_broadcast_always = 0;
|
+int bootp_broadcast_always = 0;
|
||||||
+
|
+
|
||||||
+extern struct option *default_requested_options[];
|
+extern struct option *default_requested_options[];
|
||||||
|
+
|
||||||
|
void run_stateless(int exit_mode, u_int16_t port);
|
||||||
|
|
||||||
void run_stateless(int exit_mode);
|
static isc_result_t write_duid(struct data_string *duid);
|
||||||
|
@@ -177,7 +187,11 @@ usage(const char *sfmt, const char *sarg
|
||||||
|
" [-s server-addr] [-cf config-file]\n"
|
||||||
|
" [-df duid-file] [-lf lease-file]\n"
|
||||||
|
" [-pf pid-file] [--no-pid] [-e VAR=val]\n"
|
||||||
|
- " [-sf script-file] [interface]*",
|
||||||
|
+ " [-sf script-file] [interface]*\n"
|
||||||
|
+ " [-C <dhcp-client-identifier>] [-B]\n"
|
||||||
|
+ " [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
|
||||||
|
+ " [-V <vendor-class-identifier>]\n"
|
||||||
|
+ " [-R <request option list>]",
|
||||||
|
isc_file_basename(progname));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -214,6 +228,16 @@ main(int argc, char **argv) {
|
||||||
|
progname = argv[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -128,6 +137,15 @@ main(int argc, char **argv) {
|
|
||||||
int local_family_set = 0;
|
|
||||||
#endif /* DHCPv6 */
|
|
||||||
char *s;
|
|
||||||
+ char *dhcp_client_identifier_arg = NULL;
|
+ char *dhcp_client_identifier_arg = NULL;
|
||||||
+ char *dhcp_host_name_arg = NULL;
|
+ char *dhcp_host_name_arg = NULL;
|
||||||
+ char *dhcp_fqdn_arg = NULL;
|
+ char *dhcp_fqdn_arg = NULL;
|
||||||
@ -178,16 +192,17 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
+ int timeout_arg = 0;
|
+ int timeout_arg = 0;
|
||||||
+ char *arg_conf = NULL;
|
+ char *arg_conf = NULL;
|
||||||
+ int arg_conf_len = 0;
|
+ int arg_conf_len = 0;
|
||||||
|
+
|
||||||
/* Initialize client globals. */
|
/* Initialize client globals. */
|
||||||
memset(&default_duid, 0, sizeof(default_duid));
|
memset(&default_duid, 0, sizeof(default_duid));
|
||||||
@@ -328,6 +346,88 @@ main(int argc, char **argv) {
|
|
||||||
|
@@ -431,6 +455,88 @@ main(int argc, char **argv) {
|
||||||
strlen(PACKAGE_VERSION)));
|
strlen(PACKAGE_VERSION)));
|
||||||
IGNORE_RET(write(STDERR_FILENO, "\n", 1));
|
IGNORE_RET(write(STDERR_FILENO, "\n", 1));
|
||||||
exit(0);
|
exit(0);
|
||||||
+ } else if (!strcmp(argv[i], "-C")) {
|
+ } else if (!strcmp(argv[i], "-C")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage();
|
+ usage(use_noarg, argv[i-1]);
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -201,7 +216,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
+ bootp_broadcast_always = 1;
|
+ bootp_broadcast_always = 1;
|
||||||
+ } else if (!strcmp(argv[i], "-H")) {
|
+ } else if (!strcmp(argv[i], "-H")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage();
|
+ usage(use_noarg, argv[i-1]);
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -218,7 +233,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
+ dhcp_host_name_arg = argv[i];
|
+ dhcp_host_name_arg = argv[i];
|
||||||
+ } else if (!strcmp(argv[i], "-F")) {
|
+ } else if (!strcmp(argv[i], "-F")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage();
|
+ usage(use_noarg, argv[i-1]);
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -240,7 +255,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
+ dhcp_fqdn_arg = argv[i];
|
+ dhcp_fqdn_arg = argv[i];
|
||||||
+ } else if (!strcmp(argv[i], "-timeout")) {
|
+ } else if (!strcmp(argv[i], "-timeout")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage();
|
+ usage(use_noarg, argv[i-1]);
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -250,7 +265,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
+ }
|
+ }
|
||||||
+ } else if (!strcmp(argv[i], "-V")) {
|
+ } else if (!strcmp(argv[i], "-V")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage();
|
+ usage(use_noarg, argv[i-1]);
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -262,15 +277,15 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
+ dhcp_vendor_class_identifier_arg = argv[i];
|
+ dhcp_vendor_class_identifier_arg = argv[i];
|
||||||
+ } else if (!strcmp(argv[i], "-R")) {
|
+ } else if (!strcmp(argv[i], "-R")) {
|
||||||
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
+ if ((++i == argc) || (argv[i] == NULL) || (*(argv[i])=='\0')) {
|
||||||
+ usage();
|
+ usage(use_noarg, argv[i-1]);
|
||||||
+ exit(1);
|
+ exit(1);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ dhclient_request_options = argv[i];
|
+ dhclient_request_options = argv[i];
|
||||||
} else if (argv[i][0] == '-') {
|
} else if (argv[i][0] == '-') {
|
||||||
usage();
|
usage("Unknown command: %s", argv[i]);
|
||||||
} else if (interfaces_requested < 0) {
|
} else if (interfaces_requested < 0) {
|
||||||
@@ -510,6 +610,156 @@ main(int argc, char **argv) {
|
@@ -630,6 +736,156 @@ main(int argc, char **argv) {
|
||||||
/* Parse the dhclient.conf file. */
|
/* Parse the dhclient.conf file. */
|
||||||
read_client_conf();
|
read_client_conf();
|
||||||
|
|
||||||
@ -427,18 +442,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
/* Parse the lease database. */
|
/* Parse the lease database. */
|
||||||
read_client_leases();
|
read_client_leases();
|
||||||
|
|
||||||
@@ -759,6 +1009,10 @@ static void usage()
|
@@ -3067,7 +3323,8 @@ void make_discover (client, lease)
|
||||||
" [-s server-addr] [-cf config-file]\n"
|
|
||||||
" [-df duid-file] [-lf lease-file]\n"
|
|
||||||
" [-pf pid-file] [--no-pid] [-e VAR=val]\n"
|
|
||||||
+ " [-C <dhcp-client-identifier>] [-B]\n"
|
|
||||||
+ " [-H <host-name> | -F <fqdn.fqdn>] [-timeout <timeout>]\n"
|
|
||||||
+ " [-V <vendor-class-identifier>]\n"
|
|
||||||
+ " [-R <request option list>]\n"
|
|
||||||
" [-sf script-file] [interface]");
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2532,7 +2786,8 @@ void make_discover (client, lease)
|
|
||||||
client -> packet.xid = random ();
|
client -> packet.xid = random ();
|
||||||
client -> packet.secs = 0; /* filled in by send_discover. */
|
client -> packet.secs = 0; /* filled in by send_discover. */
|
||||||
|
|
||||||
@ -448,7 +452,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
@@ -2616,7 +2871,9 @@ void make_request (client, lease)
|
@@ -3152,7 +3409,9 @@ void make_request (client, lease)
|
||||||
} else {
|
} else {
|
||||||
memset (&client -> packet.ciaddr, 0,
|
memset (&client -> packet.ciaddr, 0,
|
||||||
sizeof client -> packet.ciaddr);
|
sizeof client -> packet.ciaddr);
|
||||||
@ -459,7 +463,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
@@ -2678,7 +2935,8 @@ void make_decline (client, lease)
|
@@ -3215,7 +3474,8 @@ void make_decline (client, lease)
|
||||||
client -> packet.hops = 0;
|
client -> packet.hops = 0;
|
||||||
client -> packet.xid = client -> xid;
|
client -> packet.xid = client -> xid;
|
||||||
client -> packet.secs = 0; /* Filled in by send_request. */
|
client -> packet.secs = 0; /* Filled in by send_request. */
|
||||||
@ -469,41 +473,41 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.options dhcp-4.3.3b1/client/dhclient.c
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
diff -up dhcp-4.3.3b1/common/conflex.c.options dhcp-4.3.3b1/common/conflex.c
|
diff -up dhcp-4.3.4/common/conflex.c.options dhcp-4.3.4/common/conflex.c
|
||||||
--- dhcp-4.3.3b1/common/conflex.c.options 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/common/conflex.c.options 2016-04-29 11:59:50.448590077 +0200
|
||||||
+++ dhcp-4.3.3b1/common/conflex.c 2015-08-10 10:44:46.959074757 +0200
|
+++ dhcp-4.3.4/common/conflex.c 2016-04-29 12:13:23.637342420 +0200
|
||||||
@@ -827,6 +827,8 @@ intern(char *atom, enum dhcp_token dfv)
|
@@ -832,6 +832,8 @@ intern(char *atom, enum dhcp_token dfv)
|
||||||
return BALANCE;
|
if (!strcasecmp(atom+1, "ig-endian")) {
|
||||||
if (!strcasecmp (atom + 1, "ound"))
|
return TOKEN_BIG_ENDIAN;
|
||||||
return BOUND;
|
}
|
||||||
+ if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
|
+ if (!strcasecmp (atom + 1, "ootp-broadcast-always"))
|
||||||
+ return BOOTP_BROADCAST_ALWAYS;
|
+ return BOOTP_BROADCAST_ALWAYS;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
if (!strcasecmp(atom + 1, "ase"))
|
if (!strcasecmp(atom + 1, "ase"))
|
||||||
diff -up dhcp-4.3.3b1/includes/dhcpd.h.options dhcp-4.3.3b1/includes/dhcpd.h
|
diff -up dhcp-4.3.4/includes/dhcpd.h.options dhcp-4.3.4/includes/dhcpd.h
|
||||||
--- dhcp-4.3.3b1/includes/dhcpd.h.options 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/includes/dhcpd.h.options 2016-04-29 11:59:50.448590077 +0200
|
||||||
+++ dhcp-4.3.3b1/includes/dhcpd.h 2015-08-10 10:44:46.960074753 +0200
|
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:14:05.361329401 +0200
|
||||||
@@ -1228,6 +1228,9 @@ struct client_config {
|
@@ -1246,6 +1246,9 @@ struct client_config {
|
||||||
int do_forward_update; /* If nonzero, and if we have the
|
|
||||||
information we need, update the
|
int lease_id_format; /* format for IDs in lease file,
|
||||||
A record for the address we get. */
|
TOKEN_OCTAL or TOKEN_HEX */
|
||||||
+
|
+
|
||||||
+ int bootp_broadcast_always; /* If nonzero, always set the BOOTP_BROADCAST
|
+ int bootp_broadcast_always; /* If nonzero, always set the BOOTP_BROADCAST
|
||||||
+ flag in requests */
|
+ flag in requests */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Per-interface state used in the dhcp client... */
|
/* Per-interface state used in the dhcp client... */
|
||||||
diff -up dhcp-4.3.3b1/includes/dhctoken.h.options dhcp-4.3.3b1/includes/dhctoken.h
|
diff -up dhcp-4.3.4/includes/dhctoken.h.options dhcp-4.3.4/includes/dhctoken.h
|
||||||
--- dhcp-4.3.3b1/includes/dhctoken.h.options 2015-08-10 10:44:46.960074753 +0200
|
--- dhcp-4.3.4/includes/dhctoken.h.options 2016-04-29 11:59:50.449590076 +0200
|
||||||
+++ dhcp-4.3.3b1/includes/dhctoken.h 2015-08-10 10:45:58.055829616 +0200
|
+++ dhcp-4.3.4/includes/dhctoken.h 2016-04-29 12:15:03.073300846 +0200
|
||||||
@@ -368,7 +368,8 @@ enum dhcp_token {
|
@@ -373,7 +373,8 @@ enum dhcp_token {
|
||||||
POOL6 = 669,
|
TOKEN_BIG_ENDIAN = 675,
|
||||||
V6RELAY = 670,
|
LEASE_ID_FORMAT = 676,
|
||||||
V6RELOPT = 671,
|
TOKEN_HEX = 677,
|
||||||
- PARSE_VENDOR_OPT = 672
|
- TOKEN_OCTAL = 678
|
||||||
+ PARSE_VENDOR_OPT = 672,
|
+ TOKEN_OCTAL = 678,
|
||||||
+ BOOTP_BROADCAST_ALWAYS = 673
|
+ BOOTP_BROADCAST_ALWAYS = 679
|
||||||
};
|
};
|
||||||
|
|
||||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.3/client/dhclient.c.preinit6s dhcp-4.3.3/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.preinit6s dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.3/client/dhclient.c.preinit6s 2015-09-22 16:42:27.211145636 +0200
|
--- dhcp-4.3.4/client/dhclient.c.preinit6s 2016-04-29 13:15:10.361379493 +0200
|
||||||
+++ dhcp-4.3.3/client/dhclient.c 2015-09-22 16:42:54.826112762 +0200
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 13:17:43.622415423 +0200
|
||||||
@@ -691,6 +691,12 @@ main(int argc, char **argv) {
|
@@ -812,6 +812,12 @@ main(int argc, char **argv) {
|
||||||
|
|
||||||
inaddr_any.s_addr = INADDR_ANY;
|
inaddr_any.s_addr = INADDR_ANY;
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ diff -up dhcp-4.3.3/client/dhclient.c.preinit6s dhcp-4.3.3/client/dhclient.c
|
|||||||
/* Stateless special case. */
|
/* Stateless special case. */
|
||||||
if (stateless) {
|
if (stateless) {
|
||||||
if (release_mode || (wanted_ia_na > 0) ||
|
if (release_mode || (wanted_ia_na > 0) ||
|
||||||
@@ -702,12 +708,6 @@ main(int argc, char **argv) {
|
@@ -828,12 +834,6 @@ main(int argc, char **argv) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,20 +27,26 @@ diff -up dhcp-4.3.3/client/dhclient.c.preinit6s dhcp-4.3.3/client/dhclient.c
|
|||||||
/* Parse any extra command line configuration arguments: */
|
/* Parse any extra command line configuration arguments: */
|
||||||
if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) {
|
if ((dhcp_client_identifier_arg != NULL) && (*dhcp_client_identifier_arg != '\0')) {
|
||||||
arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
|
arg_conf_len = asprintf(&arg_conf, "send dhcp-client-identifier \"%s\";", dhcp_client_identifier_arg);
|
||||||
@@ -1169,15 +1169,23 @@ void run_stateless(int exit_mode)
|
@@ -1288,20 +1288,30 @@ void run_stateless(int exit_mode, u_int1
|
||||||
struct client_state *client;
|
IGNORE_UNUSED(port);
|
||||||
omapi_object_t *listener;
|
#endif
|
||||||
isc_result_t result;
|
|
||||||
-
|
|
||||||
- /* Discover the network interface. */
|
- /* Discover the network interface. */
|
||||||
- discover_interfaces(DISCOVER_REQUESTED);
|
- discover_interfaces(DISCOVER_REQUESTED);
|
||||||
+ struct interface_info *ip;
|
+ struct interface_info *ip;
|
||||||
|
|
||||||
if (!interfaces)
|
if (!interfaces)
|
||||||
usage();
|
usage("No interfaces available for stateless command: %s", "-S");
|
||||||
|
|
||||||
- /* Parse the dhclient.conf file. */
|
- /* Parse the dhclient.conf file. */
|
||||||
|
#ifdef DHCP4o6
|
||||||
|
if (dhcpv4_over_dhcpv6) {
|
||||||
|
/* Mark we want to request IRT too! */
|
||||||
|
dhcpv4_over_dhcpv6++;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
- read_client_conf();
|
- read_client_conf();
|
||||||
|
+
|
||||||
+ for (ip = interfaces; ip; ip = ip->next) {
|
+ for (ip = interfaces; ip; ip = ip->next) {
|
||||||
+ if ((interfaces_requested > 0) &&
|
+ if ((interfaces_requested > 0) &&
|
||||||
+ ((ip->flags & (INTERFACE_REQUESTED |
|
+ ((ip->flags & (INTERFACE_REQUESTED |
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.3/client/dhclient.c.duid_uuid dhcp-4.3.3/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.duid_uuid dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.3/client/dhclient.c.duid_uuid 2015-12-14 12:10:54.694082625 +0100
|
--- dhcp-4.3.4/client/dhclient.c.duid_uuid 2016-04-29 12:58:14.846150838 +0200
|
||||||
+++ dhcp-4.3.3/client/dhclient.c 2015-12-14 12:13:19.538018362 +0100
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:58:14.851150839 +0200
|
||||||
@@ -3328,6 +3328,59 @@ write_options(struct client_state *clien
|
@@ -3868,6 +3868,59 @@ write_options(struct client_state *clien
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ diff -up dhcp-4.3.3/client/dhclient.c.duid_uuid dhcp-4.3.3/client/dhclient.c
|
|||||||
/*
|
/*
|
||||||
* The "best" default DUID, since we cannot predict any information
|
* The "best" default DUID, since we cannot predict any information
|
||||||
* about the system (such as whether or not the hardware addresses are
|
* about the system (such as whether or not the hardware addresses are
|
||||||
@@ -3348,6 +3401,7 @@ form_duid(struct data_string *duid, cons
|
@@ -3888,6 +3941,7 @@ form_duid(struct data_string *duid, cons
|
||||||
struct interface_info *ip;
|
struct interface_info *ip;
|
||||||
int len;
|
int len;
|
||||||
char *str;
|
char *str;
|
||||||
@ -69,7 +69,7 @@ diff -up dhcp-4.3.3/client/dhclient.c.duid_uuid dhcp-4.3.3/client/dhclient.c
|
|||||||
|
|
||||||
/* For now, just use the first interface on the list. */
|
/* For now, just use the first interface on the list. */
|
||||||
ip = interfaces;
|
ip = interfaces;
|
||||||
@@ -3368,9 +3422,16 @@ form_duid(struct data_string *duid, cons
|
@@ -3908,9 +3962,16 @@ form_duid(struct data_string *duid, cons
|
||||||
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
(ip->hw_address.hlen > sizeof(ip->hw_address.hbuf)))
|
||||||
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
log_fatal("Impossible hardware address length at %s:%d.", MDL);
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ diff -up dhcp-4.3.3/client/dhclient.c.duid_uuid dhcp-4.3.3/client/dhclient.c
|
|||||||
/*
|
/*
|
||||||
* 2 bytes for the 'duid type' field.
|
* 2 bytes for the 'duid type' field.
|
||||||
* 2 bytes for the 'htype' field.
|
* 2 bytes for the 'htype' field.
|
||||||
@@ -3381,13 +3442,18 @@ form_duid(struct data_string *duid, cons
|
@@ -3921,13 +3982,18 @@ form_duid(struct data_string *duid, cons
|
||||||
len = 4 + (ip->hw_address.hlen - 1);
|
len = 4 + (ip->hw_address.hlen - 1);
|
||||||
if (duid_type == DUID_LLT)
|
if (duid_type == DUID_LLT)
|
||||||
len += 4;
|
len += 4;
|
||||||
@ -109,15 +109,3 @@ diff -up dhcp-4.3.3/client/dhclient.c.duid_uuid dhcp-4.3.3/client/dhclient.c
|
|||||||
putUShort(duid->buffer->data, DUID_LLT);
|
putUShort(duid->buffer->data, DUID_LLT);
|
||||||
putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
|
putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
|
||||||
putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH);
|
putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH);
|
||||||
diff -up dhcp-4.3.3/includes/dhcp6.h.duid_uuid dhcp-4.3.3/includes/dhcp6.h
|
|
||||||
--- dhcp-4.3.3/includes/dhcp6.h.duid_uuid 2015-08-26 21:13:14.000000000 +0200
|
|
||||||
+++ dhcp-4.3.3/includes/dhcp6.h 2015-12-14 12:12:33.258038895 +0100
|
|
||||||
@@ -119,6 +119,8 @@ extern const int dhcpv6_type_name_max;
|
|
||||||
#define DUID_LLT 1
|
|
||||||
#define DUID_EN 2
|
|
||||||
#define DUID_LL 3
|
|
||||||
+/* RFC6355 */
|
|
||||||
+#define DUID_UUID 4
|
|
||||||
|
|
||||||
/* Offsets into IA_*'s where Option spaces commence. */
|
|
||||||
#define IA_NA_OFFSET 12 /* IAID, T1, T2, all 4 octets each */
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.improved-xid dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.2/client/dhclient.c.improved-xid 2015-06-24 18:55:36.775988325 +0200
|
--- dhcp-4.3.4/client/dhclient.c.improved-xid 2016-04-29 12:54:55.997102182 +0200
|
||||||
+++ dhcp-4.3.2/client/dhclient.c 2015-06-24 18:56:41.598810344 +0200
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 12:57:25.123139587 +0200
|
||||||
@@ -916,6 +916,26 @@ main(int argc, char **argv) {
|
@@ -1045,6 +1045,26 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
/* At this point, all the interfaces that the script thinks
|
/* At this point, all the interfaces that the script thinks
|
||||||
are relevant should be running, so now we once again call
|
are relevant should be running, so now we once again call
|
||||||
discover_interfaces(), and this time ask it to actually set
|
discover_interfaces(), and this time ask it to actually set
|
||||||
@@ -930,14 +950,36 @@ main(int argc, char **argv) {
|
@@ -1059,14 +1079,36 @@ main(int argc, char **argv) {
|
||||||
Not much entropy, but we're booting, so we're not likely to
|
Not much entropy, but we're booting, so we're not likely to
|
||||||
find anything better. */
|
find anything better. */
|
||||||
seed = 0;
|
seed = 0;
|
||||||
@ -66,7 +66,7 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
|
|
||||||
/* Setup specific Infiniband options */
|
/* Setup specific Infiniband options */
|
||||||
for (ip = interfaces; ip; ip = ip->next) {
|
for (ip = interfaces; ip; ip = ip->next) {
|
||||||
@@ -1491,7 +1533,7 @@ void dhcpack (packet)
|
@@ -1633,7 +1675,7 @@ void dhcpack (packet)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
|
|
||||||
lease = packet_to_lease (packet, client);
|
lease = packet_to_lease (packet, client);
|
||||||
if (!lease) {
|
if (!lease) {
|
||||||
@@ -2211,7 +2253,7 @@ void dhcpnak (packet)
|
@@ -2541,7 +2583,7 @@ void dhcpnak (packet)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,10 +84,10 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
|
|
||||||
if (!client -> active) {
|
if (!client -> active) {
|
||||||
#if defined (DEBUG)
|
#if defined (DEBUG)
|
||||||
@@ -2338,10 +2380,10 @@ void send_discover (cpp)
|
@@ -2674,10 +2716,10 @@ void send_discover (cpp)
|
||||||
client -> packet.secs = htons (65535);
|
(long)(client -> interval));
|
||||||
client -> secs = client -> packet.secs;
|
} else
|
||||||
|
#endif
|
||||||
- log_info ("DHCPDISCOVER on %s to %s port %d interval %ld",
|
- log_info ("DHCPDISCOVER on %s to %s port %d interval %ld",
|
||||||
+ log_info ("DHCPDISCOVER on %s to %s port %d interval %ld (xid=0x%x)",
|
+ log_info ("DHCPDISCOVER on %s to %s port %d interval %ld (xid=0x%x)",
|
||||||
client -> name ? client -> name : client -> interface -> name,
|
client -> name ? client -> name : client -> interface -> name,
|
||||||
@ -96,11 +96,11 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
+ ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval), ntohl(client -> xid));
|
+ ntohs (sockaddr_broadcast.sin_port), (long)(client -> interval), ntohl(client -> xid));
|
||||||
|
|
||||||
/* Send out a packet. */
|
/* Send out a packet. */
|
||||||
result = send_packet(client->interface, NULL, &client->packet,
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
@@ -2610,10 +2652,10 @@ void send_request (cpp)
|
@@ -2962,10 +3004,10 @@ void send_request (cpp)
|
||||||
client -> packet.secs = htons (65535);
|
log_info ("DHCPREQUEST");
|
||||||
}
|
} else
|
||||||
|
#endif
|
||||||
- log_info ("DHCPREQUEST on %s to %s port %d",
|
- log_info ("DHCPREQUEST on %s to %s port %d",
|
||||||
+ log_info ("DHCPREQUEST on %s to %s port %d (xid=0x%x)",
|
+ log_info ("DHCPREQUEST on %s to %s port %d (xid=0x%x)",
|
||||||
client -> name ? client -> name : client -> interface -> name,
|
client -> name ? client -> name : client -> interface -> name,
|
||||||
@ -108,12 +108,12 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
- ntohs (destination.sin_port));
|
- ntohs (destination.sin_port));
|
||||||
+ ntohs (destination.sin_port), ntohl(client -> xid));
|
+ ntohs (destination.sin_port), ntohl(client -> xid));
|
||||||
|
|
||||||
if (destination.sin_addr.s_addr != INADDR_BROADCAST &&
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
fallback_interface) {
|
if (dhcpv4_over_dhcpv6) {
|
||||||
@@ -2653,10 +2695,10 @@ void send_decline (cpp)
|
@@ -3022,10 +3064,10 @@ void send_decline (cpp)
|
||||||
|
log_info ("DHCPDECLINE");
|
||||||
int result;
|
} else
|
||||||
|
#endif
|
||||||
- log_info ("DHCPDECLINE on %s to %s port %d",
|
- log_info ("DHCPDECLINE on %s to %s port %d",
|
||||||
+ log_info ("DHCPDECLINE on %s to %s port %d (xid=0x%x)",
|
+ log_info ("DHCPDECLINE on %s to %s port %d (xid=0x%x)",
|
||||||
client->name ? client->name : client->interface->name,
|
client->name ? client->name : client->interface->name,
|
||||||
@ -122,11 +122,11 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
+ ntohs(sockaddr_broadcast.sin_port), ntohl(client -> xid));
|
+ ntohs(sockaddr_broadcast.sin_port), ntohl(client -> xid));
|
||||||
|
|
||||||
/* Send out a packet. */
|
/* Send out a packet. */
|
||||||
result = send_packet(client->interface, NULL, &client->packet,
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
@@ -2699,10 +2741,10 @@ void send_release (cpp)
|
@@ -3084,10 +3126,10 @@ void send_release (cpp)
|
||||||
return;
|
log_info ("DHCPRELEASE");
|
||||||
}
|
} else
|
||||||
|
#endif
|
||||||
- log_info ("DHCPRELEASE on %s to %s port %d",
|
- log_info ("DHCPRELEASE on %s to %s port %d",
|
||||||
+ log_info ("DHCPRELEASE on %s to %s port %d (xid=0x%x)",
|
+ log_info ("DHCPRELEASE on %s to %s port %d (xid=0x%x)",
|
||||||
client -> name ? client -> name : client -> interface -> name,
|
client -> name ? client -> name : client -> interface -> name,
|
||||||
@ -134,5 +134,5 @@ diff -up dhcp-4.3.2/client/dhclient.c.improved-xid dhcp-4.3.2/client/dhclient.c
|
|||||||
- ntohs (destination.sin_port));
|
- ntohs (destination.sin_port));
|
||||||
+ ntohs (destination.sin_port), ntohl(client -> xid));
|
+ ntohs (destination.sin_port), ntohl(client -> xid));
|
||||||
|
|
||||||
if (fallback_interface) {
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
result = send_packet(fallback_interface, NULL, &client->packet,
|
if (dhcpv4_over_dhcpv6) {
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
diff -up dhcp-4.3.3b1/client/dhclient.c.lpf-ib dhcp-4.3.3b1/client/dhclient.c
|
diff -up dhcp-4.3.4/client/dhclient.c.lpf-ib dhcp-4.3.4/client/dhclient.c
|
||||||
--- dhcp-4.3.3b1/client/dhclient.c.lpf-ib 2015-08-10 10:58:17.659350415 +0200
|
--- dhcp-4.3.4/client/dhclient.c.lpf-ib 2016-05-02 14:37:36.945128001 +0200
|
||||||
+++ dhcp-4.3.3b1/client/dhclient.c 2015-08-10 11:44:15.428321587 +0200
|
+++ dhcp-4.3.4/client/dhclient.c 2016-05-02 14:37:36.952128005 +0200
|
||||||
@@ -117,6 +117,8 @@ static int check_option_values(struct un
|
@@ -163,6 +163,8 @@ static const char use_noarg[] = "No argu
|
||||||
static void dhclient_ddns_cb_free(dhcp_ddns_cb_t *ddns_cb,
|
static const char use_v6command[] = "Command not used for DHCPv4: %s";
|
||||||
char* file, int line);
|
#endif
|
||||||
|
|
||||||
+static void setup_ib_interface(struct interface_info *ip);
|
+static void setup_ib_interface(struct interface_info *ip);
|
||||||
+
|
+
|
||||||
#ifndef UNIT_TEST
|
static void
|
||||||
int
|
usage(const char *sfmt, const char *sarg)
|
||||||
main(int argc, char **argv) {
|
{
|
||||||
@@ -940,6 +942,13 @@ main(int argc, char **argv) {
|
@@ -1066,6 +1068,13 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
srandom(seed + cur_time + (unsigned)getpid());
|
srandom(seed + cur_time + (unsigned)getpid());
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.lpf-ib dhcp-4.3.3b1/client/dhclient.c
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Establish a default DUID. We always do so for v6 and
|
* Establish a default DUID. We always do so for v6 and
|
||||||
@@ -1231,6 +1240,29 @@ int find_subnet (struct subnet **sp,
|
@@ -1361,6 +1370,29 @@ int find_subnet (struct subnet **sp,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,10 +54,10 @@ diff -up dhcp-4.3.3b1/client/dhclient.c.lpf-ib dhcp-4.3.3b1/client/dhclient.c
|
|||||||
/* Individual States:
|
/* Individual States:
|
||||||
*
|
*
|
||||||
* Each routine is called from the dhclient_state_machine() in one of
|
* Each routine is called from the dhclient_state_machine() in one of
|
||||||
diff -up dhcp-4.3.3b1/common/bpf.c.lpf-ib dhcp-4.3.3b1/common/bpf.c
|
diff -up dhcp-4.3.4/common/bpf.c.lpf-ib dhcp-4.3.4/common/bpf.c
|
||||||
--- dhcp-4.3.3b1/common/bpf.c.lpf-ib 2015-08-10 10:58:17.659350415 +0200
|
--- dhcp-4.3.4/common/bpf.c.lpf-ib 2016-05-02 14:37:36.946128001 +0200
|
||||||
+++ dhcp-4.3.3b1/common/bpf.c 2015-08-10 10:58:17.668350384 +0200
|
+++ dhcp-4.3.4/common/bpf.c 2016-05-02 14:37:36.952128005 +0200
|
||||||
@@ -199,11 +199,44 @@ struct bpf_insn dhcp_bpf_filter [] = {
|
@@ -198,11 +198,43 @@ struct bpf_insn dhcp_bpf_filter [] = {
|
||||||
BPF_STMT(BPF_RET+BPF_K, 0),
|
BPF_STMT(BPF_RET+BPF_K, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -93,18 +93,38 @@ diff -up dhcp-4.3.3b1/common/bpf.c.lpf-ib dhcp-4.3.3b1/common/bpf.c
|
|||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
#if defined (DEC_FDDI)
|
#if defined (DEC_FDDI)
|
||||||
struct bpf_insn *bpf_fddi_filter;
|
struct bpf_insn *bpf_fddi_filter = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int dhcp_bpf_filter_len = sizeof dhcp_bpf_filter / sizeof (struct bpf_insn);
|
int dhcp_bpf_filter_len = sizeof dhcp_bpf_filter / sizeof (struct bpf_insn);
|
||||||
+int dhcp_ib_bpf_filter_len = sizeof dhcp_ib_bpf_filter / sizeof (struct bpf_insn);
|
+int dhcp_ib_bpf_filter_len = sizeof dhcp_ib_bpf_filter / sizeof (struct bpf_insn);
|
||||||
+
|
|
||||||
#if defined (HAVE_TR_SUPPORT)
|
#if defined (HAVE_TR_SUPPORT)
|
||||||
struct bpf_insn dhcp_bpf_tr_filter [] = {
|
struct bpf_insn dhcp_bpf_tr_filter [] = {
|
||||||
/* accept all token ring packets due to variable length header */
|
/* accept all token ring packets due to variable length header */
|
||||||
diff -up dhcp-4.3.3b1/common/lpf.c.lpf-ib dhcp-4.3.3b1/common/lpf.c
|
diff -up dhcp-4.3.4/common/discover.c.lpf-ib dhcp-4.3.4/common/discover.c
|
||||||
--- dhcp-4.3.3b1/common/lpf.c.lpf-ib 2015-08-10 10:58:17.660350412 +0200
|
--- dhcp-4.3.4/common/discover.c.lpf-ib 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/common/lpf.c 2015-08-10 11:45:17.962084958 +0200
|
+++ dhcp-4.3.4/common/discover.c 2016-05-02 14:38:08.257147982 +0200
|
||||||
|
@@ -1235,7 +1235,7 @@ discover_interfaces(int state) {
|
||||||
|
if_register_send(tmp);
|
||||||
|
} else {
|
||||||
|
/* get_hw_addr() was called by register. */
|
||||||
|
- get_hw_addr(tmp->name, &tmp->hw_address);
|
||||||
|
+ get_hw_addr(tmp);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#ifdef DHCPv6
|
||||||
|
@@ -1248,7 +1248,7 @@ discover_interfaces(int state) {
|
||||||
|
so now we have to call it explicitly
|
||||||
|
to not leave the hardware address unknown
|
||||||
|
(some code expects it cannot be. */
|
||||||
|
- get_hw_addr(tmp->name, &tmp->hw_address);
|
||||||
|
+ get_hw_addr(tmp);
|
||||||
|
} else {
|
||||||
|
if_register_linklocal6(tmp);
|
||||||
|
}
|
||||||
|
diff -up dhcp-4.3.4/common/lpf.c.lpf-ib dhcp-4.3.4/common/lpf.c
|
||||||
|
--- dhcp-4.3.4/common/lpf.c.lpf-ib 2016-05-02 14:37:36.947128002 +0200
|
||||||
|
+++ dhcp-4.3.4/common/lpf.c 2016-05-02 14:37:36.953128006 +0200
|
||||||
@@ -47,6 +47,17 @@
|
@@ -47,6 +47,17 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
@ -523,9 +543,9 @@ diff -up dhcp-4.3.3b1/common/lpf.c.lpf-ib dhcp-4.3.3b1/common/lpf.c
|
|||||||
+ freeifaddrs(ifaddrs);
|
+ freeifaddrs(ifaddrs);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
diff -up dhcp-4.3.3b1/common/socket.c.lpf-ib dhcp-4.3.3b1/common/socket.c
|
diff -up dhcp-4.3.4/common/socket.c.lpf-ib dhcp-4.3.4/common/socket.c
|
||||||
--- dhcp-4.3.3b1/common/socket.c.lpf-ib 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/common/socket.c.lpf-ib 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/common/socket.c 2015-08-10 10:58:17.669350380 +0200
|
+++ dhcp-4.3.4/common/socket.c 2016-05-02 14:37:36.953128006 +0200
|
||||||
@@ -328,7 +328,7 @@ void if_register_send (info)
|
@@ -328,7 +328,7 @@ void if_register_send (info)
|
||||||
info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
|
info->wfdesc = if_register_socket(info, AF_INET, 0, NULL);
|
||||||
/* If this is a normal IPv4 address, get the hardware address. */
|
/* If this is a normal IPv4 address, get the hardware address. */
|
||||||
@ -562,10 +582,10 @@ diff -up dhcp-4.3.3b1/common/socket.c.lpf-ib dhcp-4.3.3b1/common/socket.c
|
|||||||
|
|
||||||
if (!quiet_interface_discovery) {
|
if (!quiet_interface_discovery) {
|
||||||
if (info->shared_network != NULL) {
|
if (info->shared_network != NULL) {
|
||||||
diff -up dhcp-4.3.3b1/includes/dhcpd.h.lpf-ib dhcp-4.3.3b1/includes/dhcpd.h
|
diff -up dhcp-4.3.4/includes/dhcpd.h.lpf-ib dhcp-4.3.4/includes/dhcpd.h
|
||||||
--- dhcp-4.3.3b1/includes/dhcpd.h.lpf-ib 2015-08-10 10:58:17.660350412 +0200
|
--- dhcp-4.3.4/includes/dhcpd.h.lpf-ib 2016-05-02 14:37:36.948128002 +0200
|
||||||
+++ dhcp-4.3.3b1/includes/dhcpd.h 2015-08-10 10:58:17.669350380 +0200
|
+++ dhcp-4.3.4/includes/dhcpd.h 2016-05-02 14:37:36.954128006 +0200
|
||||||
@@ -476,6 +476,9 @@ struct packet {
|
@@ -482,6 +482,9 @@ struct packet {
|
||||||
|
|
||||||
#define HARDWARE_ADDR_LEN 20
|
#define HARDWARE_ADDR_LEN 20
|
||||||
|
|
||||||
@ -575,7 +595,7 @@ diff -up dhcp-4.3.3b1/includes/dhcpd.h.lpf-ib dhcp-4.3.3b1/includes/dhcpd.h
|
|||||||
struct hardware {
|
struct hardware {
|
||||||
u_int8_t hlen;
|
u_int8_t hlen;
|
||||||
u_int8_t hbuf[HARDWARE_ADDR_LEN + 1];
|
u_int8_t hbuf[HARDWARE_ADDR_LEN + 1];
|
||||||
@@ -1324,6 +1327,7 @@ struct interface_info {
|
@@ -1343,6 +1346,7 @@ struct interface_info {
|
||||||
struct shared_network *shared_network;
|
struct shared_network *shared_network;
|
||||||
/* Networks connected to this interface. */
|
/* Networks connected to this interface. */
|
||||||
struct hardware hw_address; /* Its physical address. */
|
struct hardware hw_address; /* Its physical address. */
|
||||||
@ -583,12 +603,12 @@ diff -up dhcp-4.3.3b1/includes/dhcpd.h.lpf-ib dhcp-4.3.3b1/includes/dhcpd.h
|
|||||||
struct in_addr *addresses; /* Addresses associated with this
|
struct in_addr *addresses; /* Addresses associated with this
|
||||||
* interface.
|
* interface.
|
||||||
*/
|
*/
|
||||||
@@ -2545,7 +2549,7 @@ void print_dns_status (int, struct dhcp_
|
@@ -2580,7 +2584,7 @@ void print_dns_status (int, struct dhcp_
|
||||||
#endif
|
#endif
|
||||||
const char *print_time(TIME);
|
const char *print_time(TIME);
|
||||||
|
|
||||||
-void get_hw_addr(const char *name, struct hardware *hw);
|
-void get_hw_addr(const char *name, struct hardware *hw);
|
||||||
+void get_hw_addr(struct interface_info *info);
|
+void get_hw_addr(struct interface_info *info);
|
||||||
|
char *buf_to_hex (const unsigned char *s, unsigned len,
|
||||||
/* socket.c */
|
const char *file, int line);
|
||||||
#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_RECEIVE) \
|
char *format_lease_id(const unsigned char *s, unsigned len, int format,
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
diff -up dhcp-4.3.0a1/server/db.c.leak dhcp-4.3.0a1/server/db.c
|
|
||||||
--- dhcp-4.3.0a1/server/db.c.leak 2013-12-20 13:39:51.629774500 +0100
|
|
||||||
+++ dhcp-4.3.0a1/server/db.c 2013-12-20 13:39:51.673773887 +0100
|
|
||||||
@@ -416,6 +416,7 @@ int write_host (host)
|
|
||||||
fputc (';', db_file);
|
|
||||||
if (errno)
|
|
||||||
++errors;
|
|
||||||
+ data_string_forget (&ip_addrs, MDL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (host -> named_group) {
|
|
||||||
diff -up dhcp-4.3.0a1/server/omapi.c.leak dhcp-4.3.0a1/server/omapi.c
|
|
||||||
--- dhcp-4.3.0a1/server/omapi.c.leak 2013-12-11 01:25:12.000000000 +0100
|
|
||||||
+++ dhcp-4.3.0a1/server/omapi.c 2013-12-20 13:39:51.674773873 +0100
|
|
||||||
@@ -1133,8 +1133,6 @@ isc_result_t dhcp_host_destroy (omapi_ob
|
|
||||||
if (h -> type != dhcp_type_host)
|
|
||||||
return DHCP_R_INVALIDARG;
|
|
||||||
|
|
||||||
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
|
|
||||||
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
|
|
||||||
struct host_decl *host = (struct host_decl *)h;
|
|
||||||
if (host -> n_ipaddr)
|
|
||||||
host_dereference (&host -> n_ipaddr, file, line);
|
|
||||||
@@ -1153,7 +1151,6 @@ isc_result_t dhcp_host_destroy (omapi_ob
|
|
||||||
omapi_object_dereference ((omapi_object_t **)
|
|
||||||
&host -> named_group, file, line);
|
|
||||||
data_string_forget (&host -> auth_key_id, file, line);
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
return ISC_R_SUCCESS;
|
|
||||||
}
|
|
||||||
@@ -1239,6 +1236,7 @@ isc_result_t dhcp_host_stuff_values (oma
|
|
||||||
ip_addrs.data, ip_addrs.len);
|
|
||||||
if (status != ISC_R_SUCCESS)
|
|
||||||
return status;
|
|
||||||
+ data_string_forget (&ip_addrs, MDL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (host -> client_identifier.len) {
|
|
@ -1,56 +1,77 @@
|
|||||||
diff -up dhcp-4.3.3b1/client/Makefile.am.remove-bind dhcp-4.3.3b1/client/Makefile.am
|
diff -up dhcp-4.3.4/client/Makefile.am.remove-bind dhcp-4.3.4/client/Makefile.am
|
||||||
--- dhcp-4.3.3b1/client/Makefile.am.remove-bind 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/client/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/client/Makefile.am 2015-08-10 10:20:26.373965596 +0200
|
+++ dhcp-4.3.4/client/Makefile.am 2016-04-29 14:13:50.335204352 +0200
|
||||||
@@ -10,8 +10,8 @@ dhclient_SOURCES = clparse.c dhclient.c
|
@@ -4,8 +4,6 @@
|
||||||
|
# production code. Sadly, we are not there yet.
|
||||||
|
SUBDIRS = . tests
|
||||||
|
|
||||||
|
-BINDLIBDIR = @BINDDIR@/lib
|
||||||
|
-
|
||||||
|
AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
|
||||||
|
-DLOCALSTATEDIR='"$(localstatedir)"'
|
||||||
|
|
||||||
|
@@ -15,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
||||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||||
scripts/solaris scripts/openwrt
|
scripts/solaris scripts/openwrt
|
||||||
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../bind/lib/libirs.a \
|
-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
||||||
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
diff -up dhcp-4.3.4/common/tests/Makefile.am.remove-bind dhcp-4.3.4/common/tests/Makefile.am
|
||||||
|
--- dhcp-4.3.4/common/tests/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
|
+++ dhcp-4.3.4/common/tests/Makefile.am 2016-04-29 14:13:50.335204352 +0200
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
SUBDIRS = .
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/common/tests/Makefile.am.remove-bind dhcp-4.3.3b1/common/tests/Makefile.am
|
-BINDLIBDIR = @BINDDIR@/lib
|
||||||
--- dhcp-4.3.3b1/common/tests/Makefile.am.remove-bind 2015-07-30 15:17:16.000000000 +0200
|
-
|
||||||
+++ dhcp-4.3.3b1/common/tests/Makefile.am 2015-08-10 10:20:26.373965596 +0200
|
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
|
||||||
@@ -13,14 +13,14 @@ ATF_TESTS += alloc_unittest dns_unittest
|
|
||||||
|
EXTRA_DIST = Atffile
|
||||||
|
@@ -15,26 +13,26 @@ ATF_TESTS += alloc_unittest dns_unittest
|
||||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
alloc_unittest_LDADD += ../libdhcp.a \
|
alloc_unittest_LDADD += ../libdhcp.a \
|
||||||
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
|
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
||||||
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
+ ../../omapip/libomapi.a \
|
+ ../../omapip/libomapi.a \
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
dns_unittest_LDADD += ../libdhcp.a \
|
dns_unittest_LDADD += ../libdhcp.a \
|
||||||
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
|
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
||||||
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
+ ../../omapip/libomapi.a \
|
+ ../../omapip/libomapi.a \
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
misc_unittest_LDADD = $(ATF_LDFLAGS)
|
misc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
@@ -31,8 +31,8 @@ misc_unittest_LDADD += ../libdhcp.a \
|
misc_unittest_LDADD += ../libdhcp.a \
|
||||||
|
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
||||||
|
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
|
+ ../../omapip/libomapi.a \
|
||||||
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
|
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
|
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
ns_name_unittest_LDADD += ../libdhcp.a \
|
ns_name_unittest_LDADD += ../libdhcp.a \
|
||||||
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
|
- ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
|
||||||
- ../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
+ ../../omapip/libomapi.a \
|
+ ../../omapip/libomapi.a \
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
check: $(ATF_TESTS)
|
check: $(ATF_TESTS)
|
||||||
sh ${top_srcdir}/tests/unittest.sh
|
-cp -n $(top_srcdir)/common/tests/Atffile Atffile
|
||||||
diff -up dhcp-4.3.3b1/configure.ac.remove-bind dhcp-4.3.3b1/configure.ac
|
diff -up dhcp-4.3.4/configure.ac.remove-bind dhcp-4.3.4/configure.ac
|
||||||
--- dhcp-4.3.3b1/configure.ac.remove-bind 2015-07-30 21:02:23.000000000 +0200
|
--- dhcp-4.3.4/configure.ac.remove-bind 2016-03-22 14:19:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/configure.ac 2015-08-10 10:31:02.761852511 +0200
|
+++ dhcp-4.3.4/configure.ac 2016-04-29 14:13:50.335204352 +0200
|
||||||
@@ -606,23 +606,40 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.t
|
@@ -682,20 +682,33 @@ AC_CHECK_MEMBER(struct tpacket_auxdata.t
|
||||||
|
BINDDIR=
|
||||||
libbind=
|
BINDSRCDIR=
|
||||||
AC_ARG_WITH(libbind,
|
AC_ARG_WITH(libbind,
|
||||||
- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
|
- AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
|
||||||
- (default is ./bind)]),
|
- (default is ./bind)]),
|
||||||
@ -73,62 +94,74 @@ diff -up dhcp-4.3.3b1/configure.ac.remove-bind dhcp-4.3.3b1/configure.ac
|
|||||||
+ [libbind_libs="$withval"], [libbind_libs='no'])
|
+ [libbind_libs="$withval"], [libbind_libs='no'])
|
||||||
+case "$libbind_libs" in
|
+case "$libbind_libs" in
|
||||||
yes)
|
yes)
|
||||||
- libbind="\${top_srcdir}/bind"
|
- BINDDIR="\${top_srcdir}/bind"
|
||||||
|
- BINDSRCDIR="\${top_srcdir}/bind"
|
||||||
+ AC_MSG_ERROR([Specify path to bind9 libraries])
|
+ AC_MSG_ERROR([Specify path to bind9 libraries])
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
- libbind="\${top_srcdir}/bind"
|
- BINDDIR="\${top_srcdir}/bind"
|
||||||
|
- BINDSRCDIR="\${top_srcdir}/bind"
|
||||||
+ BUNDLED_BIND=yes
|
+ BUNDLED_BIND=yes
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
- libbind="$use_libbind"
|
- BINDDIR="$use_libbind"
|
||||||
+ BIND9_LIBDIR="-L$libbind_libs"
|
+ BIND9_LIBDIR="-L$libbind_libs"
|
||||||
+ BUNDLED_BIND=no
|
+ BUNDLED_BIND=no
|
||||||
if test ! -d "bind"; then
|
if test ! -d "$srcdir/bind"; then
|
||||||
AC_MSG_WARN(empty bind directory)
|
# no bind directory, create it with a fake Makefile.in
|
||||||
|
# (AC_CONFIG_FILES and top Makefile refer to it so
|
||||||
|
@@ -709,8 +722,8 @@ EOF
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
-AC_SUBST(BINDDIR)
|
||||||
|
-AC_SUBST(BINDSRCDIR)
|
||||||
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
|
+AM_CONDITIONAL([BUNDLED_BIND], [test "$BUNDLED_BIND" = yes])
|
||||||
+AC_SUBST([BIND9_LIBDIR])
|
+AC_SUBST([BIND9_LIBDIR])
|
||||||
|
|
||||||
# OpenLDAP support.
|
# OpenLDAP support.
|
||||||
AC_ARG_WITH(ldap,
|
AC_ARG_WITH(ldap,
|
||||||
@@ -700,7 +717,7 @@ fi
|
@@ -788,7 +801,7 @@ fi
|
||||||
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
||||||
|
|
||||||
# Try to add the bind include directory
|
# Try to add the bind and dhcp include directories
|
||||||
-CFLAGS="$CFLAGS -I$libbind/include"
|
-CFLAGS="$CFLAGS -I\$(top_srcdir)/includes -I$BINDDIR/include"
|
||||||
+CFLAGS="$CFLAGS -I$libbind"
|
+CFLAGS="$CFLAGS -I$libbind"
|
||||||
|
|
||||||
case "$host" in
|
case "$host" in
|
||||||
*-darwin*)
|
*-darwin*)
|
||||||
diff -up dhcp-4.3.3b1/dhcpctl/Makefile.am.remove-bind dhcp-4.3.3b1/dhcpctl/Makefile.am
|
diff -up dhcp-4.3.4/dhcpctl/Makefile.am.remove-bind dhcp-4.3.4/dhcpctl/Makefile.am
|
||||||
--- dhcp-4.3.3b1/dhcpctl/Makefile.am.remove-bind 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/dhcpctl/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/dhcpctl/Makefile.am 2015-08-10 10:20:26.374965593 +0200
|
+++ dhcp-4.3.4/dhcpctl/Makefile.am 2016-04-29 14:13:50.336204352 +0200
|
||||||
@@ -6,12 +6,9 @@ EXTRA_DIST = $(man_MANS)
|
@@ -1,5 +1,3 @@
|
||||||
|
-BINDLIBDIR = @BINDDIR@/lib
|
||||||
|
-
|
||||||
|
bin_PROGRAMS = omshell
|
||||||
|
lib_LIBRARIES = libdhcpctl.a
|
||||||
|
noinst_PROGRAMS = cltest
|
||||||
|
@@ -8,12 +6,10 @@ EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
omshell_SOURCES = omshell.c
|
omshell_SOURCES = omshell.c
|
||||||
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
||||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
-
|
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
||||||
|
|
||||||
cltest_SOURCES = cltest.c
|
cltest_SOURCES = cltest.c
|
||||||
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
||||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
diff -up dhcp-4.3.3b1/Makefile.am.remove-bind dhcp-4.3.3b1/Makefile.am
|
diff -up dhcp-4.3.4/Makefile.am.remove-bind dhcp-4.3.4/Makefile.am
|
||||||
--- dhcp-4.3.3b1/Makefile.am.remove-bind 2015-08-10 10:20:26.374965593 +0200
|
--- dhcp-4.3.4/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/Makefile.am 2015-08-10 10:32:20.540597417 +0200
|
+++ dhcp-4.3.4/Makefile.am 2016-04-29 14:14:06.863193261 +0200
|
||||||
@@ -25,7 +25,13 @@ EXTRA_DIST = RELNOTES LICENSE \
|
@@ -26,7 +26,13 @@ EXTRA_DIST = RELNOTES LICENSE \
|
||||||
bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
|
bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
|
||||||
common/tests/Atffile server/tests/Atffile
|
common/tests/Atffile server/tests/Atffile
|
||||||
|
|
||||||
-SUBDIRS = bind includes tests common omapip client dhcpctl relay server
|
-SUBDIRS = @BINDSRCDIR@ includes tests common omapip client dhcpctl relay server
|
||||||
+if BUNDLED_BIND
|
+if BUNDLED_BIND
|
||||||
+SUBDIRS = bind
|
+SUBDIRS = bind
|
||||||
+else
|
+else
|
||||||
@ -139,58 +172,88 @@ diff -up dhcp-4.3.3b1/Makefile.am.remove-bind dhcp-4.3.3b1/Makefile.am
|
|||||||
|
|
||||||
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
nobase_include_HEADERS = dhcpctl/dhcpctl.h
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/omapip/Makefile.am.remove-bind dhcp-4.3.3b1/omapip/Makefile.am
|
diff -up dhcp-4.3.4/omapip/Makefile.am.remove-bind dhcp-4.3.4/omapip/Makefile.am
|
||||||
--- dhcp-4.3.3b1/omapip/Makefile.am.remove-bind 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/omapip/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/omapip/Makefile.am 2015-08-10 10:20:26.375965590 +0200
|
+++ dhcp-4.3.4/omapip/Makefile.am 2016-04-29 14:13:50.336204352 +0200
|
||||||
@@ -10,6 +10,5 @@ man_MANS = omapi.3
|
@@ -1,5 +1,3 @@
|
||||||
|
-BINDLIBDIR = @BINDDIR@/lib
|
||||||
|
-
|
||||||
|
lib_LIBRARIES = libomapi.a
|
||||||
|
noinst_PROGRAMS = svtest
|
||||||
|
|
||||||
|
@@ -12,6 +10,6 @@ man_MANS = omapi.3
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
svtest_SOURCES = test.c
|
svtest_SOURCES = test.c
|
||||||
-svtest_LDADD = libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
-svtest_LDADD = libomapi.a $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
||||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
-
|
|
||||||
+svtest_LDADD = libomapi.a \
|
+svtest_LDADD = libomapi.a \
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
diff -up dhcp-4.3.3b1/relay/Makefile.am.remove-bind dhcp-4.3.3b1/relay/Makefile.am
|
|
||||||
--- dhcp-4.3.3b1/relay/Makefile.am.remove-bind 2015-07-30 15:17:16.000000000 +0200
|
diff -up dhcp-4.3.4/relay/Makefile.am.remove-bind dhcp-4.3.4/relay/Makefile.am
|
||||||
+++ dhcp-4.3.3b1/relay/Makefile.am 2015-08-10 10:20:26.375965590 +0200
|
--- dhcp-4.3.4/relay/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
@@ -3,8 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
+++ dhcp-4.3.4/relay/Makefile.am 2016-04-29 14:13:50.336204352 +0200
|
||||||
|
@@ -1,12 +1,9 @@
|
||||||
|
-BINDLIBDIR = @BINDDIR@/lib
|
||||||
|
-
|
||||||
|
AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
|
||||||
|
|
||||||
sbin_PROGRAMS = dhcrelay
|
sbin_PROGRAMS = dhcrelay
|
||||||
dhcrelay_SOURCES = dhcrelay.c
|
dhcrelay_SOURCES = dhcrelay.c
|
||||||
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
- ../bind/lib/libirs.a ../bind/lib/libdns.a \
|
- $(BINDLIBDIR)/libirs.a $(BINDLIBDIR)/libdns.a \
|
||||||
- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
|
- $(BINDLIBDIR)/libisccfg.a $(BINDLIBDIR)/libisc.a
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
man_MANS = dhcrelay.8
|
man_MANS = dhcrelay.8
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/server/Makefile.am.remove-bind dhcp-4.3.3b1/server/Makefile.am
|
diff -up dhcp-4.3.4/server/Makefile.am.remove-bind dhcp-4.3.4/server/Makefile.am
|
||||||
--- dhcp-4.3.3b1/server/Makefile.am.remove-bind 2015-08-10 10:20:26.375965590 +0200
|
--- dhcp-4.3.4/server/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/server/Makefile.am 2015-08-10 10:34:07.597246299 +0200
|
+++ dhcp-4.3.4/server/Makefile.am 2016-04-29 14:13:50.336204352 +0200
|
||||||
@@ -13,10 +13,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
@@ -4,8 +4,6 @@
|
||||||
|
# production code. Sadly, we are not there yet.
|
||||||
|
SUBDIRS = . tests
|
||||||
|
|
||||||
|
-BINDLIBDIR = @BINDDIR@/lib
|
||||||
|
-
|
||||||
|
AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
|
||||||
|
|
||||||
|
dist_sysconf_DATA = dhcpd.conf.example
|
||||||
|
@@ -15,10 +13,9 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||||
dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
|
dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
|
||||||
|
|
||||||
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
dhcpd_CFLAGS = $(LDAP_CFLAGS)
|
||||||
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
-dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
- ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
|
- ../dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
|
||||||
- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a \
|
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
|
||||||
- $(LDAP_LIBS)
|
- $(BINDLIBDIR)/libisc.a $(LDAP_LIBS)
|
||||||
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
|
+dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../dhcpctl/libdhcpctl.a \
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \
|
||||||
+ $(LDAP_LIBS)
|
+ $(LDAP_LIBS)
|
||||||
|
|
||||||
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
diff -up dhcp-4.3.3b1/server/tests/Makefile.am.remove-bind dhcp-4.3.3b1/server/tests/Makefile.am
|
diff -up dhcp-4.3.4/server/tests/Makefile.am.remove-bind dhcp-4.3.4/server/tests/Makefile.am
|
||||||
--- dhcp-4.3.3b1/server/tests/Makefile.am.remove-bind 2015-08-10 10:20:26.375965590 +0200
|
--- dhcp-4.3.4/server/tests/Makefile.am.remove-bind 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/server/tests/Makefile.am 2015-08-10 10:35:34.931959866 +0200
|
+++ dhcp-4.3.4/server/tests/Makefile.am 2016-04-29 14:13:50.336204352 +0200
|
||||||
@@ -18,9 +18,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
@@ -1,9 +1,7 @@
|
||||||
|
SUBDIRS = .
|
||||||
|
|
||||||
|
-BINDLIBDIR = @BINDDIR@/lib
|
||||||
|
-
|
||||||
|
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
|
||||||
|
-AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
|
||||||
|
+AM_CPPFLAGS += -I$(top_srcdir)
|
||||||
|
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
|
||||||
|
|
||||||
|
EXTRA_DIST = Atffile
|
||||||
|
@@ -20,9 +18,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
||||||
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
|
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
|
||||||
|
|
||||||
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a \
|
||||||
- $(top_builddir)/dhcpctl/libdhcpctl.a $(top_builddir)/bind/lib/libirs.a \
|
- $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
|
||||||
- $(top_builddir)/bind/lib/libdns.a $(top_builddir)/bind/lib/libisccfg.a \
|
- $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
|
||||||
- $(top_builddir)/bind/lib/libisc.a
|
- $(BINDLIBDIR)/libisc.a
|
||||||
+ $(top_builddir)/dhcpctl/libdhcpctl.a \
|
+ $(top_builddir)/dhcpctl/libdhcpctl.a \
|
||||||
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
+ $(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
diff -up dhcp-4.3.3b1/client/clparse.c.rfc3442 dhcp-4.3.3b1/client/clparse.c
|
diff -up dhcp-4.3.4/client/clparse.c.rfc3442 dhcp-4.3.4/client/clparse.c
|
||||||
--- dhcp-4.3.3b1/client/clparse.c.rfc3442 2015-08-10 10:55:31.711936295 +0200
|
--- dhcp-4.3.4/client/clparse.c.rfc3442 2016-04-29 12:23:34.192032714 +0200
|
||||||
+++ dhcp-4.3.3b1/client/clparse.c 2015-08-10 10:55:31.735936210 +0200
|
+++ dhcp-4.3.4/client/clparse.c 2016-04-29 12:24:37.531016317 +0200
|
||||||
@@ -31,7 +31,7 @@
|
@@ -31,7 +31,7 @@
|
||||||
|
|
||||||
struct client_config top_level_config;
|
struct client_config top_level_config;
|
||||||
|
|
||||||
-#define NUM_DEFAULT_REQUESTED_OPTS 14
|
-#define NUM_DEFAULT_REQUESTED_OPTS 14
|
||||||
+#define NUM_DEFAULT_REQUESTED_OPTS 15
|
+#define NUM_DEFAULT_REQUESTED_OPTS 15
|
||||||
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
|
/* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */
|
||||||
|
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1];
|
||||||
|
|
||||||
static void parse_client_default_duid(struct parse *cfile);
|
@@ -87,7 +87,11 @@ isc_result_t read_client_conf ()
|
||||||
@@ -84,7 +84,11 @@ isc_result_t read_client_conf ()
|
|
||||||
dhcp_universe.code_hash, &code, 0, MDL);
|
dhcp_universe.code_hash, &code, 0, MDL);
|
||||||
|
|
||||||
/* 4 */
|
/* 4 */
|
||||||
@ -23,7 +23,7 @@ diff -up dhcp-4.3.3b1/client/clparse.c.rfc3442 dhcp-4.3.3b1/client/clparse.c
|
|||||||
option_code_hash_lookup(&default_requested_options[3],
|
option_code_hash_lookup(&default_requested_options[3],
|
||||||
dhcp_universe.code_hash, &code, 0, MDL);
|
dhcp_universe.code_hash, &code, 0, MDL);
|
||||||
|
|
||||||
@@ -138,6 +142,11 @@ isc_result_t read_client_conf ()
|
@@ -141,6 +145,11 @@ isc_result_t read_client_conf ()
|
||||||
option_code_hash_lookup(&default_requested_options[13],
|
option_code_hash_lookup(&default_requested_options[13],
|
||||||
dhcp_universe.code_hash, &code, 0, MDL);
|
dhcp_universe.code_hash, &code, 0, MDL);
|
||||||
|
|
||||||
@ -35,9 +35,9 @@ diff -up dhcp-4.3.3b1/client/clparse.c.rfc3442 dhcp-4.3.3b1/client/clparse.c
|
|||||||
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
||||||
if (default_requested_options[code] == NULL)
|
if (default_requested_options[code] == NULL)
|
||||||
log_fatal("Unable to find option definition for "
|
log_fatal("Unable to find option definition for "
|
||||||
diff -up dhcp-4.3.3b1/common/dhcp-options.5.rfc3442 dhcp-4.3.3b1/common/dhcp-options.5
|
diff -up dhcp-4.3.4/common/dhcp-options.5.rfc3442 dhcp-4.3.4/common/dhcp-options.5
|
||||||
--- dhcp-4.3.3b1/common/dhcp-options.5.rfc3442 2015-08-10 10:55:31.705936316 +0200
|
--- dhcp-4.3.4/common/dhcp-options.5.rfc3442 2016-04-29 12:23:34.183032716 +0200
|
||||||
+++ dhcp-4.3.3b1/common/dhcp-options.5 2015-08-10 10:55:31.735936210 +0200
|
+++ dhcp-4.3.4/common/dhcp-options.5 2016-04-29 12:23:34.237032703 +0200
|
||||||
@@ -111,6 +111,26 @@ hexadecimal, separated by colons. For e
|
@@ -111,6 +111,26 @@ hexadecimal, separated by colons. For e
|
||||||
or
|
or
|
||||||
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
|
option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
|
||||||
@ -95,10 +95,10 @@ diff -up dhcp-4.3.3b1/common/dhcp-options.5.rfc3442 dhcp-4.3.3b1/common/dhcp-opt
|
|||||||
.B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
|
.B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
|
||||||
[\fB,\fR \fIip-address\fR...]\fB;\fR
|
[\fB,\fR \fIip-address\fR...]\fB;\fR
|
||||||
.fi
|
.fi
|
||||||
diff -up dhcp-4.3.3b1/common/inet.c.rfc3442 dhcp-4.3.3b1/common/inet.c
|
diff -up dhcp-4.3.4/common/inet.c.rfc3442 dhcp-4.3.4/common/inet.c
|
||||||
--- dhcp-4.3.3b1/common/inet.c.rfc3442 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/common/inet.c.rfc3442 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/common/inet.c 2015-08-10 10:55:31.735936210 +0200
|
+++ dhcp-4.3.4/common/inet.c 2016-04-29 12:23:34.237032703 +0200
|
||||||
@@ -521,6 +521,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
|
@@ -519,6 +519,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
|
||||||
return ISC_R_SUCCESS;
|
return ISC_R_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,9 +159,9 @@ diff -up dhcp-4.3.3b1/common/inet.c.rfc3442 dhcp-4.3.3b1/common/inet.c
|
|||||||
/* piaddr() turns an iaddr structure into a printable address. */
|
/* piaddr() turns an iaddr structure into a printable address. */
|
||||||
/* XXX: should use a const pointer rather than passing the structure */
|
/* XXX: should use a const pointer rather than passing the structure */
|
||||||
const char *
|
const char *
|
||||||
diff -up dhcp-4.3.3b1/common/options.c.rfc3442 dhcp-4.3.3b1/common/options.c
|
diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
|
||||||
--- dhcp-4.3.3b1/common/options.c.rfc3442 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/common/options.c.rfc3442 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/common/options.c 2015-08-10 10:55:31.736936207 +0200
|
+++ dhcp-4.3.4/common/options.c 2016-04-29 12:23:34.237032703 +0200
|
||||||
@@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
|
@@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
|
||||||
* packet.
|
* packet.
|
||||||
*/
|
*/
|
||||||
@ -246,9 +246,9 @@ diff -up dhcp-4.3.3b1/common/options.c.rfc3442 dhcp-4.3.3b1/common/options.c
|
|||||||
case '6':
|
case '6':
|
||||||
iaddr.len = 16;
|
iaddr.len = 16;
|
||||||
memcpy(iaddr.iabuf, dp, 16);
|
memcpy(iaddr.iabuf, dp, 16);
|
||||||
diff -up dhcp-4.3.3b1/common/parse.c.rfc3442 dhcp-4.3.3b1/common/parse.c
|
diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
|
||||||
--- dhcp-4.3.3b1/common/parse.c.rfc3442 2015-08-10 10:55:31.725936246 +0200
|
--- dhcp-4.3.4/common/parse.c.rfc3442 2016-04-29 12:23:34.220032707 +0200
|
||||||
+++ dhcp-4.3.3b1/common/parse.c 2015-08-10 10:55:31.741936189 +0200
|
+++ dhcp-4.3.4/common/parse.c 2016-04-29 12:23:34.238032702 +0200
|
||||||
@@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
|
@@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,10 +341,10 @@ diff -up dhcp-4.3.3b1/common/parse.c.rfc3442 dhcp-4.3.3b1/common/parse.c
|
|||||||
|
|
||||||
alloc:
|
alloc:
|
||||||
if (hunkix + len > sizeof hunkbuf) {
|
if (hunkix + len > sizeof hunkbuf) {
|
||||||
diff -up dhcp-4.3.3b1/common/tables.c.rfc3442 dhcp-4.3.3b1/common/tables.c
|
diff -up dhcp-4.3.4/common/tables.c.rfc3442 dhcp-4.3.4/common/tables.c
|
||||||
--- dhcp-4.3.3b1/common/tables.c.rfc3442 2015-08-10 10:55:31.719936267 +0200
|
--- dhcp-4.3.4/common/tables.c.rfc3442 2016-04-29 12:23:34.209032710 +0200
|
||||||
+++ dhcp-4.3.3b1/common/tables.c 2015-08-10 10:55:31.742936186 +0200
|
+++ dhcp-4.3.4/common/tables.c 2016-04-29 12:23:34.238032702 +0200
|
||||||
@@ -46,6 +46,7 @@ HASH_FUNCTIONS (option_code, const unsig
|
@@ -45,6 +45,7 @@ HASH_FUNCTIONS (option_code, const unsig
|
||||||
Format codes:
|
Format codes:
|
||||||
|
|
||||||
I - IPv4 address
|
I - IPv4 address
|
||||||
@ -352,7 +352,7 @@ diff -up dhcp-4.3.3b1/common/tables.c.rfc3442 dhcp-4.3.3b1/common/tables.c
|
|||||||
6 - IPv6 address
|
6 - IPv6 address
|
||||||
l - 32-bit signed integer
|
l - 32-bit signed integer
|
||||||
L - 32-bit unsigned integer
|
L - 32-bit unsigned integer
|
||||||
@@ -214,6 +215,7 @@ static struct option dhcp_options[] = {
|
@@ -216,6 +217,7 @@ static struct option dhcp_options[] = {
|
||||||
#endif
|
#endif
|
||||||
{ "subnet-selection", "I", &dhcp_universe, 118, 1 },
|
{ "subnet-selection", "I", &dhcp_universe, 118, 1 },
|
||||||
{ "domain-search", "D", &dhcp_universe, 119, 1 },
|
{ "domain-search", "D", &dhcp_universe, 119, 1 },
|
||||||
@ -360,10 +360,10 @@ diff -up dhcp-4.3.3b1/common/tables.c.rfc3442 dhcp-4.3.3b1/common/tables.c
|
|||||||
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
|
{ "vivco", "Evendor-class.", &dhcp_universe, 124, 1 },
|
||||||
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
|
{ "vivso", "Evendor.", &dhcp_universe, 125, 1 },
|
||||||
#if 0
|
#if 0
|
||||||
diff -up dhcp-4.3.3b1/includes/dhcpd.h.rfc3442 dhcp-4.3.3b1/includes/dhcpd.h
|
diff -up dhcp-4.3.4/includes/dhcpd.h.rfc3442 dhcp-4.3.4/includes/dhcpd.h
|
||||||
--- dhcp-4.3.3b1/includes/dhcpd.h.rfc3442 2015-08-10 10:55:31.709936302 +0200
|
--- dhcp-4.3.4/includes/dhcpd.h.rfc3442 2016-04-29 12:23:34.186032716 +0200
|
||||||
+++ dhcp-4.3.3b1/includes/dhcpd.h 2015-08-10 10:55:31.743936182 +0200
|
+++ dhcp-4.3.4/includes/dhcpd.h 2016-04-29 12:23:34.239032702 +0200
|
||||||
@@ -2855,6 +2855,7 @@ isc_result_t range2cidr(struct iaddrcidr
|
@@ -2894,6 +2894,7 @@ isc_result_t range2cidr(struct iaddrcidr
|
||||||
const struct iaddr *lo, const struct iaddr *hi);
|
const struct iaddr *lo, const struct iaddr *hi);
|
||||||
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
|
isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
|
||||||
const char *piaddr (struct iaddr);
|
const char *piaddr (struct iaddr);
|
||||||
@ -371,7 +371,7 @@ diff -up dhcp-4.3.3b1/includes/dhcpd.h.rfc3442 dhcp-4.3.3b1/includes/dhcpd.h
|
|||||||
char *piaddrmask(struct iaddr *, struct iaddr *);
|
char *piaddrmask(struct iaddr *, struct iaddr *);
|
||||||
char *piaddrcidr(const struct iaddr *, unsigned int);
|
char *piaddrcidr(const struct iaddr *, unsigned int);
|
||||||
u_int16_t validate_port(char *);
|
u_int16_t validate_port(char *);
|
||||||
@@ -3065,6 +3066,7 @@ void parse_client_lease_declaration (str
|
@@ -3108,6 +3109,7 @@ void parse_client_lease_declaration (str
|
||||||
int parse_option_decl (struct option_cache **, struct parse *);
|
int parse_option_decl (struct option_cache **, struct parse *);
|
||||||
void parse_string_list (struct parse *, struct string_list **, int);
|
void parse_string_list (struct parse *, struct string_list **, int);
|
||||||
int parse_ip_addr (struct parse *, struct iaddr *);
|
int parse_ip_addr (struct parse *, struct iaddr *);
|
||||||
@ -379,9 +379,9 @@ diff -up dhcp-4.3.3b1/includes/dhcpd.h.rfc3442 dhcp-4.3.3b1/includes/dhcpd.h
|
|||||||
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
|
int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
|
||||||
void parse_reject_statement (struct parse *, struct client_config *);
|
void parse_reject_statement (struct parse *, struct client_config *);
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/includes/dhcp.h.rfc3442 dhcp-4.3.3b1/includes/dhcp.h
|
diff -up dhcp-4.3.4/includes/dhcp.h.rfc3442 dhcp-4.3.4/includes/dhcp.h
|
||||||
--- dhcp-4.3.3b1/includes/dhcp.h.rfc3442 2015-07-30 15:17:16.000000000 +0200
|
--- dhcp-4.3.4/includes/dhcp.h.rfc3442 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.3b1/includes/dhcp.h 2015-08-10 10:55:31.743936182 +0200
|
+++ dhcp-4.3.4/includes/dhcp.h 2016-04-29 12:23:34.239032702 +0200
|
||||||
@@ -159,6 +159,7 @@ struct dhcp_packet {
|
@@ -159,6 +159,7 @@ struct dhcp_packet {
|
||||||
#define DHO_ASSOCIATED_IP 92
|
#define DHO_ASSOCIATED_IP 92
|
||||||
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
|
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
|
||||||
@ -390,15 +390,15 @@ diff -up dhcp-4.3.3b1/includes/dhcp.h.rfc3442 dhcp-4.3.3b1/includes/dhcp.h
|
|||||||
#define DHO_VIVCO_SUBOPTIONS 124
|
#define DHO_VIVCO_SUBOPTIONS 124
|
||||||
#define DHO_VIVSO_SUBOPTIONS 125
|
#define DHO_VIVSO_SUBOPTIONS 125
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/includes/dhctoken.h.rfc3442 dhcp-4.3.3b1/includes/dhctoken.h
|
diff -up dhcp-4.3.4/includes/dhctoken.h.rfc3442 dhcp-4.3.4/includes/dhctoken.h
|
||||||
--- dhcp-4.3.3b1/includes/dhctoken.h.rfc3442 2015-08-10 10:55:31.743936182 +0200
|
--- dhcp-4.3.4/includes/dhctoken.h.rfc3442 2016-04-29 12:23:34.239032702 +0200
|
||||||
+++ dhcp-4.3.3b1/includes/dhctoken.h 2015-08-10 10:56:19.325768194 +0200
|
+++ dhcp-4.3.4/includes/dhctoken.h 2016-04-29 12:25:07.236008628 +0200
|
||||||
@@ -369,7 +369,8 @@ enum dhcp_token {
|
@@ -374,7 +374,8 @@ enum dhcp_token {
|
||||||
V6RELAY = 670,
|
LEASE_ID_FORMAT = 676,
|
||||||
V6RELOPT = 671,
|
TOKEN_HEX = 677,
|
||||||
PARSE_VENDOR_OPT = 672,
|
TOKEN_OCTAL = 678,
|
||||||
- BOOTP_BROADCAST_ALWAYS = 673
|
- BOOTP_BROADCAST_ALWAYS = 679
|
||||||
+ BOOTP_BROADCAST_ALWAYS = 673,
|
+ BOOTP_BROADCAST_ALWAYS = 679,
|
||||||
+ DESTINATION_DESCRIPTOR = 674
|
+ DESTINATION_DESCRIPTOR = 674
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.3b1/configure.ac.sd_notify dhcp-4.3.3b1/configure.ac
|
diff -up dhcp-4.3.4/configure.ac.sd_notify dhcp-4.3.4/configure.ac
|
||||||
--- dhcp-4.3.3b1/configure.ac.sd_notify 2015-08-10 11:57:24.955325674 +0200
|
--- dhcp-4.3.4/configure.ac.sd_notify 2016-04-29 13:08:52.813287060 +0200
|
||||||
+++ dhcp-4.3.3b1/configure.ac 2015-08-10 11:58:20.024113933 +0200
|
+++ dhcp-4.3.4/configure.ac 2016-04-29 13:08:52.872287075 +0200
|
||||||
@@ -777,6 +777,17 @@ if test x$ldap = xyes || test x$ldapcryp
|
@@ -832,6 +832,17 @@ if test x$ldap = xyes || test x$ldapcryp
|
||||||
AC_SUBST(LDAP_CFLAGS, [$LDAP_CFLAGS])
|
AC_SUBST(LDAP_CFLAGS, [$LDAP_CFLAGS])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -19,10 +19,10 @@ diff -up dhcp-4.3.3b1/configure.ac.sd_notify dhcp-4.3.3b1/configure.ac
|
|||||||
# Append selected warning levels to CFLAGS before substitution (but after
|
# Append selected warning levels to CFLAGS before substitution (but after
|
||||||
# AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
|
# AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) & etc).
|
||||||
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
CFLAGS="$CFLAGS $STD_CWARNINGS"
|
||||||
diff -up dhcp-4.3.3b1/relay/dhcrelay.c.sd_notify dhcp-4.3.3b1/relay/dhcrelay.c
|
diff -up dhcp-4.3.4/relay/dhcrelay.c.sd_notify dhcp-4.3.4/relay/dhcrelay.c
|
||||||
--- dhcp-4.3.3b1/relay/dhcrelay.c.sd_notify 2015-08-10 11:57:24.901325882 +0200
|
--- dhcp-4.3.4/relay/dhcrelay.c.sd_notify 2016-04-29 13:08:52.814287061 +0200
|
||||||
+++ dhcp-4.3.3b1/relay/dhcrelay.c 2015-08-10 11:57:24.956325670 +0200
|
+++ dhcp-4.3.4/relay/dhcrelay.c 2016-04-29 13:08:52.872287075 +0200
|
||||||
@@ -36,6 +36,10 @@
|
@@ -37,6 +37,10 @@
|
||||||
int keep_capabilities = 0;
|
int keep_capabilities = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ diff -up dhcp-4.3.3b1/relay/dhcrelay.c.sd_notify dhcp-4.3.3b1/relay/dhcrelay.c
|
|||||||
TIME default_lease_time = 43200; /* 12 hours... */
|
TIME default_lease_time = 43200; /* 12 hours... */
|
||||||
TIME max_lease_time = 86400; /* 24 hours... */
|
TIME max_lease_time = 86400; /* 24 hours... */
|
||||||
struct tree_cache *global_options[256];
|
struct tree_cache *global_options[256];
|
||||||
@@ -627,6 +631,14 @@ main(int argc, char **argv) {
|
@@ -709,6 +713,14 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -48,23 +48,23 @@ diff -up dhcp-4.3.3b1/relay/dhcrelay.c.sd_notify dhcp-4.3.3b1/relay/dhcrelay.c
|
|||||||
/* Start dispatching packets and timeouts... */
|
/* Start dispatching packets and timeouts... */
|
||||||
dispatch();
|
dispatch();
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/server/dhcpd.c.sd_notify dhcp-4.3.3b1/server/dhcpd.c
|
diff -up dhcp-4.3.4/server/dhcpd.c.sd_notify dhcp-4.3.4/server/dhcpd.c
|
||||||
--- dhcp-4.3.3b1/server/dhcpd.c.sd_notify 2015-08-10 11:57:24.937325743 +0200
|
--- dhcp-4.3.4/server/dhcpd.c.sd_notify 2016-04-29 13:08:52.873287075 +0200
|
||||||
+++ dhcp-4.3.3b1/server/dhcpd.c 2015-08-10 11:57:24.956325670 +0200
|
+++ dhcp-4.3.4/server/dhcpd.c 2016-04-29 13:12:00.655333096 +0200
|
||||||
@@ -58,6 +58,10 @@ gid_t set_gid = 0;
|
@@ -57,6 +57,10 @@ uid_t set_uid = 0;
|
||||||
|
gid_t set_gid = 0;
|
||||||
#include "trace.h"
|
#endif /* PARANOIA */
|
||||||
|
|
||||||
+#ifdef HAVE_LIBSYSTEMD
|
+#ifdef HAVE_LIBSYSTEMD
|
||||||
+#include <systemd/sd-daemon.h>
|
+#include <systemd/sd-daemon.h>
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
#ifndef UNIT_TEST
|
struct iaddr server_identifier;
|
||||||
static void usage(void);
|
int server_identifier_matched;
|
||||||
#endif
|
|
||||||
@@ -820,6 +824,13 @@ main(int argc, char **argv) {
|
|
||||||
|
|
||||||
TRACE(DHCPD_MAIN());
|
@@ -931,6 +935,14 @@ main(int argc, char **argv) {
|
||||||
|
/* Log that we are about to start working */
|
||||||
|
log_info("Server starting service.");
|
||||||
|
|
||||||
+#ifdef HAVE_LIBSYSTEMD
|
+#ifdef HAVE_LIBSYSTEMD
|
||||||
+ /* We are ready to process incomming packets. Let's notify systemd */
|
+ /* We are ready to process incomming packets. Let's notify systemd */
|
||||||
@ -73,6 +73,7 @@ diff -up dhcp-4.3.3b1/server/dhcpd.c.sd_notify dhcp-4.3.3b1/server/dhcpd.c
|
|||||||
+ "MAINPID=%lu",
|
+ "MAINPID=%lu",
|
||||||
+ (unsigned long) getpid());
|
+ (unsigned long) getpid());
|
||||||
+#endif
|
+#endif
|
||||||
|
+
|
||||||
/*
|
/*
|
||||||
* Receive packets and dispatch them...
|
* Receive packets and dispatch them...
|
||||||
* dispatch() will never return.
|
* dispatch() will never return.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
diff -up dhcp-4.3.4/client/dhc6.c.sendDecline dhcp-4.3.4/client/dhc6.c
|
||||||
--- dhcp-4.3.0a1/client/dhc6.c.sendDecline 2013-12-11 01:25:12.000000000 +0100
|
--- dhcp-4.3.4/client/dhc6.c.sendDecline 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.0a1/client/dhc6.c 2013-12-19 15:56:18.297660118 +0100
|
+++ dhcp-4.3.4/client/dhc6.c 2016-05-02 14:51:57.916578401 +0200
|
||||||
@@ -96,6 +96,8 @@ void do_select6(void *input);
|
@@ -115,6 +115,8 @@ void do_select6(void *input);
|
||||||
void do_refresh6(void *input);
|
void do_refresh6(void *input);
|
||||||
static void do_release6(void *input);
|
static void do_release6(void *input);
|
||||||
static void start_bound(struct client_state *client);
|
static void start_bound(struct client_state *client);
|
||||||
@ -10,7 +10,7 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
static void start_informed(struct client_state *client);
|
static void start_informed(struct client_state *client);
|
||||||
void informed_handler(struct packet *packet, struct client_state *client);
|
void informed_handler(struct packet *packet, struct client_state *client);
|
||||||
void bound_handler(struct packet *packet, struct client_state *client);
|
void bound_handler(struct packet *packet, struct client_state *client);
|
||||||
@@ -2017,6 +2019,7 @@ start_release6(struct client_state *clie
|
@@ -2314,6 +2316,7 @@ start_release6(struct client_state *clie
|
||||||
cancel_timeout(do_select6, client);
|
cancel_timeout(do_select6, client);
|
||||||
cancel_timeout(do_refresh6, client);
|
cancel_timeout(do_refresh6, client);
|
||||||
cancel_timeout(do_release6, client);
|
cancel_timeout(do_release6, client);
|
||||||
@ -18,7 +18,7 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
client->state = S_STOPPED;
|
client->state = S_STOPPED;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2650,6 +2653,7 @@ dhc6_check_reply(struct client_state *cl
|
@@ -2968,6 +2971,7 @@ dhc6_check_reply(struct client_state *cl
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S_STOPPED:
|
case S_STOPPED:
|
||||||
@ -26,7 +26,7 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
action = dhc6_stop_action;
|
action = dhc6_stop_action;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2751,6 +2755,7 @@ dhc6_check_reply(struct client_state *cl
|
@@ -3084,6 +3088,7 @@ dhc6_check_reply(struct client_state *cl
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S_STOPPED:
|
case S_STOPPED:
|
||||||
@ -34,7 +34,7 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
/* Nothing critical to do at this stage. */
|
/* Nothing critical to do at this stage. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -3741,17 +3746,23 @@ reply_handler(struct packet *packet, str
|
@@ -4214,17 +4219,23 @@ reply_handler(struct packet *packet, str
|
||||||
cancel_timeout(do_select6, client);
|
cancel_timeout(do_select6, client);
|
||||||
cancel_timeout(do_refresh6, client);
|
cancel_timeout(do_refresh6, client);
|
||||||
cancel_timeout(do_release6, client);
|
cancel_timeout(do_release6, client);
|
||||||
@ -66,7 +66,7 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4279,7 +4290,11 @@ start_bound(struct client_state *client)
|
@@ -4798,7 +4809,11 @@ start_bound(struct client_state *client)
|
||||||
dhc6_marshall_values("new_", client, lease, ia, addr);
|
dhc6_marshall_values("new_", client, lease, ia, addr);
|
||||||
script_write_requested6(client);
|
script_write_requested6(client);
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: maybe we should loop on the old values instead? */
|
/* XXX: maybe we should loop on the old values instead? */
|
||||||
@@ -4327,6 +4342,149 @@ start_bound(struct client_state *client)
|
@@ -4851,6 +4866,149 @@ start_bound(struct client_state *client)
|
||||||
dhc6_check_times(client);
|
dhc6_check_times(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,8 +121,8 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
+{
|
+{
|
||||||
+ struct client_state *client;
|
+ struct client_state *client;
|
||||||
+ struct data_string ds;
|
+ struct data_string ds;
|
||||||
+ int send_ret;
|
|
||||||
+ struct timeval elapsed, tv;
|
+ struct timeval elapsed, tv;
|
||||||
|
+ int send_ret, added;
|
||||||
+
|
+
|
||||||
+ client = input;
|
+ client = input;
|
||||||
+
|
+
|
||||||
@ -183,13 +183,13 @@ diff -up dhcp-4.3.0a1/client/dhc6.c.sendDecline dhcp-4.3.0a1/client/dhc6.c
|
|||||||
+ /* Append IA's (but don't release temporary addresses). */
|
+ /* Append IA's (but don't release temporary addresses). */
|
||||||
+ if (wanted_ia_na &&
|
+ if (wanted_ia_na &&
|
||||||
+ dhc6_add_ia_na(client, &ds, client->active_lease,
|
+ dhc6_add_ia_na(client, &ds, client->active_lease,
|
||||||
+ DHCPV6_DECLINE) != ISC_R_SUCCESS) {
|
+ DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
|
||||||
+ data_string_forget(&ds, MDL);
|
+ data_string_forget(&ds, MDL);
|
||||||
+ goto decline_done;
|
+ goto decline_done;
|
||||||
+ }
|
+ }
|
||||||
+ if (wanted_ia_pd &&
|
+ if (wanted_ia_pd &&
|
||||||
+ dhc6_add_ia_pd(client, &ds, client->active_lease,
|
+ dhc6_add_ia_pd(client, &ds, client->active_lease,
|
||||||
+ DHCPV6_DECLINE) != ISC_R_SUCCESS) {
|
+ DHCPV6_DECLINE, 0, &added) != ISC_R_SUCCESS) {
|
||||||
+ data_string_forget(&ds, MDL);
|
+ data_string_forget(&ds, MDL);
|
||||||
+ goto decline_done;
|
+ goto decline_done;
|
||||||
+ }
|
+ }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.3b1/client/Makefile.am.sharedlib dhcp-4.3.3b1/client/Makefile.am
|
diff -up dhcp-4.3.4/client/Makefile.am.sharedlib dhcp-4.3.4/client/Makefile.am
|
||||||
--- dhcp-4.3.3b1/client/Makefile.am.sharedlib 2015-08-10 10:41:25.315770022 +0200
|
--- dhcp-4.3.4/client/Makefile.am.sharedlib 2016-04-29 11:48:30.389923087 +0200
|
||||||
+++ dhcp-4.3.3b1/client/Makefile.am 2015-08-10 10:41:25.317770015 +0200
|
+++ dhcp-4.3.4/client/Makefile.am 2016-04-29 11:48:30.393923084 +0200
|
||||||
@@ -10,7 +10,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
@@ -13,7 +13,7 @@ dhclient_SOURCES = clparse.c dhclient.c
|
||||||
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
|
||||||
scripts/netbsd scripts/nextstep scripts/openbsd \
|
scripts/netbsd scripts/nextstep scripts/openbsd \
|
||||||
scripts/solaris scripts/openwrt
|
scripts/solaris scripts/openwrt
|
||||||
@ -10,9 +10,9 @@ diff -up dhcp-4.3.3b1/client/Makefile.am.sharedlib dhcp-4.3.3b1/client/Makefile.
|
|||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
diff -up dhcp-4.3.3b1/common/tests/Makefile.am.sharedlib dhcp-4.3.3b1/common/tests/Makefile.am
|
diff -up dhcp-4.3.4/common/tests/Makefile.am.sharedlib dhcp-4.3.4/common/tests/Makefile.am
|
||||||
--- dhcp-4.3.3b1/common/tests/Makefile.am.sharedlib 2015-08-10 10:41:25.315770022 +0200
|
--- dhcp-4.3.4/common/tests/Makefile.am.sharedlib 2016-04-29 11:48:30.394923084 +0200
|
||||||
+++ dhcp-4.3.3b1/common/tests/Makefile.am 2015-08-10 10:41:25.318770011 +0200
|
+++ dhcp-4.3.4/common/tests/Makefile.am 2016-04-29 11:54:16.890716651 +0200
|
||||||
@@ -13,25 +13,25 @@ ATF_TESTS += alloc_unittest dns_unittest
|
@@ -13,25 +13,25 @@ ATF_TESTS += alloc_unittest dns_unittest
|
||||||
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
alloc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
@ -23,18 +23,17 @@ diff -up dhcp-4.3.3b1/common/tests/Makefile.am.sharedlib dhcp-4.3.3b1/common/tes
|
|||||||
|
|
||||||
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
dns_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
-dns_unittest_LDADD += ../libdhcp.a \
|
dns_unittest_LDADD += ../libdhcp.a \
|
||||||
- ../../omapip/libomapi.a \
|
- ../../omapip/libomapi.a \
|
||||||
+dns_unittest_LDADD += ../libdhcp.la \
|
|
||||||
+ ../../omapip/libomapi.la \
|
+ ../../omapip/libomapi.la \
|
||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
misc_unittest_LDADD = $(ATF_LDFLAGS)
|
misc_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
misc_unittest_LDADD += ../libdhcp.a \
|
misc_unittest_LDADD += ../libdhcp.a \
|
||||||
- ../../omapip/libomapi.a ../../bind/lib/libirs.a \
|
- ../../omapip/libomapi.a \
|
||||||
+ ../../omapip/libomapi.la ../../bind/lib/libirs.a \
|
+ ../../omapip/libomapi.la \
|
||||||
../../bind/lib/libdns.a ../../bind/lib/libisccfg.a ../../bind/lib/libisc.a
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
|
ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
|
||||||
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
|
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
|
||||||
@ -44,23 +43,23 @@ diff -up dhcp-4.3.3b1/common/tests/Makefile.am.sharedlib dhcp-4.3.3b1/common/tes
|
|||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
check: $(ATF_TESTS)
|
check: $(ATF_TESTS)
|
||||||
diff -up dhcp-4.3.3b1/configure.ac.sharedlib dhcp-4.3.3b1/configure.ac
|
diff -up dhcp-4.3.4/configure.ac.sharedlib dhcp-4.3.4/configure.ac
|
||||||
--- dhcp-4.3.3b1/configure.ac.sharedlib 2015-08-10 10:41:25.315770022 +0200
|
--- dhcp-4.3.4/configure.ac.sharedlib 2016-04-29 11:48:30.394923084 +0200
|
||||||
+++ dhcp-4.3.3b1/configure.ac 2015-08-10 10:41:25.318770011 +0200
|
+++ dhcp-4.3.4/configure.ac 2016-04-29 11:55:22.729691668 +0200
|
||||||
@@ -43,7 +43,8 @@ AC_SUBST(BINDCONFIG)
|
@@ -47,7 +47,8 @@ AM_CONDITIONAL(CROSS_COMPILING, test "$c
|
||||||
# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
|
# Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
|
||||||
AC_USE_SYSTEM_EXTENSIONS
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
|
||||||
-AC_PROG_RANLIB
|
-AC_PROG_RANLIB
|
||||||
+# Use libtool to simplify building of shared libraries
|
+# Use libtool to simplify building of shared libraries
|
||||||
+AC_PROG_LIBTOOL
|
+AC_PROG_LIBTOOL
|
||||||
AC_CONFIG_HEADERS([includes/config.h])
|
|
||||||
|
|
||||||
# we sometimes need to know byte order for building packets
|
AC_PATH_PROG(AR, ar)
|
||||||
diff -up dhcp-4.3.3b1/dhcpctl/Makefile.am.sharedlib dhcp-4.3.3b1/dhcpctl/Makefile.am
|
AC_SUBST(AR)
|
||||||
--- dhcp-4.3.3b1/dhcpctl/Makefile.am.sharedlib 2015-08-10 10:41:25.315770022 +0200
|
diff -up dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib dhcp-4.3.4/dhcpctl/Makefile.am
|
||||||
+++ dhcp-4.3.3b1/dhcpctl/Makefile.am 2015-08-10 10:41:25.318770011 +0200
|
--- dhcp-4.3.4/dhcpctl/Makefile.am.sharedlib 2016-04-29 11:48:30.394923084 +0200
|
||||||
@@ -1,14 +1,14 @@
|
+++ dhcp-4.3.4/dhcpctl/Makefile.am 2016-04-29 11:56:18.390670546 +0200
|
||||||
|
@@ -1,15 +1,15 @@
|
||||||
bin_PROGRAMS = omshell
|
bin_PROGRAMS = omshell
|
||||||
-lib_LIBRARIES = libdhcpctl.a
|
-lib_LIBRARIES = libdhcpctl.a
|
||||||
+lib_LTLIBRARIES = libdhcpctl.la
|
+lib_LTLIBRARIES = libdhcpctl.la
|
||||||
@ -72,6 +71,7 @@ diff -up dhcp-4.3.3b1/dhcpctl/Makefile.am.sharedlib dhcp-4.3.3b1/dhcpctl/Makefil
|
|||||||
-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
-omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
+omshell_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
|
|
||||||
-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
-libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
|
||||||
+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
|
+libdhcpctl_la_SOURCES = dhcpctl.c callback.c remote.c
|
||||||
|
|
||||||
@ -79,9 +79,9 @@ diff -up dhcp-4.3.3b1/dhcpctl/Makefile.am.sharedlib dhcp-4.3.3b1/dhcpctl/Makefil
|
|||||||
-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
-cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
|
||||||
+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
+cltest_LDADD = libdhcpctl.la ../common/libdhcp.a ../omapip/libomapi.la \
|
||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
diff -up dhcp-4.3.3b1/omapip/Makefile.am.sharedlib dhcp-4.3.3b1/omapip/Makefile.am
|
diff -up dhcp-4.3.4/omapip/Makefile.am.sharedlib dhcp-4.3.4/omapip/Makefile.am
|
||||||
--- dhcp-4.3.3b1/omapip/Makefile.am.sharedlib 2015-08-10 10:41:25.315770022 +0200
|
--- dhcp-4.3.4/omapip/Makefile.am.sharedlib 2016-04-29 11:48:30.392923085 +0200
|
||||||
+++ dhcp-4.3.3b1/omapip/Makefile.am 2015-08-10 10:41:25.318770011 +0200
|
+++ dhcp-4.3.4/omapip/Makefile.am 2016-04-29 11:57:33.709641969 +0200
|
||||||
@@ -1,7 +1,7 @@
|
@@ -1,7 +1,7 @@
|
||||||
-lib_LIBRARIES = libomapi.a
|
-lib_LIBRARIES = libomapi.a
|
||||||
+lib_LTLIBRARIES = libomapi.la
|
+lib_LTLIBRARIES = libomapi.la
|
||||||
@ -92,16 +92,17 @@ diff -up dhcp-4.3.3b1/omapip/Makefile.am.sharedlib dhcp-4.3.3b1/omapip/Makefile.
|
|||||||
errwarn.c listener.c dispatch.c generic.c support.c \
|
errwarn.c listener.c dispatch.c generic.c support.c \
|
||||||
handle.c message.c convert.c hash.c auth.c inet_addr.c \
|
handle.c message.c convert.c hash.c auth.c inet_addr.c \
|
||||||
array.c trace.c toisc.c iscprint.c isclib.c
|
array.c trace.c toisc.c iscprint.c isclib.c
|
||||||
@@ -10,5 +10,5 @@ man_MANS = omapi.3
|
@@ -10,6 +10,6 @@ man_MANS = omapi.3
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
svtest_SOURCES = test.c
|
svtest_SOURCES = test.c
|
||||||
-svtest_LDADD = libomapi.a \
|
-svtest_LDADD = libomapi.a \
|
||||||
+svtest_LDADD = libomapi.la \
|
+svtest_LDADD = libomapi.la \
|
||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
diff -up dhcp-4.3.3b1/relay/Makefile.am.sharedlib dhcp-4.3.3b1/relay/Makefile.am
|
|
||||||
--- dhcp-4.3.3b1/relay/Makefile.am.sharedlib 2015-08-10 10:41:25.316770018 +0200
|
diff -up dhcp-4.3.4/relay/Makefile.am.sharedlib dhcp-4.3.4/relay/Makefile.am
|
||||||
+++ dhcp-4.3.3b1/relay/Makefile.am 2015-08-10 10:41:25.318770011 +0200
|
--- dhcp-4.3.4/relay/Makefile.am.sharedlib 2016-04-29 11:48:30.392923085 +0200
|
||||||
|
+++ dhcp-4.3.4/relay/Makefile.am 2016-04-29 11:48:30.395923083 +0200
|
||||||
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
@@ -2,7 +2,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
|
||||||
|
|
||||||
sbin_PROGRAMS = dhcrelay
|
sbin_PROGRAMS = dhcrelay
|
||||||
@ -111,9 +112,9 @@ diff -up dhcp-4.3.3b1/relay/Makefile.am.sharedlib dhcp-4.3.3b1/relay/Makefile.am
|
|||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export
|
||||||
man_MANS = dhcrelay.8
|
man_MANS = dhcrelay.8
|
||||||
EXTRA_DIST = $(man_MANS)
|
EXTRA_DIST = $(man_MANS)
|
||||||
diff -up dhcp-4.3.3b1/server/Makefile.am.sharedlib dhcp-4.3.3b1/server/Makefile.am
|
diff -up dhcp-4.3.4/server/Makefile.am.sharedlib dhcp-4.3.4/server/Makefile.am
|
||||||
--- dhcp-4.3.3b1/server/Makefile.am.sharedlib 2015-08-10 10:41:25.318770011 +0200
|
--- dhcp-4.3.4/server/Makefile.am.sharedlib 2016-04-29 11:48:30.392923085 +0200
|
||||||
+++ dhcp-4.3.3b1/server/Makefile.am 2015-08-10 10:42:27.642555119 +0200
|
+++ dhcp-4.3.4/server/Makefile.am 2016-04-29 11:48:30.395923083 +0200
|
||||||
@@ -13,7 +13,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
@@ -13,7 +13,7 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
|
||||||
dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
|
dhcpv6.c mdb6.c ldap.c ldap_casa.c leasechain.c ldap_krb_helper.c
|
||||||
|
|
||||||
@ -123,9 +124,9 @@ diff -up dhcp-4.3.3b1/server/Makefile.am.sharedlib dhcp-4.3.3b1/server/Makefile.
|
|||||||
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \
|
$(BIND9_LIBDIR) -lirs-export -ldns-export -lisccfg-export -lisc-export \
|
||||||
$(LDAP_LIBS)
|
$(LDAP_LIBS)
|
||||||
|
|
||||||
diff -up dhcp-4.3.3b1/server/tests/Makefile.am.sharedlib dhcp-4.3.3b1/server/tests/Makefile.am
|
diff -up dhcp-4.3.4/server/tests/Makefile.am.sharedlib dhcp-4.3.4/server/tests/Makefile.am
|
||||||
--- dhcp-4.3.3b1/server/tests/Makefile.am.sharedlib 2015-08-10 10:41:25.318770011 +0200
|
--- dhcp-4.3.4/server/tests/Makefile.am.sharedlib 2016-04-29 11:48:30.395923083 +0200
|
||||||
+++ dhcp-4.3.3b1/server/tests/Makefile.am 2015-08-10 10:42:59.290445998 +0200
|
+++ dhcp-4.3.4/server/tests/Makefile.am 2016-04-29 11:59:13.414604130 +0200
|
||||||
@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
@@ -17,8 +17,8 @@ DHCPSRC = ../dhcp.c ../bootp.c ../confpa
|
||||||
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
|
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
|
||||||
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
|
../ldap.c ../ldap_casa.c ../dhcpd.c ../leasechain.c
|
||||||
|
@ -1,48 +1,13 @@
|
|||||||
From 61fa3dd9e789997f66e848c7e3fb2f554ee374e2 Mon Sep 17 00:00:00 2001
|
diff -up dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT dhcp-4.3.4/client/dhclient.c
|
||||||
From: Jiri Popelka <jpopelka@redhat.com>
|
--- dhcp-4.3.4/client/dhclient.c.stateless-DUID-LLT 2016-04-29 13:13:50.467360008 +0200
|
||||||
Date: Thu, 18 Dec 2014 11:53:26 +0100
|
+++ dhcp-4.3.4/client/dhclient.c 2016-04-29 13:14:53.389375428 +0200
|
||||||
Subject: [PATCH] Write DUID_LLT even in stateless mode.
|
@@ -1317,6 +1317,9 @@ void run_stateless(int exit_mode, u_int1
|
||||||
|
|
||||||
By default, DHCPv6 dhclient creates DUID-LL
|
|
||||||
if it is running in stateless mode (-6 -S) and
|
|
||||||
doesn't write it into leases file, most likely
|
|
||||||
because the DUID-LL is always generated the same.
|
|
||||||
|
|
||||||
It's however possible to specify DUID to be of type LLT instead of LL
|
|
||||||
with '-D LLT'. Rfc 3315 says that:
|
|
||||||
'Clients and servers using this type of DUID MUST
|
|
||||||
store the DUID-LLT in stable storage.'
|
|
||||||
That's not fulfiled in this case (-6 -S -D LLT),
|
|
||||||
because it's generated each time again.
|
|
||||||
|
|
||||||
It's not a big deal because the server doesn't store any
|
|
||||||
info about 'stateless' clients, so it doesn't matter
|
|
||||||
that the DUID-LLT is different each time.
|
|
||||||
But there's a TAHI test which tests this, i.e. that
|
|
||||||
DUID-LLT is still the same even in stateless mode.
|
|
||||||
It's a test DHCP_CONF.7.1.9, part B.
|
|
||||||
https://www.ipv6ready.org/docs/Phase2_DHCPv6_Conformance_Latest.pdf
|
|
||||||
|
|
||||||
Signed-off-by: Jiri Popelka <jpopelka@redhat.com>
|
|
||||||
---
|
|
||||||
client/dhclient.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
|
||||||
index 5ef59cd..026e3fe 100644
|
|
||||||
--- a/client/dhclient.c
|
|
||||||
+++ b/client/dhclient.c
|
|
||||||
@@ -788,7 +788,9 @@ void run_stateless(int exit_mode)
|
|
||||||
if (default_duid.buffer != NULL)
|
|
||||||
data_string_forget(&default_duid, MDL);
|
data_string_forget(&default_duid, MDL);
|
||||||
|
|
||||||
- form_duid(&default_duid, MDL);
|
form_duid(&default_duid, MDL);
|
||||||
+ if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS &&
|
+ if (form_duid(&default_duid, MDL) == ISC_R_SUCCESS &&
|
||||||
+ duid_type == DUID_LLT)
|
+ duid_type == DUID_LLT)
|
||||||
+ write_duid(&default_duid);
|
+ write_duid(&default_duid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start a configuration state machine. */
|
#ifdef DHCP4o6
|
||||||
--
|
|
||||||
2.1.0
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -up dhcp-4.3.0a1/server/bootp.c.unicast dhcp-4.3.0a1/server/bootp.c
|
diff -up dhcp-4.3.4/server/bootp.c.unicast dhcp-4.3.4/server/bootp.c
|
||||||
--- dhcp-4.3.0a1/server/bootp.c.unicast 2013-12-11 01:25:12.000000000 +0100
|
--- dhcp-4.3.4/server/bootp.c.unicast 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.0a1/server/bootp.c 2013-12-19 15:12:12.974671154 +0100
|
+++ dhcp-4.3.4/server/bootp.c 2016-05-02 15:09:40.023243008 +0200
|
||||||
@@ -59,6 +59,7 @@ void bootp (packet)
|
@@ -52,6 +52,7 @@ void bootp (packet)
|
||||||
char msgbuf [1024];
|
char msgbuf [1024];
|
||||||
int ignorep;
|
int ignorep;
|
||||||
int peer_has_leases = 0;
|
int peer_has_leases = 0;
|
||||||
@ -9,7 +9,7 @@ diff -up dhcp-4.3.0a1/server/bootp.c.unicast dhcp-4.3.0a1/server/bootp.c
|
|||||||
|
|
||||||
if (packet -> raw -> op != BOOTREQUEST)
|
if (packet -> raw -> op != BOOTREQUEST)
|
||||||
return;
|
return;
|
||||||
@@ -74,7 +75,7 @@ void bootp (packet)
|
@@ -67,7 +68,7 @@ void bootp (packet)
|
||||||
? inet_ntoa (packet -> raw -> giaddr)
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
: packet -> interface -> name);
|
: packet -> interface -> name);
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ diff -up dhcp-4.3.0a1/server/bootp.c.unicast dhcp-4.3.0a1/server/bootp.c
|
|||||||
log_info ("%s: network unknown", msgbuf);
|
log_info ("%s: network unknown", msgbuf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -396,6 +397,15 @@ void bootp (packet)
|
@@ -428,6 +429,15 @@ void bootp (packet)
|
||||||
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -34,18 +34,18 @@ diff -up dhcp-4.3.0a1/server/bootp.c.unicast dhcp-4.3.0a1/server/bootp.c
|
|||||||
|
|
||||||
/* If it comes from a client that already knows its address
|
/* If it comes from a client that already knows its address
|
||||||
and is not requesting a broadcast response, and we can
|
and is not requesting a broadcast response, and we can
|
||||||
diff -up dhcp-4.3.0a1/server/dhcp.c.unicast dhcp-4.3.0a1/server/dhcp.c
|
diff -up dhcp-4.3.4/server/dhcp.c.unicast dhcp-4.3.4/server/dhcp.c
|
||||||
--- dhcp-4.3.0a1/server/dhcp.c.unicast 2013-12-13 21:50:38.000000000 +0100
|
--- dhcp-4.3.4/server/dhcp.c.unicast 2016-03-22 14:16:51.000000000 +0100
|
||||||
+++ dhcp-4.3.0a1/server/dhcp.c 2013-12-19 15:12:12.975671140 +0100
|
+++ dhcp-4.3.4/server/dhcp.c 2016-05-02 15:10:13.255267511 +0200
|
||||||
@@ -4627,6 +4627,7 @@ int locate_network (packet)
|
@@ -5132,6 +5132,7 @@ int locate_network (packet)
|
||||||
struct data_string data;
|
struct data_string data;
|
||||||
struct subnet *subnet = (struct subnet *)0;
|
struct subnet *subnet = (struct subnet *)0;
|
||||||
struct option_cache *oc;
|
struct option_cache *oc;
|
||||||
+ int norelay = 0;
|
+ int norelay = 0;
|
||||||
|
|
||||||
/* See if there's a Relay Agent Link Selection Option, or a
|
#if defined(DHCPv6) && defined(DHCP4o6)
|
||||||
* Subnet Selection Option. The Link-Select and Subnet-Select
|
if (dhcpv4_over_dhcpv6 && (packet->dhcp4o6_response != NULL)) {
|
||||||
@@ -4642,12 +4643,24 @@ int locate_network (packet)
|
@@ -5153,12 +5154,24 @@ int locate_network (packet)
|
||||||
from the interface, if there is one. If not, fail. */
|
from the interface, if there is one. If not, fail. */
|
||||||
if (!oc && !packet -> raw -> giaddr.s_addr) {
|
if (!oc && !packet -> raw -> giaddr.s_addr) {
|
||||||
if (packet -> interface -> shared_network) {
|
if (packet -> interface -> shared_network) {
|
||||||
@ -75,7 +75,7 @@ diff -up dhcp-4.3.0a1/server/dhcp.c.unicast dhcp-4.3.0a1/server/dhcp.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If there's an option indicating link connection, and it's valid,
|
/* If there's an option indicating link connection, and it's valid,
|
||||||
@@ -4670,7 +4683,10 @@ int locate_network (packet)
|
@@ -5185,7 +5198,10 @@ int locate_network (packet)
|
||||||
data_string_forget (&data, MDL);
|
data_string_forget (&data, MDL);
|
||||||
} else {
|
} else {
|
||||||
ia.len = 4;
|
ia.len = 4;
|
||||||
@ -87,7 +87,7 @@ diff -up dhcp-4.3.0a1/server/dhcp.c.unicast dhcp-4.3.0a1/server/dhcp.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If we know the subnet on which the IP address lives, use it. */
|
/* If we know the subnet on which the IP address lives, use it. */
|
||||||
@@ -4678,7 +4694,10 @@ int locate_network (packet)
|
@@ -5193,7 +5209,10 @@ int locate_network (packet)
|
||||||
shared_network_reference (&packet -> shared_network,
|
shared_network_reference (&packet -> shared_network,
|
||||||
subnet -> shared_network, MDL);
|
subnet -> shared_network, MDL);
|
||||||
subnet_dereference (&subnet, MDL);
|
subnet_dereference (&subnet, MDL);
|
||||||
|
31
dhcp.spec
31
dhcp.spec
@ -1,5 +1,5 @@
|
|||||||
# SystemTap support is enabled by default
|
# SystemTap support is disabled by default
|
||||||
%{!?sdt:%global sdt 1}
|
%{!?sdt:%global sdt 0}
|
||||||
|
|
||||||
#http://lists.fedoraproject.org/pipermail/devel/2011-August/155358.html
|
#http://lists.fedoraproject.org/pipermail/devel/2011-August/155358.html
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
@ -12,13 +12,13 @@
|
|||||||
%global patchver P1
|
%global patchver P1
|
||||||
|
|
||||||
#%%global VERSION %%{version}%%{prever}
|
#%%global VERSION %%{version}%%{prever}
|
||||||
#%%global VERSION %{version}
|
#%%global VERSION %%{version}-%%{patchver}
|
||||||
%global VERSION %%{version}-%%{patchver}
|
%global VERSION %{version}
|
||||||
|
|
||||||
Summary: Dynamic host configuration protocol software
|
Summary: Dynamic host configuration protocol software
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 4.3.3
|
Version: 4.3.4
|
||||||
Release: 13.%{patchver}%{?dist}
|
Release: 1%{?dist}
|
||||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||||
# that's why it is at 12 now. It should have never been used, but it was.
|
# that's why it is at 12 now. It should have never been used, but it was.
|
||||||
@ -65,14 +65,14 @@ Patch25: dhcp-improved-xid.patch
|
|||||||
#Patch26: dhcp-gpxe-cid.patch
|
#Patch26: dhcp-gpxe-cid.patch
|
||||||
Patch26: dhcp-duidv4.patch
|
Patch26: dhcp-duidv4.patch
|
||||||
Patch27: dhcp-duid_uuid.patch
|
Patch27: dhcp-duid_uuid.patch
|
||||||
Patch28: dhcp-systemtap.patch
|
#Patch28: dhcp-systemtap.patch
|
||||||
Patch29: dhcp-getifaddrs.patch
|
Patch29: dhcp-getifaddrs.patch
|
||||||
Patch30: dhcp-omapi-leak.patch
|
|
||||||
Patch31: dhcp-client-request-release-bind-iface.patch
|
Patch31: dhcp-client-request-release-bind-iface.patch
|
||||||
Patch32: dhcp-interval.patch
|
Patch32: dhcp-interval.patch
|
||||||
Patch33: dhcp-no-subnet-error2info.patch
|
Patch33: dhcp-no-subnet-error2info.patch
|
||||||
Patch34: dhcp-sd_notify.patch
|
Patch34: dhcp-sd_notify.patch
|
||||||
Patch35: dhcp-VLAN-ID.patch
|
|
||||||
Patch36: dhcp-option97-pxe-client-id.patch
|
Patch36: dhcp-option97-pxe-client-id.patch
|
||||||
Patch37: dhcp-stateless-DUID-LLT.patch
|
Patch37: dhcp-stateless-DUID-LLT.patch
|
||||||
Patch38: dhcp-dhclient-preinit6s.patch
|
Patch38: dhcp-dhclient-preinit6s.patch
|
||||||
@ -306,15 +306,12 @@ rm bind/bind.tar.gz
|
|||||||
%patch27 -p1 -b .duid_uuid
|
%patch27 -p1 -b .duid_uuid
|
||||||
|
|
||||||
# http://sourceware.org/systemtap/wiki/SystemTap
|
# http://sourceware.org/systemtap/wiki/SystemTap
|
||||||
%patch28 -p1 -b .systemtap
|
#%%patch28 -p1 -b .systemtap
|
||||||
|
|
||||||
# Use getifaddrs() to scan for interfaces on Linux (#449946)
|
# Use getifaddrs() to scan for interfaces on Linux (#449946)
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28761])
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #28761])
|
||||||
%patch29 -p1 -b .getifaddrs
|
%patch29 -p1 -b .getifaddrs
|
||||||
|
|
||||||
# Fix several memory leaks in omapi (#978420)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #33990])
|
|
||||||
%patch30 -p1 -b .leak
|
|
||||||
|
|
||||||
# send unicast request/release via correct interface (#800561, #1177351)
|
# send unicast request/release via correct interface (#800561, #1177351)
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30544])
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #30544])
|
||||||
@ -330,10 +327,6 @@ rm bind/bind.tar.gz
|
|||||||
# support for sending startup notification to systemd (#1077666)
|
# support for sending startup notification to systemd (#1077666)
|
||||||
%patch34 -p1 -b .sd_notify
|
%patch34 -p1 -b .sd_notify
|
||||||
|
|
||||||
# VLAN ID is only bottom 12-bits of TCI (#1259552)
|
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #40591])
|
|
||||||
%patch35 -p1 -b .vlanid
|
|
||||||
|
|
||||||
# option 97 - pxe-client-id (#1058674)
|
# option 97 - pxe-client-id (#1058674)
|
||||||
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38110])
|
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #38110])
|
||||||
%patch36 -p1 -b .option97
|
%patch36 -p1 -b .option97
|
||||||
@ -668,6 +661,10 @@ done
|
|||||||
%doc doc/html/
|
%doc doc/html/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 29 2016 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.4-1
|
||||||
|
- 4.3.4
|
||||||
|
- disable systemtap (I don't think anybody ever used it)
|
||||||
|
|
||||||
* Wed Mar 23 2016 Zdenek Dohnal zdohnal@redhat.com - 12:4.3.3-13.P1
|
* Wed Mar 23 2016 Zdenek Dohnal zdohnal@redhat.com - 12:4.3.3-13.P1
|
||||||
- Mentioning the bash script is needed in README.dhclient.d
|
- Mentioning the bash script is needed in README.dhclient.d
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user