]> git.pld-linux.org Git - packages/dhcp.git/blame - dhcp-dhclient-anycast.patch
- introduced -client-dirs subpackage that provides:
[packages/dhcp.git] / dhcp-dhclient-anycast.patch
CommitLineData
8c878a4c
ER
1diff -up dhcp-4.0.0/common/lpf.c.anycast dhcp-4.0.0/common/lpf.c
2--- dhcp-4.0.0/common/lpf.c.anycast 2007-12-29 06:44:46.000000000 -1000
3+++ dhcp-4.0.0/common/lpf.c 2007-12-29 10:40:11.000000000 -1000
4@@ -331,6 +331,9 @@ ssize_t send_packet (interface, packet,
5 return send_fallback (interface, packet, raw,
6 len, from, to, hto);
7
8+ if (hto == NULL && interface->anycast_mac_addr.hlen)
9+ hto = &interface->anycast_mac_addr;
10+
11 /* Assemble the headers... */
12 assemble_hw_header (interface, (unsigned char *)hh, &hbufp, hto);
13 fudge = hbufp % 4; /* IP header must be word-aligned. */
14diff -up dhcp-4.0.0/common/conflex.c.anycast dhcp-4.0.0/common/conflex.c
15--- dhcp-4.0.0/common/conflex.c.anycast 2007-12-29 06:44:46.000000000 -1000
16+++ dhcp-4.0.0/common/conflex.c 2007-12-29 10:39:30.000000000 -1000
17@@ -715,6 +715,8 @@ intern(char *atom, enum dhcp_token dfv)
18 }
19 if (!strcasecmp (atom + 1, "nd"))
20 return AND;
21+ if (!strcasecmp (atom + 1, "nycast-mac"))
22+ return ANYCAST_MAC;
23 if (!strcasecmp (atom + 1, "ppend"))
24 return APPEND;
25 if (!strcasecmp (atom + 1, "llow"))
26diff -up dhcp-4.0.0/includes/dhcpd.h.anycast dhcp-4.0.0/includes/dhcpd.h
27--- dhcp-4.0.0/includes/dhcpd.h.anycast 2007-12-29 06:44:46.000000000 -1000
28+++ dhcp-4.0.0/includes/dhcpd.h 2007-12-29 10:42:56.000000000 -1000
29@@ -1188,6 +1188,7 @@ struct interface_info {
30 int dlpi_sap_length;
31 struct hardware dlpi_broadcast_addr;
32 # endif /* DLPI_SEND || DLPI_RECEIVE */
33+ struct hardware anycast_mac_addr;
34 };
35
36 struct hardware_link {
37diff -up dhcp-4.0.0/includes/dhctoken.h.anycast dhcp-4.0.0/includes/dhctoken.h
38--- dhcp-4.0.0/includes/dhctoken.h.anycast 2007-12-29 06:44:46.000000000 -1000
39+++ dhcp-4.0.0/includes/dhctoken.h 2007-12-29 10:44:00.000000000 -1000
40@@ -346,7 +346,8 @@ enum dhcp_token {
8c878a4c
ER
41 TOKEN_ALSO = 650,
42 AFTER = 651,
585ef843 43 CONFLICT_DONE = 660,
8c878a4c
ER
44- BOOTP_BROADCAST_ALWAYS = 652
45+ BOOTP_BROADCAST_ALWAYS = 652,
46+ ANYCAST_MAC = 653
47 };
48
49 #define is_identifier(x) ((x) >= FIRST_TOKEN && \
50diff -up dhcp-4.0.0/client/clparse.c.anycast dhcp-4.0.0/client/clparse.c
51--- dhcp-4.0.0/client/clparse.c.anycast 2007-12-29 06:44:46.000000000 -1000
52+++ dhcp-4.0.0/client/clparse.c 2007-12-29 10:38:55.000000000 -1000
53@@ -550,6 +550,17 @@ void parse_client_statement (cfile, ip,
54 }
55 return;
56
57+ case ANYCAST_MAC:
58+ token = next_token (&val, (unsigned *)0, cfile);
59+ if (ip) {
60+ parse_hardware_param (cfile, &ip -> anycast_mac_addr);
61+ } else {
62+ parse_warn (cfile, "anycast mac address parameter %s",
63+ "not allowed here.");
64+ skip_to_semi (cfile);
65+ }
66+ return;
67+
68 case REQUEST:
69 token = next_token (&val, (unsigned *)0, cfile);
70 if (config -> requested_options == default_requested_options)
This page took 0.122409 seconds and 4 git commands to generate.