- BOOTP_BROADCAST_ALWAYS is not the same as ATSFP, fixed
- Added anycast mac support to dhclient for OLPC
This commit is contained in:
parent
8d243af001
commit
47f03274a8
76
dhcp-3.0.5-dhclient-anycast.patch
Normal file
76
dhcp-3.0.5-dhclient-anycast.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
--- dhcp-3.0.5/client/clparse.c.anycast 2007-06-15 18:59:48.000000000 -0400
|
||||||
|
+++ dhcp-3.0.5/client/clparse.c 2007-06-15 18:59:57.000000000 -0400
|
||||||
|
@@ -402,6 +402,17 @@ void parse_client_statement (cfile, ip,
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
+ case ANYCAST_MAC:
|
||||||
|
+ token = next_token (&val, (unsigned *)0, cfile);
|
||||||
|
+ if (ip) {
|
||||||
|
+ parse_hardware_param (cfile, &ip -> anycast_mac_addr);
|
||||||
|
+ } else {
|
||||||
|
+ parse_warn (cfile, "anycast mac address parameter %s",
|
||||||
|
+ "not allowed here.");
|
||||||
|
+ skip_to_semi (cfile);
|
||||||
|
+ }
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
case REQUEST:
|
||||||
|
token = next_token (&val, (unsigned *)0, cfile);
|
||||||
|
if (config -> requested_options == default_requested_options)
|
||||||
|
--- dhcp-3.0.5/common/conflex.c.anycast 2007-06-15 18:59:48.000000000 -0400
|
||||||
|
+++ dhcp-3.0.5/common/conflex.c 2007-06-15 18:59:58.000000000 -0400
|
||||||
|
@@ -549,6 +549,8 @@ static enum dhcp_token intern (atom, dfv
|
||||||
|
}
|
||||||
|
if (!strcasecmp (atom + 1, "nd"))
|
||||||
|
return AND;
|
||||||
|
+ if (!strcasecmp (atom + 1, "nycast-mac"))
|
||||||
|
+ return ANYCAST_MAC;
|
||||||
|
if (!strcasecmp (atom + 1, "ppend"))
|
||||||
|
return APPEND;
|
||||||
|
if (!strcasecmp (atom + 1, "llow"))
|
||||||
|
--- dhcp-3.0.5/common/lpf.c.anycast 2007-06-15 18:59:48.000000000 -0400
|
||||||
|
+++ dhcp-3.0.5/common/lpf.c 2007-06-15 18:59:58.000000000 -0400
|
||||||
|
@@ -332,6 +332,9 @@ ssize_t send_packet (interface, packet,
|
||||||
|
return send_fallback (interface, packet, raw,
|
||||||
|
len, from, to, hto);
|
||||||
|
|
||||||
|
+ if (hto == NULL && interface->anycast_mac_addr.len)
|
||||||
|
+ hto = &interface->anycast_mac_addr;
|
||||||
|
+
|
||||||
|
/* Assemble the headers... */
|
||||||
|
assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
|
||||||
|
fudge = hbufp % 4; /* IP header must be word-aligned. */
|
||||||
|
--- dhcp-3.0.5/includes/dhctoken.h.anycast 2007-06-15 18:59:48.000000000 -0400
|
||||||
|
+++ dhcp-3.0.5/includes/dhctoken.h 2007-06-15 19:00:32.000000000 -0400
|
||||||
|
@@ -310,7 +310,8 @@ enum dhcp_token {
|
||||||
|
DO_FORWARD_UPDATE = 614,
|
||||||
|
KNOWN_CLIENTS = 615,
|
||||||
|
ATSFP = 616,
|
||||||
|
- BOOTP_BROADCAST_ALWAYS = 617
|
||||||
|
+ BOOTP_BROADCAST_ALWAYS = 617,
|
||||||
|
+ ANYCAST_MAC = 618
|
||||||
|
};
|
||||||
|
|
||||||
|
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||||
|
--- dhcp-3.0.5/includes/site.h.anycast 2007-06-15 18:59:47.000000000 -0400
|
||||||
|
+++ dhcp-3.0.5/includes/site.h 2007-06-15 18:59:58.000000000 -0400
|
||||||
|
@@ -178,6 +178,8 @@
|
||||||
|
|
||||||
|
#define TRACING
|
||||||
|
|
||||||
|
+#define USE_LPF
|
||||||
|
+
|
||||||
|
/* Define this if you want to read your config from LDAP. Read README.ldap
|
||||||
|
about how to set this up */
|
||||||
|
|
||||||
|
--- dhcp-3.0.5/includes/dhcpd.h.anycast 2007-06-15 18:59:48.000000000 -0400
|
||||||
|
+++ dhcp-3.0.5/includes/dhcpd.h 2007-06-15 18:59:58.000000000 -0400
|
||||||
|
@@ -845,6 +845,7 @@ struct interface_info {
|
||||||
|
int dlpi_sap_length;
|
||||||
|
struct hardware dlpi_broadcast_addr;
|
||||||
|
# endif /* DLPI_SEND || DLPI_RECEIVE */
|
||||||
|
+ struct hardware anycast_mac_addr;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hardware_link {
|
@ -1,6 +1,6 @@
|
|||||||
--- dhcp-3.0.5/client/dhclient.c.options 2007-03-29 16:33:14.000000000 -0400
|
--- dhcp-3.0.5/client/dhclient.c.options 2007-06-15 18:56:41.000000000 -0400
|
||||||
+++ dhcp-3.0.5/client/dhclient.c 2007-03-30 15:15:59.000000000 -0400
|
+++ dhcp-3.0.5/client/dhclient.c 2007-06-15 18:56:41.000000000 -0400
|
||||||
@@ -38,6 +38,12 @@
|
@@ -38,6 +38,12 @@ static char ocopyright[] =
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
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... */
|
||||||
|
|
||||||
@@ -77,6 +83,9 @@
|
@@ -77,6 +83,9 @@ int nowait=0;
|
||||||
#ifdef EXTENDED_NEW_OPTION_INFO
|
#ifdef EXTENDED_NEW_OPTION_INFO
|
||||||
int extended_option_environment = 0;
|
int extended_option_environment = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
static void usage PROTO ((void));
|
static void usage PROTO ((void));
|
||||||
|
|
||||||
@@ -103,6 +112,15 @@
|
@@ -103,6 +112,15 @@ int main (argc, argv, envp)
|
||||||
int no_dhclient_pid = 0;
|
int no_dhclient_pid = 0;
|
||||||
int no_dhclient_script = 0;
|
int no_dhclient_script = 0;
|
||||||
char *s;
|
char *s;
|
||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
/* Make sure we have stdin, stdout and stderr. */
|
/* Make sure we have stdin, stdout and stderr. */
|
||||||
i = open ("/dev/null", O_RDWR);
|
i = open ("/dev/null", O_RDWR);
|
||||||
@@ -211,6 +229,88 @@
|
@@ -211,6 +229,88 @@ int main (argc, argv, envp)
|
||||||
extended_option_environment = 1;
|
extended_option_environment = 1;
|
||||||
new_option_info_tree = GENERATE_NEW_OPTION_INFO;
|
new_option_info_tree = GENERATE_NEW_OPTION_INFO;
|
||||||
#endif
|
#endif
|
||||||
@ -128,7 +128,7 @@
|
|||||||
} else if (argv [i][0] == '-') {
|
} else if (argv [i][0] == '-') {
|
||||||
usage ();
|
usage ();
|
||||||
} else {
|
} else {
|
||||||
@@ -347,6 +447,170 @@
|
@@ -347,6 +447,170 @@ int main (argc, argv, envp)
|
||||||
/* Parse the dhclient.conf file. */
|
/* Parse the dhclient.conf file. */
|
||||||
read_client_conf ();
|
read_client_conf ();
|
||||||
|
|
||||||
@ -299,7 +299,7 @@
|
|||||||
/* Parse the lease database. */
|
/* Parse the lease database. */
|
||||||
read_client_leases ();
|
read_client_leases ();
|
||||||
|
|
||||||
@@ -1924,7 +2188,8 @@
|
@@ -1924,7 +2188,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. */
|
||||||
|
|
||||||
@ -309,7 +309,7 @@
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
@@ -2008,7 +2273,9 @@
|
@@ -2008,7 +2273,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);
|
||||||
@ -320,7 +320,7 @@
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
@@ -2067,7 +2334,8 @@
|
@@ -2067,7 +2334,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. */
|
||||||
@ -330,9 +330,9 @@
|
|||||||
client -> packet.flags = 0;
|
client -> packet.flags = 0;
|
||||||
else
|
else
|
||||||
client -> packet.flags = htons (BOOTP_BROADCAST);
|
client -> packet.flags = htons (BOOTP_BROADCAST);
|
||||||
--- dhcp-3.0.5/client/clparse.c.options 2007-03-29 16:33:14.000000000 -0400
|
--- dhcp-3.0.5/client/clparse.c.options 2007-06-15 18:56:41.000000000 -0400
|
||||||
+++ dhcp-3.0.5/client/clparse.c 2007-03-29 16:33:29.000000000 -0400
|
+++ dhcp-3.0.5/client/clparse.c 2007-06-15 18:56:41.000000000 -0400
|
||||||
@@ -81,6 +81,7 @@
|
@@ -81,6 +81,7 @@ isc_result_t read_client_conf ()
|
||||||
top_level_config.requested_options = default_requested_options;
|
top_level_config.requested_options = default_requested_options;
|
||||||
top_level_config.omapi_port = -1;
|
top_level_config.omapi_port = -1;
|
||||||
top_level_config.do_forward_update = 1;
|
top_level_config.do_forward_update = 1;
|
||||||
@ -340,7 +340,7 @@
|
|||||||
|
|
||||||
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)
|
||||||
@@ -227,7 +228,8 @@
|
@@ -227,7 +228,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 |
|
||||||
@ -350,7 +350,7 @@
|
|||||||
|
|
||||||
void parse_client_statement (cfile, ip, config)
|
void parse_client_statement (cfile, ip, config)
|
||||||
struct parse *cfile;
|
struct parse *cfile;
|
||||||
@@ -549,6 +551,12 @@
|
@@ -549,6 +551,12 @@ void parse_client_statement (cfile, ip,
|
||||||
parse_reject_statement (cfile, config);
|
parse_reject_statement (cfile, config);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -363,9 +363,9 @@
|
|||||||
default:
|
default:
|
||||||
lose = 0;
|
lose = 0;
|
||||||
stmt = (struct executable_statement *)0;
|
stmt = (struct executable_statement *)0;
|
||||||
--- dhcp-3.0.5/common/conflex.c.options 2007-03-29 16:33:14.000000000 -0400
|
--- dhcp-3.0.5/common/conflex.c.options 2007-06-15 18:56:41.000000000 -0400
|
||||||
+++ dhcp-3.0.5/common/conflex.c 2007-03-29 16:33:29.000000000 -0400
|
+++ dhcp-3.0.5/common/conflex.c 2007-06-15 18:56:41.000000000 -0400
|
||||||
@@ -599,6 +599,8 @@
|
@@ -599,6 +599,8 @@ static enum dhcp_token intern (atom, dfv
|
||||||
return BALANCE;
|
return BALANCE;
|
||||||
if (!strcasecmp (atom + 1, "ound"))
|
if (!strcasecmp (atom + 1, "ound"))
|
||||||
return BOUND;
|
return BOUND;
|
||||||
@ -374,9 +374,9 @@
|
|||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
if (!strcasecmp (atom + 1, "ase"))
|
if (!strcasecmp (atom + 1, "ase"))
|
||||||
--- dhcp-3.0.5/includes/dhcpd.h.options 2007-03-29 16:33:14.000000000 -0400
|
--- dhcp-3.0.5/includes/dhcpd.h.options 2007-06-15 18:56:41.000000000 -0400
|
||||||
+++ dhcp-3.0.5/includes/dhcpd.h 2007-03-30 15:14:56.000000000 -0400
|
+++ dhcp-3.0.5/includes/dhcpd.h 2007-06-15 18:56:41.000000000 -0400
|
||||||
@@ -767,6 +767,9 @@
|
@@ -767,6 +767,9 @@ struct client_config {
|
||||||
int do_forward_update; /* If nonzero, and if we have the
|
int do_forward_update; /* If nonzero, and if we have the
|
||||||
information we need, update the
|
information we need, update the
|
||||||
A record for the address we get. */
|
A record for the address we get. */
|
||||||
@ -387,14 +387,14 @@
|
|||||||
|
|
||||||
/* Per-interface state used in the dhcp client... */
|
/* Per-interface state used in the dhcp client... */
|
||||||
--- dhcp-3.0.5/includes/dhctoken.h.options 2005-09-22 12:19:57.000000000 -0400
|
--- dhcp-3.0.5/includes/dhctoken.h.options 2005-09-22 12:19:57.000000000 -0400
|
||||||
+++ dhcp-3.0.5/includes/dhctoken.h 2007-03-29 16:33:29.000000000 -0400
|
+++ dhcp-3.0.5/includes/dhctoken.h 2007-06-15 18:56:56.000000000 -0400
|
||||||
@@ -309,7 +309,8 @@
|
@@ -309,7 +309,8 @@ enum dhcp_token {
|
||||||
DOMAIN_NAME = 613,
|
DOMAIN_NAME = 613,
|
||||||
DO_FORWARD_UPDATE = 614,
|
DO_FORWARD_UPDATE = 614,
|
||||||
KNOWN_CLIENTS = 615,
|
KNOWN_CLIENTS = 615,
|
||||||
- ATSFP = 616
|
- ATSFP = 616
|
||||||
+ ATSFP = 616,
|
+ ATSFP = 616,
|
||||||
+ BOOTP_BROADCAST_ALWAYS = 616
|
+ BOOTP_BROADCAST_ALWAYS = 617
|
||||||
};
|
};
|
||||||
|
|
||||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||||
|
10
dhcp.spec
10
dhcp.spec
@ -10,7 +10,7 @@
|
|||||||
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 3.0.5
|
Version: 3.0.5
|
||||||
Release: 35%{?dist}
|
Release: 36%{?dist}
|
||||||
Epoch: 12
|
Epoch: 12
|
||||||
License: ISC
|
License: ISC
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -52,6 +52,7 @@ Patch18: %{name}-3.0.5-prototypes.patch
|
|||||||
Patch19: %{name}-3.0.5-manpages.patch
|
Patch19: %{name}-3.0.5-manpages.patch
|
||||||
Patch20: %{name}-3.0.5-libdhcp4client.patch
|
Patch20: %{name}-3.0.5-libdhcp4client.patch
|
||||||
Patch21: %{name}-3.0.5-xen-checksum.patch
|
Patch21: %{name}-3.0.5-xen-checksum.patch
|
||||||
|
Patch22: %{name}-3.0.5-dhclient-anycast.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: groff openldap-devel
|
BuildRequires: groff openldap-devel
|
||||||
@ -234,6 +235,9 @@ libdhcp4client.
|
|||||||
# Handle Xen partial UDP checksums
|
# Handle Xen partial UDP checksums
|
||||||
%patch21 -p1 -b .xen
|
%patch21 -p1 -b .xen
|
||||||
|
|
||||||
|
# Add anycast support to dhclient (for OLPC)
|
||||||
|
%patch22 -p1 -b .anycast
|
||||||
|
|
||||||
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
# Copy in documentation and example scripts for LDAP patch to dhcpd
|
||||||
%{__install} -p -m 0644 %SOURCE6 .
|
%{__install} -p -m 0644 %SOURCE6 .
|
||||||
%{__install} -p -m 0644 %SOURCE7 doc
|
%{__install} -p -m 0644 %SOURCE7 doc
|
||||||
@ -430,6 +434,10 @@ fi
|
|||||||
%{_libdir}/libdhcp4client.a
|
%{_libdir}/libdhcp4client.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 15 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-36
|
||||||
|
- BOOTP_BROADCAST_ALWAYS is not the same as ATSFP, fixed
|
||||||
|
- Added anycast mac support to dhclient for OLPC
|
||||||
|
|
||||||
* Tue May 22 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-35
|
* Tue May 22 2007 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-35
|
||||||
- Disable -fvisibility=hidden for now as it breaks dhcpv4_client() from
|
- Disable -fvisibility=hidden for now as it breaks dhcpv4_client() from
|
||||||
the shared library (#240804)
|
the shared library (#240804)
|
||||||
|
Loading…
Reference in New Issue
Block a user