]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
dhcp: Update to 4.3.5b1
[ipfire-3.x.git] / dhcp / patches / 0017-dhcp-rfc3442-classless-static-routes.patch
similarity index 76%
rename from dhcp/patches/dhcp-4.2.5-rfc3442-classless-static-routes.patch
rename to dhcp/patches/0017-dhcp-rfc3442-classless-static-routes.patch
index 62a2b69eba0546ceda5da51a114c17d070f8892e..6c3a2392b6795fc333d39268b7193c48affa8c43 100644 (file)
@@ -1,16 +1,16 @@
-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 @@
+diff -up dhcp-4.3.4/client/clparse.c.rfc3442 dhcp-4.3.4/client/clparse.c
+--- dhcp-4.3.4/client/clparse.c.rfc3442        2016-04-29 12:23:34.192032714 +0200
++++ dhcp-4.3.4/client/clparse.c        2016-04-29 12:24:37.531016317 +0200
+@@ -31,7 +31,7 @@
  
  struct client_config top_level_config;
  
 -#define NUM_DEFAULT_REQUESTED_OPTS    14
 +#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);
-@@ -90,7 +90,11 @@ isc_result_t read_client_conf ()
+@@ -87,7 +87,11 @@ isc_result_t read_client_conf ()
                                dhcp_universe.code_hash, &code, 0, MDL);
  
        /* 4 */
@@ -23,7 +23,7 @@ diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/client/clparse.c
        option_code_hash_lookup(&default_requested_options[3],
                                dhcp_universe.code_hash, &code, 0, MDL);
  
-@@ -144,6 +148,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],
                                dhcp_universe.code_hash, &code, 0, MDL);
  
@@ -35,10 +35,10 @@ diff -up dhcp-4.2.5b1/client/clparse.c.rfc3442 dhcp-4.2.5b1/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.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
+diff -up dhcp-4.3.4/common/dhcp-options.5.rfc3442 dhcp-4.3.4/common/dhcp-options.5
+--- dhcp-4.3.4/common/dhcp-options.5.rfc3442   2016-04-29 12:23:34.183032716 +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
  or
    option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
  .fi
@@ -65,7 +65,7 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/common/dhcp-opt
  .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
-@@ -932,6 +952,29 @@ dhclient-script will create routes:
+@@ -1031,6 +1051,29 @@ dhclient-script will create routes:
  .RE
  .PP
  .nf
@@ -95,10 +95,10 @@ diff -up dhcp-4.2.5b1/common/dhcp-options.5.rfc3442 dhcp-4.2.5b1/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.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
+diff -up dhcp-4.3.4/common/inet.c.rfc3442 dhcp-4.3.4/common/inet.c
+--- dhcp-4.3.4/common/inet.c.rfc3442   2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/common/inet.c   2016-04-29 12:23:34.237032703 +0200
+@@ -519,6 +519,60 @@ free_iaddrcidrnetlist(struct iaddrcidrne
        return ISC_R_SUCCESS;
  }
  
@@ -159,9 +159,9 @@ diff -up dhcp-4.2.5b1/common/inet.c.rfc3442 dhcp-4.2.5b1/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.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
+diff -up dhcp-4.3.4/common/options.c.rfc3442 dhcp-4.3.4/common/options.c
+--- dhcp-4.3.4/common/options.c.rfc3442        2016-03-22 14:16:51.000000000 +0100
++++ 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
                 * packet.
                 */
@@ -191,7 +191,7 @@ diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
        /* Figure out the size of the data. */
        for (l = i = 0; option -> format [i]; i++, l++) {
                if (l >= sizeof(fmtbuf) - 1)
-@@ -1876,6 +1882,33 @@ const char *pretty_print_option (option,
+@@ -1894,6 +1900,33 @@ const char *pretty_print_option (option,
        if (numhunk < 0)
                numhunk = 1;
  
@@ -225,7 +225,7 @@ diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
        /* Cycle through the array (or hunk) printing the data. */
        for (i = 0; i < numhunk; i++) {
                if ((a_array == ISC_TRUE) && (i != 0) && (numelem > 0)) {
-@@ -2031,6 +2064,20 @@ const char *pretty_print_option (option,
+@@ -2049,6 +2082,20 @@ const char *pretty_print_option (option,
                                strcpy(op, piaddr(iaddr));
                                dp += 4;
                                break;
@@ -246,9 +246,9 @@ diff -up dhcp-4.2.5b1/common/options.c.rfc3442 dhcp-4.2.5b1/common/options.c
                              case '6':
                                iaddr.len = 16;
                                memcpy(iaddr.iabuf, dp, 16);
-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
+diff -up dhcp-4.3.4/common/parse.c.rfc3442 dhcp-4.3.4/common/parse.c
+--- dhcp-4.3.4/common/parse.c.rfc3442  2016-04-29 12:23:34.220032707 +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)
  }     
  
@@ -289,7 +289,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
   * Return true if every character in the string is hexadecimal.
   */
  static int
-@@ -719,8 +752,10 @@ unsigned char *parse_numeric_aggregate (
+@@ -720,8 +753,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.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
                                if (token != RBRACE && token != LBRACE)
                                        token = next_token (&val,
                                                            (unsigned *)0,
-@@ -1660,6 +1695,9 @@ int parse_option_code_definition (cfile,
+@@ -1668,6 +1703,9 @@ int parse_option_code_definition (cfile,
              case IP_ADDRESS:
                type = 'I';
                break;
@@ -311,7 +311,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
              case IP6_ADDRESS:
                type = '6';
                break;
-@@ -5418,6 +5456,15 @@ int parse_option_token (rv, cfile, fmt,
+@@ -5097,6 +5135,15 @@ int parse_option_token (rv, cfile, fmt,
                }
                break;
  
@@ -327,7 +327,7 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
              case '6': /* IPv6 address. */
                if (!parse_ip6_addr(cfile, &addr)) {
                        return 0;
-@@ -5695,6 +5742,13 @@ int parse_option_decl (oc, cfile)
+@@ -5374,6 +5421,13 @@ int parse_option_decl (oc, cfile)
                                        goto exit;
                                len = ip_addr.len;
                                dp = ip_addr.iabuf;
@@ -341,10 +341,10 @@ diff -up dhcp-4.2.5b1/common/parse.c.rfc3442 dhcp-4.2.5b1/common/parse.c
  
                              alloc:
                                if (hunkix + len > sizeof hunkbuf) {
-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
+diff -up dhcp-4.3.4/common/tables.c.rfc3442 dhcp-4.3.4/common/tables.c
+--- dhcp-4.3.4/common/tables.c.rfc3442 2016-04-29 12:23:34.209032710 +0200
++++ dhcp-4.3.4/common/tables.c 2016-04-29 12:23:34.238032702 +0200
+@@ -45,6 +45,7 @@ HASH_FUNCTIONS (option_code, const unsig
     Format codes:
  
     I - IPv4 address
@@ -352,18 +352,18 @@ diff -up dhcp-4.2.5b1/common/tables.c.rfc3442 dhcp-4.2.5b1/common/tables.c
     6 - IPv6 address
     l - 32-bit signed integer
     L - 32-bit unsigned integer
-@@ -210,6 +211,7 @@ static struct option dhcp_options[] = {
-       { "default-url", "t",                   &dhcp_universe, 114, 1 },
+@@ -216,6 +217,7 @@ static struct option dhcp_options[] = {
+ #endif
        { "subnet-selection", "I",              &dhcp_universe, 118, 1 },
-       { "domain-search", "D",         &dhcp_universe, 119, 1 },
+       { "domain-search", "D",                 &dhcp_universe, 119, 1 },
 +      { "classless-static-routes", "RIA",     &dhcp_universe, 121, 1 },
        { "vivco", "Evendor-class.",            &dhcp_universe, 124, 1 },
        { "vivso", "Evendor.",                  &dhcp_universe, 125, 1 },
  #if 0
-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
+diff -up dhcp-4.3.4/includes/dhcpd.h.rfc3442 dhcp-4.3.4/includes/dhcpd.h
+--- dhcp-4.3.4/includes/dhcpd.h.rfc3442        2016-04-29 12:23:34.186032716 +0200
++++ dhcp-4.3.4/includes/dhcpd.h        2016-04-29 12:23:34.239032702 +0200
+@@ -2894,6 +2894,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.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/includes/dhcpd.h
  char *piaddrmask(struct iaddr *, struct iaddr *);
  char *piaddrcidr(const struct iaddr *, unsigned int);
  u_int16_t validate_port(char *);
-@@ -2887,6 +2888,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 *);
  void parse_string_list (struct parse *, struct string_list **, int);
  int parse_ip_addr (struct parse *, struct iaddr *);
@@ -379,10 +379,10 @@ diff -up dhcp-4.2.5b1/includes/dhcpd.h.rfc3442 dhcp-4.2.5b1/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.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 {
+diff -up dhcp-4.3.4/includes/dhcp.h.rfc3442 dhcp-4.3.4/includes/dhcp.h
+--- dhcp-4.3.4/includes/dhcp.h.rfc3442 2016-03-22 14:16:51.000000000 +0100
++++ dhcp-4.3.4/includes/dhcp.h 2016-04-29 12:23:34.239032702 +0200
+@@ -159,6 +159,7 @@ struct dhcp_packet {
  #define DHO_ASSOCIATED_IP                     92
  #define DHO_SUBNET_SELECTION                  118 /* RFC3011! */
  #define DHO_DOMAIN_SEARCH                     119 /* RFC3397 */
@@ -390,16 +390,16 @@ diff -up dhcp-4.2.5b1/includes/dhcp.h.rfc3442 dhcp-4.2.5b1/includes/dhcp.h
  #define DHO_VIVCO_SUBOPTIONS                  124
  #define DHO_VIVSO_SUBOPTIONS                  125
  
-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,
-       TOKEN_INFINIBAND = 668,
--      BOOTP_BROADCAST_ALWAYS = 669
-+      BOOTP_BROADCAST_ALWAYS = 669,
-+      DESTINATION_DESCRIPTOR = 670
+diff -up dhcp-4.3.4/includes/dhctoken.h.rfc3442 dhcp-4.3.4/includes/dhctoken.h
+--- dhcp-4.3.4/includes/dhctoken.h.rfc3442     2016-04-29 12:23:34.239032702 +0200
++++ dhcp-4.3.4/includes/dhctoken.h     2016-04-29 12:25:07.236008628 +0200
+@@ -374,7 +374,8 @@ enum dhcp_token {
+       LEASE_ID_FORMAT = 676,
+       TOKEN_HEX = 677,
+       TOKEN_OCTAL = 678,
+-      BOOTP_BROADCAST_ALWAYS = 679
++      BOOTP_BROADCAST_ALWAYS = 679,
++      DESTINATION_DESCRIPTOR = 680
  };
  
  #define is_identifier(x)      ((x) >= FIRST_TOKEN &&  \