]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
dhcp: Update to 4.2.5.
[people/ms/ipfire-3.x.git] / dhcp / patches / dhcp-4.2.5-rfc3442-classless-static-routes.patch
similarity index 79%
rename from dhcp/patches/dhcp-4.2.4-rfc3442-classless-static-routes.patch
rename to dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
index a2fe2198e43052f1744517e1ccc6c776ffb5451c..62a2b69eba0546ceda5da51a114c17d070f8892e 100644 (file)
@@ -1,6 +1,6 @@
-diff -up dhcp-4.2.4b1/client/clparse.c.rfc3442 dhcp-4.2.4b1/client/clparse.c
---- dhcp-4.2.4b1/client/clparse.c.rfc3442      2012-04-16 17:34:27.546079944 +0200
-+++ dhcp-4.2.4b1/client/clparse.c      2012-04-16 17:34:27.605079118 +0200
+diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
+--- dhcp-4.2.5b1/client/clparse.c.rfc3442      2012-12-17 13:23:34.387564654 +0100
++++ dhcp-4.2.5b1/client/clparse.c      2012-12-17 13:23:34.437563996 +0100
 @@ -37,7 +37,7 @@
  
  struct client_config top_level_config;
@@ -35,10 +35,10 @@ diff -up dhcp-4.2.4b1/client/clparse.c.rfc3442 dhcp-4.2.4b1/client/clparse.c
        for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
                if (default_requested_options[code] == NULL)
                        log_fatal("Unable to find option definition for "
-diff -up dhcp-4.2.4b1/common/dhcp-options.5.rfc3442 dhcp-4.2.4b1/common/dhcp-options.5
---- dhcp-4.2.4b1/common/dhcp-options.5.rfc3442 2012-04-16 17:34:27.537080070 +0200
-+++ dhcp-4.2.4b1/common/dhcp-options.5 2012-04-16 17:34:27.606079104 +0200
-@@ -115,6 +115,26 @@ hexadecimal, separated by colons.   For
+diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-options.5
+--- dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 2012-12-17 13:23:34.376564797 +0100
++++ dhcp-4.2.5b1/common/dhcp-options.5 2012-12-17 13:25:18.435141385 +0100
+@@ -116,6 +116,26 @@ hexadecimal, separated by colons.  For e
  or
    option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
  .fi
@@ -64,8 +64,8 @@ diff -up dhcp-4.2.4b1/common/dhcp-options.5.rfc3442 dhcp-4.2.4b1/common/dhcp-opt
 +.fi
  .SH SETTING OPTION VALUES USING EXPRESSIONS
  Sometimes it's helpful to be able to set the value of a DHCP option
- based on some value that the client has sent.   To do this, you can
-@@ -931,6 +951,29 @@ dhclient-script will create routes:
+ based on some value that the client has sent.  To do this, you can
+@@ -932,6 +952,29 @@ dhclient-script will create routes:
  .RE
  .PP
  .nf
@@ -95,9 +95,9 @@ diff -up dhcp-4.2.4b1/common/dhcp-options.5.rfc3442 dhcp-4.2.4b1/common/dhcp-opt
  .B option \fBstreettalk-directory-assistance-server\fR \fIip-address\fR
                                             [\fB,\fR \fIip-address\fR...]\fB;\fR
  .fi
-diff -up dhcp-4.2.4b1/common/inet.c.rfc3442 dhcp-4.2.4b1/common/inet.c
---- dhcp-4.2.4b1/common/inet.c.rfc3442 2011-05-11 02:47:22.000000000 +0200
-+++ dhcp-4.2.4b1/common/inet.c 2012-04-16 17:34:27.607079090 +0200
+diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-4.2.5b1/common/inet.c
+--- dhcp-4.2.5b1/common/inet.c.rfc3442 2012-12-05 02:17:38.000000000 +0100
++++ dhcp-4.2.5b1/common/inet.c 2012-12-17 13:23:34.440563957 +0100
 @@ -528,6 +528,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
        return ISC_R_SUCCESS;
  }
@@ -159,10 +159,10 @@ diff -up dhcp-4.2.4b1/common/inet.c.rfc3442 dhcp-4.2.4b1/common/inet.c
  /* piaddr() turns an iaddr structure into a printable address. */
  /* XXX: should use a const pointer rather than passing the structure */
  const char *
-diff -up dhcp-4.2.4b1/common/options.c.rfc3442 dhcp-4.2.4b1/common/options.c
---- dhcp-4.2.4b1/common/options.c.rfc3442      2012-03-20 01:31:53.000000000 +0100
-+++ dhcp-4.2.4b1/common/options.c      2012-04-16 17:34:27.608079076 +0200
-@@ -706,7 +706,11 @@ cons_options(struct packet *inpacket, st
+diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
+--- dhcp-4.2.5b1/common/options.c.rfc3442      2012-12-05 02:17:38.000000000 +0100
++++ dhcp-4.2.5b1/common/options.c      2012-12-17 13:29:38.961536040 +0100
+@@ -713,7 +713,11 @@ cons_options(struct packet *inpacket, st
                 * packet.
                 */
                priority_list[priority_len++] = DHO_SUBNET_MASK;
@@ -175,15 +175,15 @@ diff -up dhcp-4.2.4b1/common/options.c.rfc3442 dhcp-4.2.4b1/common/options.c
                priority_list[priority_len++] = DHO_DOMAIN_NAME_SERVERS;
                priority_list[priority_len++] = DHO_HOST_NAME;
                priority_list[priority_len++] = DHO_FQDN;
-@@ -1683,6 +1687,7 @@ const char *pretty_print_option (option,
-       const unsigned char *dp = data;
-       char comma;
+@@ -1694,6 +1698,7 @@ const char *pretty_print_option (option,
        unsigned long tval;
-+        unsigned int octets = 0;
+       isc_boolean_t a_array = ISC_FALSE;
+       int len_used;
++      unsigned int octets = 0;
  
        if (emit_commas)
                comma = ',';
-@@ -1691,6 +1696,7 @@ const char *pretty_print_option (option,
+@@ -1702,6 +1707,7 @@ const char *pretty_print_option (option,
  
        memset (enumbuf, 0, sizeof enumbuf);
  
@@ -191,7 +191,7 @@ diff -up dhcp-4.2.4b1/common/options.c.rfc3442 dhcp-4.2.4b1/common/options.c
        /* Figure out the size of the data. */
        for (l = i = 0; option -> format [i]; i++, l++) {
                if (l >= sizeof(fmtbuf) - 1)
-@@ -1840,6 +1846,33 @@ const char *pretty_print_option (option,
+@@ -1876,6 +1882,33 @@ const char *pretty_print_option (option,
        if (numhunk < 0)
                numhunk = 1;
  
@@ -224,8 +224,8 @@ diff -up dhcp-4.2.4b1/common/options.c.rfc3442 dhcp-4.2.4b1/common/options.c
 +
        /* Cycle through the array (or hunk) printing the data. */
        for (i = 0; i < numhunk; i++) {
-               for (j = 0; j < numelem; j++) {
-@@ -1978,6 +2011,20 @@ const char *pretty_print_option (option,
+               if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) {
+@@ -2031,6 +2064,20 @@ const char *pretty_print_option (option,
                                strcpy(op, piaddr(iaddr));
                                dp += 4;
                                break;
@@ -246,9 +246,9 @@ diff -up dhcp-4.2.4b1/common/options.c.rfc3442 dhcp-4.2.4b1/common/options.c
                              case '6':
                                iaddr.len = 16;
                                memcpy(iaddr.iabuf, dp, 16);
-diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c
---- dhcp-4.2.4b1/common/parse.c.rfc3442        2012-04-16 17:34:27.577079510 +0200
-+++ dhcp-4.2.4b1/common/parse.c        2012-04-16 17:34:27.610079048 +0200
+diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
+--- dhcp-4.2.5b1/common/parse.c.rfc3442        2012-12-17 13:23:34.408564378 +0100
++++ dhcp-4.2.5b1/common/parse.c        2012-12-17 13:23:34.444563905 +0100
 @@ -341,6 +341,39 @@ int parse_ip_addr (cfile, addr)
  }     
  
@@ -289,7 +289,7 @@ diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c
   * Return true if every character in the string is hexadecimal.
   */
  static int
-@@ -704,8 +737,10 @@ unsigned char *parse_numeric_aggregate (
+@@ -719,8 +752,10 @@ unsigned char *parse_numeric_aggregate (
                if (count) {
                        token = peek_token (&val, (unsigned *)0, cfile);
                        if (token != separator) {
@@ -301,7 +301,7 @@ diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c
                                if (token != RBRACE && token != LBRACE)
                                        token = next_token (&val,
                                                            (unsigned *)0,
-@@ -1628,6 +1663,9 @@ int parse_option_code_definition (cfile,
+@@ -1660,6 +1695,9 @@ int parse_option_code_definition (cfile,
              case IP_ADDRESS:
                type = 'I';
                break;
@@ -311,7 +311,7 @@ diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c
              case IP6_ADDRESS:
                type = '6';
                break;
-@@ -5375,6 +5413,15 @@ int parse_option_token (rv, cfile, fmt,
+@@ -5418,6 +5456,15 @@ int parse_option_token (rv, cfile, fmt,
                }
                break;
  
@@ -327,7 +327,7 @@ diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c
              case '6': /* IPv6 address. */
                if (!parse_ip6_addr(cfile, &addr)) {
                        return 0;
-@@ -5635,6 +5682,13 @@ int parse_option_decl (oc, cfile)
+@@ -5695,6 +5742,13 @@ int parse_option_decl (oc, cfile)
                                        goto exit;
                                len = ip_addr.len;
                                dp = ip_addr.iabuf;
@@ -341,9 +341,9 @@ diff -up dhcp-4.2.4b1/common/parse.c.rfc3442 dhcp-4.2.4b1/common/parse.c
  
                              alloc:
                                if (hunkix + len > sizeof hunkbuf) {
-diff -up dhcp-4.2.4b1/common/tables.c.rfc3442 dhcp-4.2.4b1/common/tables.c
---- dhcp-4.2.4b1/common/tables.c.rfc3442       2012-04-16 17:34:27.566079664 +0200
-+++ dhcp-4.2.4b1/common/tables.c       2012-04-16 17:34:27.611079034 +0200
+diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-4.2.5b1/common/tables.c
+--- dhcp-4.2.5b1/common/tables.c.rfc3442       2012-12-17 13:23:34.398564508 +0100
++++ dhcp-4.2.5b1/common/tables.c       2012-12-17 13:23:34.445563891 +0100
 @@ -52,6 +52,7 @@ HASH_FUNCTIONS (option_code, const unsig
     Format codes:
  
@@ -352,7 +352,7 @@ diff -up dhcp-4.2.4b1/common/tables.c.rfc3442 dhcp-4.2.4b1/common/tables.c
     6 - IPv6 address
     l - 32-bit signed integer
     L - 32-bit unsigned integer
-@@ -209,6 +210,7 @@ static struct option dhcp_options[] = {
+@@ -210,6 +211,7 @@ static struct option dhcp_options[] = {
        { "default-url", "t",                   &dhcp_universe, 114, 1 },
        { "subnet-selection", "I",              &dhcp_universe, 118, 1 },
        { "domain-search", "D",         &dhcp_universe, 119, 1 },
@@ -360,10 +360,10 @@ diff -up dhcp-4.2.4b1/common/tables.c.rfc3442 dhcp-4.2.4b1/common/tables.c
        { "vivco", "Evendor-class.",            &dhcp_universe, 124, 1 },
        { "vivso", "Evendor.",                  &dhcp_universe, 125, 1 },
  #if 0
-diff -up dhcp-4.2.4b1/includes/dhcpd.h.rfc3442 dhcp-4.2.4b1/includes/dhcpd.h
---- dhcp-4.2.4b1/includes/dhcpd.h.rfc3442      2012-04-16 17:34:27.543079986 +0200
-+++ dhcp-4.2.4b1/includes/dhcpd.h      2012-04-16 17:34:27.613079006 +0200
-@@ -2666,6 +2666,7 @@ isc_result_t range2cidr(struct iaddrcidr
+diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/includes/dhcpd.h
+--- dhcp-4.2.5b1/includes/dhcpd.h.rfc3442      2012-12-17 13:23:34.382564719 +0100
++++ dhcp-4.2.5b1/includes/dhcpd.h      2012-12-17 13:23:34.446563877 +0100
+@@ -2678,6 +2678,7 @@ isc_result_t range2cidr(struct iaddrcidr
                        const struct iaddr *lo, const struct iaddr *hi);
  isc_result_t free_iaddrcidrnetlist(struct iaddrcidrnetlist **result);
  const char *piaddr (struct iaddr);
@@ -371,7 +371,7 @@ diff -up dhcp-4.2.4b1/includes/dhcpd.h.rfc3442 dhcp-4.2.4b1/includes/dhcpd.h
  char *piaddrmask(struct iaddr *, struct iaddr *);
  char *piaddrcidr(const struct iaddr *, unsigned int);
  u_int16_t validate_port(char *);
-@@ -2873,6 +2874,7 @@ void parse_client_lease_declaration (str
+@@ -2887,6 +2888,7 @@ void parse_client_lease_declaration (str
  int parse_option_decl (struct option_cache **, struct parse *);
  void parse_string_list (struct parse *, struct string_list **, int);
  int parse_ip_addr (struct parse *, struct iaddr *);
@@ -379,9 +379,9 @@ diff -up dhcp-4.2.4b1/includes/dhcpd.h.rfc3442 dhcp-4.2.4b1/includes/dhcpd.h
  int parse_ip_addr_with_subnet(struct parse *, struct iaddrmatch *);
  void parse_reject_statement (struct parse *, struct client_config *);
  
-diff -up dhcp-4.2.4b1/includes/dhcp.h.rfc3442 dhcp-4.2.4b1/includes/dhcp.h
---- dhcp-4.2.4b1/includes/dhcp.h.rfc3442       2012-02-16 22:09:14.000000000 +0100
-+++ dhcp-4.2.4b1/includes/dhcp.h       2012-04-16 17:34:27.613079006 +0200
+diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-4.2.5b1/includes/dhcp.h
+--- dhcp-4.2.5b1/includes/dhcp.h.rfc3442       2012-10-23 21:02:13.000000000 +0200
++++ dhcp-4.2.5b1/includes/dhcp.h       2012-12-17 13:23:34.446563877 +0100
 @@ -163,6 +163,7 @@ struct dhcp_packet {
  #define DHO_ASSOCIATED_IP                     92
  #define DHO_SUBNET_SELECTION                  118 /* RFC3011! */
@@ -390,9 +390,9 @@ diff -up dhcp-4.2.4b1/includes/dhcp.h.rfc3442 dhcp-4.2.4b1/includes/dhcp.h
  #define DHO_VIVCO_SUBOPTIONS                  124
  #define DHO_VIVSO_SUBOPTIONS                  125
  
-diff -up dhcp-4.2.4b1/includes/dhctoken.h.rfc3442 dhcp-4.2.4b1/includes/dhctoken.h
---- dhcp-4.2.4b1/includes/dhctoken.h.rfc3442   2012-04-16 17:34:27.000000000 +0200
-+++ dhcp-4.2.4b1/includes/dhctoken.h   2012-04-16 17:35:15.028414805 +0200
+diff -up dhcp-4.2.5b1/includes/dhctoken.h.rfc3442 dhcp-4.2.5b1/includes/dhctoken.h
+--- dhcp-4.2.5b1/includes/dhctoken.h.rfc3442   2012-12-17 13:23:34.348565167 +0100
++++ dhcp-4.2.5b1/includes/dhctoken.h   2012-12-17 13:23:34.446563877 +0100
 @@ -365,7 +365,8 @@ enum dhcp_token {
        PRIMARY6 = 666,
        SECONDARY6 = 667,