Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/roy]: src/external/bsd/dhcpcd/dist/src Import dhcpcd-8.0.6 with the foll...



details:   https://anonhg.NetBSD.org/src/rev/8de19138a912
branches:  roy
changeset: 454294:8de19138a912
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Sep 13 11:52:31 2019 +0000

description:
Import dhcpcd-8.0.6 with the following changes:
  *  DHCP: Ensure we have enough data to checksum IP and UDP (really fix)
  *  dhcpcd-embedded.{c,h} no longer needs generating

diffstat:

 external/bsd/dhcpcd/dist/src/defs.h            |   2 +-
 external/bsd/dhcpcd/dist/src/dhcp.c            |   6 +
 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c |  83 ++++++++++++++++++++++++++
 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h |   6 +
 4 files changed, 96 insertions(+), 1 deletions(-)

diffs (146 lines):

diff -r 558c8df5946f -r 8de19138a912 external/bsd/dhcpcd/dist/src/defs.h
--- a/external/bsd/dhcpcd/dist/src/defs.h       Fri Sep 13 10:58:31 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/defs.h       Fri Sep 13 11:52:31 2019 +0000
@@ -29,7 +29,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "8.0.5"
+#define VERSION                        "8.0.6"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r 558c8df5946f -r 8de19138a912 external/bsd/dhcpcd/dist/src/dhcp.c
--- a/external/bsd/dhcpcd/dist/src/dhcp.c       Fri Sep 13 10:58:31 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp.c       Fri Sep 13 11:52:31 2019 +0000
@@ -3264,7 +3264,13 @@
        if (from != NULL)
                from->s_addr = ip->ip_src.s_addr;
 
+       /* Check we have the IP header */
        ip_hlen = (size_t)ip->ip_hl * 4;
+       if (ip_hlen > plen) {
+               errno = ENOBUFS;
+               return -1;
+       }
+
        if (in_cksum(ip, ip_hlen, NULL) != 0) {
                errno = EINVAL;
                return -1;
diff -r 558c8df5946f -r 8de19138a912 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c
--- a/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c    Fri Sep 13 10:58:31 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c    Fri Sep 13 11:52:31 2019 +0000
@@ -34,6 +34,88 @@
 #include <unistd.h>
 
 const char * const dhcpcd_embedded_conf[] = {
+#ifdef SMALL
+"define 1 request ipaddress subnet_mask",
+"define 121 rfc3442 classless_static_routes",
+"define 249 rfc3442 ms_classless_static_routes",
+"define 33 request array ipaddress static_routes",
+"define 3 request array ipaddress routers",
+"define 6 array ipaddress domain_name_servers",
+"define 12 dname host_name",
+"define 15 array dname domain_name",
+"define 26 uint16 interface_mtu",
+"define 28 request ipaddress broadcast_address",
+"define 50 ipaddress dhcp_requested_address",
+"define 51 request uint32 dhcp_lease_time",
+"define 52 byte dhcp_option_overload",
+"define 53 byte dhcp_message_type",
+"define 54 ipaddress dhcp_server_identifier",
+"define 55 array byte dhcp_parameter_request_list",
+"define 56 string dhcp_message",
+"define 57 uint16 dhcp_max_message_size",
+"define 58 request uint32 dhcp_renewal_time",
+"define 59 request uint32 dhcp_rebinding_time",
+"define 60 string vendor_class_identifier",
+"define 61 binhex dhcp_client_identifier",
+"define 80 norequest flag rapid_commit",
+"define 81 embed fqdn",
+"embed bitflags=0000NEOS flags",
+"embed byte rcode1",
+"embed byte rcode2",
+"embed optional domain fqdn",
+"define 119 array domain domain_search",
+"definend 1 binhex source_address",
+"definend 2 binhex target_address",
+"definend 3 index embed prefix_information",
+"embed byte length",
+"embed bitflags=LA flags",
+"embed uint32 vltime",
+"embed uint32 pltime",
+"embed uint32 reserved",
+"embed array ip6address prefix",
+"definend 5 embed mtu",
+"embed uint16 reserved",
+"embed uint32 mtu",
+"definend 25 index embed rdnss",
+"embed uint16 reserved",
+"embed uint32 lifetime",
+"embed array ip6address servers",
+"definend 31 index embed dnssl",
+"embed uint16 reserved",
+"embed uint32 lifetime",
+"embed domain search",
+"define6 1 binhex client_id",
+"define6 2 binhex server_id",
+"define6 3 norequest index embed ia_na",
+"embed binhex:4 iaid",
+"embed uint32 t1",
+"embed uint32 t2",
+"encap 5 option",
+"encap 13 option",
+"define6 4 norequest index embed ia_ta",
+"embed uint32 iaid",
+"encap 5 option",
+"encap 13 option",
+"define6 5 norequest index embed ia_addr",
+"embed ip6address ia_addr",
+"embed uint32 pltime",
+"embed uint32 vltime",
+"encap 13 option",
+"define6 12 ip6address unicast",
+"define6 13 norequest embed status_code",
+"embed uint16 status_code",
+"embed optional string message",
+"define6 18 binhex interface_id",
+"define6 19 byte reconfigure_msg",
+"define6 20 flag reconfigure_accept",
+"define6 23 array ip6address name_servers",
+"define6 24 array domain domain_search",
+"define6 39 embed fqdn",
+"embed bitflags=00000NOS flags",
+"embed optional domain fqdn",
+"define6 82 request uint32 sol_max_rt",
+"define6 83 request uint32 inf_max_rt",
+#else
 "define 1 request ipaddress subnet_mask",
 "define 121 rfc3442 classless_static_routes",
 "define 249 rfc3442 ms_classless_static_routes",
@@ -403,5 +485,6 @@
 "encap 90 option",
 "encap 92 option",
 "define6 112 string mudurl",
+#endif
 NULL
 };
diff -r 558c8df5946f -r 8de19138a912 external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h
--- a/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h    Fri Sep 13 10:58:31 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h    Fri Sep 13 11:52:31 2019 +0000
@@ -25,8 +25,14 @@
  * SUCH DAMAGE.
  */
 
+#ifdef SMALL
+#define INITDEFINES          25
+#define INITDEFINENDS         6
+#define INITDEFINE6S         14
+#else
 #define INITDEFINES         124
 #define INITDEFINENDS         6
 #define INITDEFINE6S         69
+#endif
 
 extern const char * const dhcpcd_embedded_conf[];



Home | Main Index | Thread Index | Old Index