rpms/dhcp/F-7 dhcp-3.0.5-dhclient-anycast.patch, NONE, 1.1 dhcp-3.0.5-options.patch, 1.1, 1.2 dhcp.spec, 1.161, 1.162
David Cantrell (dcantrel)
fedora-extras-commits at redhat.com
Mon Jun 18 15:12:35 UTC 2007
Author: dcantrel
Update of /cvs/pkgs/rpms/dhcp/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7746
Modified Files:
dhcp-3.0.5-options.patch dhcp.spec
Added Files:
dhcp-3.0.5-dhclient-anycast.patch
Log Message:
* Mon Jun 18 2007 David Cantrell <dcantrell at 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
dhcp-3.0.5-dhclient-anycast.patch:
--- NEW FILE dhcp-3.0.5-dhclient-anycast.patch ---
--- dhcp-3.0.5/client/clparse.c.anycast 2007-06-18 10:47:55.000000000 -0400
+++ dhcp-3.0.5/client/clparse.c 2007-06-18 10:47:55.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-18 10:47:54.000000000 -0400
+++ dhcp-3.0.5/common/conflex.c 2007-06-18 10:47:55.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-18 10:47:55.000000000 -0400
+++ dhcp-3.0.5/common/lpf.c 2007-06-18 10:54:15.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.hlen)
+ 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-18 10:47:54.000000000 -0400
+++ dhcp-3.0.5/includes/dhctoken.h 2007-06-18 10:47:55.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-18 10:47:54.000000000 -0400
+++ dhcp-3.0.5/includes/site.h 2007-06-18 10:47:55.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-18 10:47:55.000000000 -0400
+++ dhcp-3.0.5/includes/dhcpd.h 2007-06-18 10:47:55.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 {
dhcp-3.0.5-options.patch:
Index: dhcp-3.0.5-options.patch
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-7/dhcp-3.0.5-options.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dhcp-3.0.5-options.patch 1 Apr 2007 20:52:27 -0000 1.1
+++ dhcp-3.0.5-options.patch 18 Jun 2007 15:12:29 -0000 1.2
@@ -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 2007-03-30 15:15:59.000000000 -0400
-@@ -38,6 +38,12 @@
+--- dhcp-3.0.5/client/dhclient.c.options 2007-06-18 10:41:00.000000000 -0400
++++ dhcp-3.0.5/client/dhclient.c 2007-06-18 10:41:00.000000000 -0400
+@@ -38,6 +38,12 @@ static char ocopyright[] =
#include "dhcpd.h"
#include "version.h"
@@ -13,7 +13,7 @@
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
-@@ -77,6 +83,9 @@
+@@ -77,6 +83,9 @@ int nowait=0;
#ifdef EXTENDED_NEW_OPTION_INFO
int extended_option_environment = 0;
#endif
@@ -23,7 +23,7 @@
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_script = 0;
char *s;
@@ -39,7 +39,7 @@
/* Make sure we have stdin, stdout and stderr. */
i = open ("/dev/null", O_RDWR);
-@@ -211,6 +229,88 @@
+@@ -211,6 +229,88 @@ int main (argc, argv, envp)
extended_option_environment = 1;
new_option_info_tree = GENERATE_NEW_OPTION_INFO;
#endif
@@ -128,7 +128,7 @@
} else if (argv [i][0] == '-') {
usage ();
} else {
-@@ -347,6 +447,170 @@
+@@ -347,6 +447,170 @@ int main (argc, argv, envp)
/* Parse the dhclient.conf file. */
read_client_conf ();
@@ -299,7 +299,7 @@
/* Parse the lease database. */
read_client_leases ();
-@@ -1924,7 +2188,8 @@
+@@ -1924,7 +2188,8 @@ void make_discover (client, lease)
client -> packet.xid = random ();
client -> packet.secs = 0; /* filled in by send_discover. */
@@ -309,7 +309,7 @@
client -> packet.flags = 0;
else
client -> packet.flags = htons (BOOTP_BROADCAST);
-@@ -2008,7 +2273,9 @@
+@@ -2008,7 +2273,9 @@ void make_request (client, lease)
} else {
memset (&client -> packet.ciaddr, 0,
sizeof client -> packet.ciaddr);
@@ -320,7 +320,7 @@
client -> packet.flags = 0;
else
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.xid = client -> xid;
client -> packet.secs = 0; /* Filled in by send_request. */
@@ -330,9 +330,9 @@
client -> packet.flags = 0;
else
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 2007-03-29 16:33:29.000000000 -0400
-@@ -81,6 +81,7 @@
+--- dhcp-3.0.5/client/clparse.c.options 2007-06-18 10:40:59.000000000 -0400
++++ dhcp-3.0.5/client/clparse.c 2007-06-18 10:41:00.000000000 -0400
+@@ -81,6 +81,7 @@ isc_result_t read_client_conf ()
top_level_config.requested_options = default_requested_options;
top_level_config.omapi_port = -1;
top_level_config.do_forward_update = 1;
@@ -340,7 +340,7 @@
group_allocate (&top_level_config.on_receipt, MDL);
if (!top_level_config.on_receipt)
-@@ -227,7 +228,8 @@
+@@ -227,7 +228,8 @@ void read_client_leases ()
interface-declaration |
LEASE client-lease-statement |
ALIAS client-lease-statement |
@@ -350,7 +350,7 @@
void parse_client_statement (cfile, ip, config)
struct parse *cfile;
-@@ -549,6 +551,12 @@
+@@ -549,6 +551,12 @@ void parse_client_statement (cfile, ip,
parse_reject_statement (cfile, config);
return;
@@ -363,9 +363,9 @@
default:
lose = 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 2007-03-29 16:33:29.000000000 -0400
-@@ -599,6 +599,8 @@
+--- dhcp-3.0.5/common/conflex.c.options 2007-06-18 10:41:00.000000000 -0400
++++ dhcp-3.0.5/common/conflex.c 2007-06-18 10:41:00.000000000 -0400
+@@ -599,6 +599,8 @@ static enum dhcp_token intern (atom, dfv
return BALANCE;
if (!strcasecmp (atom + 1, "ound"))
return BOUND;
@@ -374,9 +374,9 @@
break;
case 'c':
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 2007-03-30 15:14:56.000000000 -0400
-@@ -767,6 +767,9 @@
+--- dhcp-3.0.5/includes/dhcpd.h.options 2007-06-18 10:41:00.000000000 -0400
++++ dhcp-3.0.5/includes/dhcpd.h 2007-06-18 10:41:00.000000000 -0400
+@@ -767,6 +767,9 @@ struct client_config {
int do_forward_update; /* If nonzero, and if we have the
information we need, update the
A record for the address we get. */
@@ -387,14 +387,14 @@
/* 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 2007-03-29 16:33:29.000000000 -0400
-@@ -309,7 +309,8 @@
++++ dhcp-3.0.5/includes/dhctoken.h 2007-06-18 10:41:34.000000000 -0400
+@@ -309,7 +309,8 @@ enum dhcp_token {
DOMAIN_NAME = 613,
DO_FORWARD_UPDATE = 614,
KNOWN_CLIENTS = 615,
- ATSFP = 616
+ ATSFP = 616,
-+ BOOTP_BROADCAST_ALWAYS = 616
++ BOOTP_BROADCAST_ALWAYS = 617
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-7/dhcp.spec,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -r1.161 -r1.162
--- dhcp.spec 22 May 2007 20:04:05 -0000 1.161
+++ dhcp.spec 18 Jun 2007 15:12:29 -0000 1.162
@@ -10,7 +10,7 @@
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent
Name: dhcp
Version: 3.0.5
-Release: 35%{?dist}
+Release: 36%{?dist}
Epoch: 12
License: ISC
Group: System Environment/Daemons
@@ -52,6 +52,7 @@
Patch19: %{name}-3.0.5-manpages.patch
Patch20: %{name}-3.0.5-libdhcp4client.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)
BuildRequires: groff openldap-devel
@@ -234,6 +235,9 @@
# Handle Xen partial UDP checksums
%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
%{__install} -p -m 0644 %SOURCE6 .
%{__install} -p -m 0644 %SOURCE7 doc
@@ -430,6 +434,10 @@
%{_libdir}/libdhcp4client.a
%changelog
+* Mon Jun 18 2007 David Cantrell <dcantrell at 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 at redhat.com> - 12:3.0.5-35
- Disable -fvisibility=hidden for now as it breaks dhcpv4_client() from
the shared library (#240804)
More information about the fedora-extras-commits
mailing list