From 25a6200225d7673efd89bc4a5c0baa25cb1abfe1 Mon Sep 17 00:00:00 2001 From: roy Date: Sat, 22 Jun 2013 09:25:33 +0000 Subject: [PATCH] Import dhcpcd-6.0.1 with the following change: * Fix a compile issue on Big Endian machines --- external/bsd/dhcpcd/dist/defs.h | 4 ++-- external/bsd/dhcpcd/dist/dhcp6.c | 16 ++++++++-------- external/bsd/dhcpcd/dist/dhcp6.h | 6 +++++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/external/bsd/dhcpcd/dist/defs.h b/external/bsd/dhcpcd/dist/defs.h index 9ed2609aecf9..be7ee34446c7 100644 --- a/external/bsd/dhcpcd/dist/defs.h +++ b/external/bsd/dhcpcd/dist/defs.h @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.1.1.27 2013/06/21 19:33:08 roy Exp $ */ +/* $NetBSD: defs.h,v 1.1.1.28 2013/06/22 09:25:34 roy Exp $ */ /* * dhcpcd - DHCP client daemon @@ -30,7 +30,7 @@ #define CONFIG_H #define PACKAGE "dhcpcd" -#define VERSION "6.0.0" +#define VERSION "6.0.1" #ifndef CONFIG # define CONFIG SYSCONFDIR "/" PACKAGE ".conf" diff --git a/external/bsd/dhcpcd/dist/dhcp6.c b/external/bsd/dhcpcd/dist/dhcp6.c index ce53a85c57f8..e33caaed9f51 100644 --- a/external/bsd/dhcpcd/dist/dhcp6.c +++ b/external/bsd/dhcpcd/dist/dhcp6.c @@ -1,5 +1,5 @@ #include - __RCSID("$NetBSD: dhcp6.c,v 1.1.1.1 2013/06/21 19:33:08 roy Exp $"); + __RCSID("$NetBSD: dhcp6.c,v 1.1.1.2 2013/06/22 09:25:33 roy Exp $"); /* * dhcpcd - DHCP client daemon @@ -626,19 +626,19 @@ dhcp6_makemessage(struct interface *ifp) p = D6_OPTION_DATA(o); switch (ifo->fqdn) { case FQDN_BOTH: - *p = 0x01; + *p = D6_FQDN_BOTH; break; case FQDN_PTR: - *p = 0x00; + *p = D6_FQDN_PTR; break; default: - *p = 0x04; + *p = D6_FQDN_NONE; break; } - o->len = encode_rfc1035(hostname, p + 1); - if (o->len == 0) - *p = 0x04; - o->len = htons(++o->len); + l = encode_rfc1035(hostname, p + 1); + if (l == 0) + *p = D6_FQDN_NONE; + o->len = htons(l + 1); } if (n_options) { diff --git a/external/bsd/dhcpcd/dist/dhcp6.h b/external/bsd/dhcpcd/dist/dhcp6.h index 7e6b1209bb94..c469c6c94b4a 100644 --- a/external/bsd/dhcpcd/dist/dhcp6.h +++ b/external/bsd/dhcpcd/dist/dhcp6.h @@ -1,4 +1,4 @@ -/* $NetBSD: dhcp6.h,v 1.1.1.1 2013/06/21 19:33:08 roy Exp $ */ +/* $NetBSD: dhcp6.h,v 1.1.1.2 2013/06/22 09:25:34 roy Exp $ */ /* * dhcpcd - DHCP client daemon @@ -85,6 +85,10 @@ #define D6_OPTION_POSIX_TIMEZONE 41 #define D6_OPTION_TZDB_TIMEZONE 42 +#define D6_FQDN_PTR 0x00 +#define D6_FQDN_BOTH 0x01 +#define D6_FQDN_NONE 0x04 + #include "dhcp.h" #include "ipv6.h" extern const struct dhcp_opt dhcp6_opts[];