From c215d97dcd08c8aee48bd0d8f12d4a2ed1a855ec Mon Sep 17 00:00:00 2001 From: Eric Sauvageau Date: Fri, 13 Dec 2019 21:12:39 -0500 Subject: [PATCH 01/78] faketc: fix building for RT-AC87U --- release/src/router/faketc/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/src/router/faketc/Makefile b/release/src/router/faketc/Makefile index 9d7340760ff..f22b28d7f46 100644 --- a/release/src/router/faketc/Makefile +++ b/release/src/router/faketc/Makefile @@ -9,6 +9,10 @@ LDFLAGS = -L$(TOP)/nvram${BCMEX}${EX7} -lnvram -L$(TOP)/shared -lshared ifeq ($(HND_ROUTER),y) LDFLAGS += -L$(TOP)/wlcsm -lwlcsm endif +ifeq ($(RTCONFIG_QTN),y) +CFLAGS += -I$(TOP)/libqcsapi_client +LDFLAGS += -L$(TOP)/libqcsapi_client -lqcsapi_client +endif PACKAGE=faketc OBJS=$(PACKAGE).o From dfea95bcb39a5258fdd861d9f6552597ff013801 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sun, 15 Dec 2019 23:23:56 +0500 Subject: [PATCH 02/78] odhcp6c/rc: update to 1.1-97-ge199804 odhcp6c: sync multiple fixes from openwrt upstream rc: fix ra-updated script error (unknown interface) rc: drop 82 and 83 opts, they are being added automatically now --- release/src/router/odhcp6c/VERSION | 2 +- release/src/router/odhcp6c/src/dhcpv6.c | 203 +++++---- release/src/router/odhcp6c/src/odhcp6c.c | 552 +++++++++++++++++++++-- release/src/router/odhcp6c/src/odhcp6c.h | 91 +++- release/src/router/odhcp6c/src/ra.c | 174 ++++--- release/src/router/odhcp6c/src/ra.h | 10 + release/src/router/odhcp6c/src/script.c | 19 +- release/src/router/rc/udhcpc.c | 4 +- 8 files changed, 861 insertions(+), 194 deletions(-) diff --git a/release/src/router/odhcp6c/VERSION b/release/src/router/odhcp6c/VERSION index e7f1ae56f0d..a928d90d6e8 100644 --- a/release/src/router/odhcp6c/VERSION +++ b/release/src/router/odhcp6c/VERSION @@ -1 +1 @@ -v1.1-71-g51733a6 +v1.1-97-ge199804 diff --git a/release/src/router/odhcp6c/src/dhcpv6.c b/release/src/router/odhcp6c/src/dhcpv6.c index a7f24c3d351..847d80dd1eb 100644 --- a/release/src/router/odhcp6c/src/dhcpv6.c +++ b/release/src/router/odhcp6c/src/dhcpv6.c @@ -1,6 +1,6 @@ /** * Copyright (C) 2012-2014 Steven Barth - * Copyright (C) 2017 Hans Dedecker + * Copyright (C) 2017-2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -59,7 +59,7 @@ static bool dhcpv6_response_is_valid(const void *buf, ssize_t len, const uint8_t transaction[3], enum dhcpv6_msg type, const struct in6_addr *daddr); -static int dhcpv6_parse_ia(void *opt, void *end); +static unsigned int dhcpv6_parse_ia(void *opt, void *end); static int dhcpv6_calc_refresh_timers(void); static void dhcpv6_handle_status_code(_unused const enum dhcpv6_msg orig, @@ -103,7 +103,6 @@ static int ifindex = -1; static int64_t t1 = 0, t2 = 0, t3 = 0; // IA states -static int request_prefix = -1; static enum odhcp6c_ia_mode na_mode = IA_MODE_NONE, pd_mode = IA_MODE_NONE; static bool accept_reconfig = false; // Server unicast address @@ -135,13 +134,14 @@ int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout) sock = fflags(sock, O_CLOEXEC); #endif if (sock < 0) - return -1; + goto failure; // Detect interface struct ifreq ifr; - strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name) - 1); if (ioctl(sock, SIOCGIFINDEX, &ifr) < 0) - return -1; + goto failure; ifindex = ifr.ifr_ifindex; @@ -187,13 +187,10 @@ int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout) htons(DHCPV6_OPT_SIP_SERVER_A), htons(DHCPV6_OPT_DNS_SERVERS), htons(DHCPV6_OPT_DNS_DOMAIN), - htons(DHCPV6_OPT_UNICAST), htons(DHCPV6_OPT_SNTP_SERVERS), htons(DHCPV6_OPT_NTP_SERVER), htons(DHCPV6_OPT_AFTR_NAME), htons(DHCPV6_OPT_PD_EXCLUDE), - htons(DHCPV6_OPT_SOL_MAX_RT), - htons(DHCPV6_OPT_INF_MAX_RT), #ifdef EXT_CER_ID htons(DHCPV6_OPT_CER_ID), #endif @@ -203,33 +200,49 @@ int init_dhcpv6(const char *ifname, unsigned int options, int sol_timeout) }; odhcp6c_add_state(STATE_ORO, oro, sizeof(oro)); } + // Required oro + uint16_t req_oro[] = { + htons(DHCPV6_OPT_INF_MAX_RT), + htons(DHCPV6_OPT_SOL_MAX_RT), + htons(DHCPV6_OPT_INFO_REFRESH), + }; + odhcp6c_add_state(STATE_ORO, req_oro, sizeof(req_oro)); // Configure IPv6-options int val = 1; - setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val)); - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)); - setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val)); - setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)); + if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val)) < 0) + goto failure; + + if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) + goto failure; + + if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val)) < 0) + goto failure; + + if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)) < 0) + goto failure; struct sockaddr_in6 client_addr = { .sin6_family = AF_INET6, .sin6_port = htons(DHCPV6_CLIENT_PORT), .sin6_flowinfo = 0 }; if (bind(sock, (struct sockaddr*)&client_addr, sizeof(client_addr)) < 0) - return -1; + goto failure; return 0; + +failure: + if (sock >= 0) + close(sock); + + return -1; } enum { IOV_HDR=0, IOV_ORO, - IOV_ORO_REFRESH, IOV_CL_ID, IOV_SRV_ID, - IOV_VENDOR_CLASS_HDR, - IOV_VENDOR_CLASS, - IOV_USER_CLASS_HDR, - IOV_USER_CLASS, + IOV_OPTS, IOV_RECONF_ACCEPT, IOV_FQDN, IOV_HDR_IA_NA, @@ -388,9 +401,6 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) } } - if (ia_pd_entries > 0) - request_prefix = 1; - // Build IA_NAs size_t ia_na_entries, ia_na_len = 0; void *ia_na = NULL; @@ -428,27 +438,39 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) uint16_t length; } reconf_accept = {htons(DHCPV6_OPT_RECONF_ACCEPT), 0}; - // Request Information Refresh - uint16_t oro_refresh = htons(DHCPV6_OPT_INFO_REFRESH); + // Option list + size_t opts_len; + void *opts = odhcp6c_get_state(STATE_OPTS, &opts_len); - // Build vendor-class option - size_t vendor_class_len, user_class_len; - struct dhcpv6_vendorclass *vendor_class = odhcp6c_get_state(STATE_VENDORCLASS, &vendor_class_len); - void *user_class = odhcp6c_get_state(STATE_USERCLASS, &user_class_len); + // Option Request List + size_t oro_entries, oro_len = 0; + uint16_t *oro, *s_oro = odhcp6c_get_state(STATE_ORO, &oro_entries); - struct { - uint16_t type; - uint16_t length; - } vendor_class_hdr = {htons(DHCPV6_OPT_VENDOR_CLASS), htons(vendor_class_len)}; + oro_entries /= sizeof(*s_oro); + oro = alloca(oro_entries * sizeof(*oro)); - struct { - uint16_t type; - uint16_t length; - } user_class_hdr = {htons(DHCPV6_OPT_USER_CLASS), htons(user_class_len)}; + for (size_t i = 0; i < oro_entries; i++) { + struct odhcp6c_opt *opt = odhcp6c_find_opt(htons(s_oro[i])); + + if (opt) { + if (!(opt->flags & OPT_ORO)) + continue; + + if ((opt->flags & OPT_ORO_SOLICIT) && type != DHCPV6_MSG_SOLICIT) + continue; + + if ((opt->flags & OPT_ORO_STATELESS) && type != DHCPV6_MSG_INFO_REQ) + continue; + + if ((opt->flags & OPT_ORO_STATEFUL) && type == DHCPV6_MSG_INFO_REQ) + continue; + } + + oro[oro_len++] = s_oro[i]; + } + oro_len *= sizeof(*oro); // Prepare Header - size_t oro_len; - void *oro = odhcp6c_get_state(STATE_ORO, &oro_len); struct { uint8_t type; uint8_t trid[3]; @@ -467,13 +489,9 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) struct iovec iov[IOV_TOTAL] = { [IOV_HDR] = {&hdr, sizeof(hdr)}, [IOV_ORO] = {oro, oro_len}, - [IOV_ORO_REFRESH] = {&oro_refresh, 0}, [IOV_CL_ID] = {cl_id, cl_id_len}, [IOV_SRV_ID] = {srv_id, srv_id_len}, - [IOV_VENDOR_CLASS_HDR] = {&vendor_class_hdr, vendor_class_len ? sizeof(vendor_class_hdr) : 0}, - [IOV_VENDOR_CLASS] = {vendor_class, vendor_class_len}, - [IOV_USER_CLASS_HDR] = {&user_class_hdr, user_class_len ? sizeof(user_class_hdr) : 0}, - [IOV_USER_CLASS] = {user_class, user_class_len}, + [IOV_OPTS] = { opts, opts_len }, [IOV_RECONF_ACCEPT] = {&reconf_accept, sizeof(reconf_accept)}, [IOV_FQDN] = {&fqdn, fqdn_len}, [IOV_HDR_IA_NA] = {&hdr_ia_na, sizeof(hdr_ia_na)}, @@ -482,12 +500,8 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) }; size_t cnt = IOV_TOTAL; - if (type == DHCPV6_MSG_INFO_REQ) { - cnt = 9; - iov[IOV_ORO_REFRESH].iov_len = sizeof(oro_refresh); - hdr.oro_len = htons(oro_len + sizeof(oro_refresh)); - } else if (!request_prefix) - cnt = 13; + if (type == DHCPV6_MSG_INFO_REQ) + cnt = IOV_HDR_IA_NA; // Disable IAs if not used if (type != DHCPV6_MSG_SOLICIT && ia_na_len == 0) @@ -637,8 +651,10 @@ int dhcpv6_request(enum dhcpv6_msg type) // Set timeout for receiving uint64_t t = round_end - round_start; struct timeval tv = {t / 1000, (t % 1000) * 1000}; - setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, - &tv, sizeof(tv)); + if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, + &tv, sizeof(tv)) < 0) + syslog(LOG_ERR, "setsockopt SO_RCVTIMEO failed (%s)", + strerror(errno)); // Receive cycle len = recvmsg(sock, &msg, 0); @@ -851,7 +867,8 @@ static int dhcpv6_handle_advert(enum dhcpv6_msg orig, const int rc, dhcpv6_for_each_option(opt, end, otype, olen, odata) { if (orig == DHCPV6_MSG_SOLICIT && - (otype == DHCPV6_OPT_IA_PD || otype == DHCPV6_OPT_IA_NA) && + ((otype == DHCPV6_OPT_IA_PD && pd_mode != IA_MODE_NONE) || + (otype == DHCPV6_OPT_IA_NA && na_mode != IA_MODE_NONE)) && olen > -4 + sizeof(struct dhcpv6_ia_hdr)) { struct dhcpv6_ia_hdr *ia_hdr = (void*)(&odata[-4]); dhcpv6_parse_ia(ia_hdr, odata + olen + sizeof(*ia_hdr)); @@ -864,7 +881,9 @@ static int dhcpv6_handle_advert(enum dhcpv6_msg orig, const int rc, cand.preference >= 0) { cand.preference = pref = odata[0]; } else if (otype == DHCPV6_OPT_UNICAST && olen == sizeof(cand.server_addr)) { - cand.server_addr = *(struct in6_addr *)odata; + if (!(client_options & DHCPV6_IGNORE_OPT_UNICAST)) + cand.server_addr = *(struct in6_addr *)odata; + } else if (otype == DHCPV6_OPT_RECONF_ACCEPT) { cand.wants_reconfigure = true; } else if (otype == DHCPV6_OPT_SOL_MAX_RT && olen == 4) { @@ -879,7 +898,7 @@ static int dhcpv6_handle_advert(enum dhcpv6_msg orig, const int rc, inf_max_rt <= DHCPV6_INF_MAX_RT_MAX) cand.inf_max_rt = inf_max_rt; - } else if (otype == DHCPV6_OPT_IA_PD && request_prefix && + } else if (otype == DHCPV6_OPT_IA_PD && olen >= -4 + sizeof(struct dhcpv6_ia_hdr)) { struct dhcpv6_ia_hdr *h = (struct dhcpv6_ia_hdr*)&odata[-4]; uint8_t *oend = odata + olen, *d; @@ -962,6 +981,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, uint16_t otype, olen; uint32_t refresh = 86400; int ret = 1; + unsigned int updated_IAs = 0; bool handled_status_codes[_DHCPV6_Status_Max] = { false, }; odhcp6c_expire(); @@ -1016,7 +1036,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, // Parse and find all matching IAs dhcpv6_for_each_option(opt, end, otype, olen, odata) { - bool passthru = true; + struct odhcp6c_opt *dopt = odhcp6c_find_opt(otype); if ((otype == DHCPV6_OPT_IA_PD || otype == DHCPV6_OPT_IA_NA) && olen > -4 + sizeof(struct dhcpv6_ia_hdr)) { @@ -1058,18 +1078,18 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, if (code != DHCPV6_Success) continue; - dhcpv6_parse_ia(ia_hdr, odata + olen); - passthru = false; + updated_IAs += dhcpv6_parse_ia(ia_hdr, odata + olen); } else if (otype == DHCPV6_OPT_UNICAST && olen == sizeof(server_addr)) { - server_addr = *(struct in6_addr *)odata; - passthru = false; - } else if (otype == DHCPV6_OPT_STATUS && olen >= 2) { + if (!(client_options & DHCPV6_IGNORE_OPT_UNICAST)) + server_addr = *(struct in6_addr *)odata; + + } + else if (otype == DHCPV6_OPT_STATUS && olen >= 2) { uint8_t *mdata = (olen > 2) ? &odata[2] : NULL; uint16_t mlen = (olen > 2) ? olen - 2 : 0; uint16_t code = ((int)odata[0]) << 8 | ((int)odata[1]); dhcpv6_handle_status_code(orig, code, mdata, mlen, &ret); - passthru = false; } else if (otype == DHCPV6_OPT_DNS_SERVERS) { if (olen % 16 == 0) odhcp6c_add_state(STATE_DNS, odata, olen); @@ -1099,7 +1119,6 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, odhcp6c_add_state(STATE_SIP_FQDN, odata, olen); else if (otype == DHCPV6_OPT_INFO_REFRESH && olen >= 4) { refresh = ntohl_unaligned(odata); - passthru = false; } else if (otype == DHCPV6_OPT_AUTH) { if (olen == -4 + sizeof(struct dhcpv6_auth_reconfigure)) { struct dhcpv6_auth_reconfigure *r = (void*)&odata[-4]; @@ -1107,25 +1126,21 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, r->reconf_type == 1) memcpy(reconf_key, r->key, sizeof(r->key)); } - passthru = false; } else if (otype == DHCPV6_OPT_AFTR_NAME && olen > 3) { size_t cur_len; odhcp6c_get_state(STATE_AFTR_NAME, &cur_len); if (cur_len == 0) odhcp6c_add_state(STATE_AFTR_NAME, odata, olen); - passthru = false; } else if (otype == DHCPV6_OPT_SOL_MAX_RT && olen == 4) { uint32_t sol_max_rt = ntohl_unaligned(odata); if (sol_max_rt >= DHCPV6_SOL_MAX_RT_MIN && sol_max_rt <= DHCPV6_SOL_MAX_RT_MAX) dhcpv6_retx[DHCPV6_MSG_SOLICIT].max_timeo = sol_max_rt; - passthru = false; } else if (otype == DHCPV6_OPT_INF_MAX_RT && olen == 4) { uint32_t inf_max_rt = ntohl_unaligned(odata); if (inf_max_rt >= DHCPV6_INF_MAX_RT_MIN && inf_max_rt <= DHCPV6_INF_MAX_RT_MAX) dhcpv6_retx[DHCPV6_MSG_INFO_REQ].max_timeo = inf_max_rt; - passthru = false; #ifdef EXT_CER_ID } else if (otype == DHCPV6_OPT_CER_ID && olen == -4 + sizeof(struct dhcpv6_cer_id)) { @@ -1133,32 +1148,20 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, struct in6_addr any = IN6ADDR_ANY_INIT; if (memcmp(&cer_id->addr, &any, sizeof(any))) odhcp6c_add_state(STATE_CER, &cer_id->addr, sizeof(any)); - passthru = false; #endif } else if (otype == DHCPV6_OPT_S46_CONT_MAPT) { odhcp6c_add_state(STATE_S46_MAPT, odata, olen); - passthru = false; } else if (otype == DHCPV6_OPT_S46_CONT_MAPE) { size_t mape_len; odhcp6c_get_state(STATE_S46_MAPE, &mape_len); if (mape_len == 0) odhcp6c_add_state(STATE_S46_MAPE, odata, olen); - passthru = false; } else if (otype == DHCPV6_OPT_S46_CONT_LW) { odhcp6c_add_state(STATE_S46_LW, odata, olen); - passthru = false; - } else if (otype == DHCPV6_OPT_CLIENTID || - otype == DHCPV6_OPT_SERVERID || - otype == DHCPV6_OPT_IA_TA || - otype == DHCPV6_OPT_PREF || - otype == DHCPV6_OPT_UNICAST || - otype == DHCPV6_OPT_FQDN || - otype == DHCPV6_OPT_RECONF_ACCEPT) - passthru = false; - else + } else odhcp6c_add_state(STATE_CUSTOM_OPTS, &odata[-4], olen + 4); - if (passthru) + if (!dopt || !(dopt->flags & OPT_NO_PASSTHRU)) odhcp6c_add_state(STATE_PASSTHRU, &odata[-4], olen + 4); } } @@ -1177,14 +1180,26 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, odhcp6c_clear_state(STATE_SERVER_ADDR); odhcp6c_add_state(STATE_SERVER_ADDR, &from->sin6_addr, 16); } else if (orig == DHCPV6_MSG_RENEW) { - // Send further renews if T1 is not set - if (!t1) - ret = -1; + // Send further renews if T1 is not set and + // no updated IAs + if (!t1) { + if (!updated_IAs) + ret = -1; + else if ((t2 - t1) > 1) + // Grace period of 1 second + t1 = 1; + } } else if (orig == DHCPV6_MSG_REBIND) { - // Send further rebinds if T1 and T2 is not set - if (!t1 && !t2) - ret = -1; + // Send further rebinds if T1 and T2 is not set and + // no updated IAs + if (!t1 && !t2) { + if (!updated_IAs) + ret = -1; + else if ((t3 - t2) > 1) + // Grace period of 1 second + t2 = 1; + } odhcp6c_clear_state(STATE_SERVER_ADDR); odhcp6c_add_state(STATE_SERVER_ADDR, &from->sin6_addr, 16); @@ -1209,10 +1224,10 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, return ret; } -static int dhcpv6_parse_ia(void *opt, void *end) +static unsigned int dhcpv6_parse_ia(void *opt, void *end) { struct dhcpv6_ia_hdr *ia_hdr = (struct dhcpv6_ia_hdr *)opt; - int parsed_ia = 0; + unsigned int updated_IAs = 0; uint32_t t1, t2; uint16_t otype, olen; uint8_t *odata; @@ -1288,8 +1303,8 @@ static int dhcpv6_parse_ia(void *opt, void *end) } if (ok) { - odhcp6c_update_entry(STATE_IA_PD, &entry, 0, 0); - parsed_ia++; + if (odhcp6c_update_entry(STATE_IA_PD, &entry, 0, 0)) + updated_IAs++; } entry.priority = 0; @@ -1313,11 +1328,11 @@ static int dhcpv6_parse_ia(void *opt, void *end) entry.length = 128; entry.target = addr->addr; - odhcp6c_update_entry(STATE_IA_NA, &entry, 0, 0); - parsed_ia++; + if (odhcp6c_update_entry(STATE_IA_NA, &entry, 0, 0)) + updated_IAs++; } } - return parsed_ia; + return updated_IAs; } static int dhcpv6_calc_refresh_timers(void) @@ -1534,7 +1549,7 @@ int dhcpv6_promote_server_cand(void) if (cand->ia_pd_len) { odhcp6c_add_state(STATE_IA_PD, cand->ia_pd, cand->ia_pd_len); free(cand->ia_pd); - if (request_prefix) + if (pd_mode != IA_MODE_NONE) ret = DHCPV6_STATEFUL; } diff --git a/release/src/router/odhcp6c/src/odhcp6c.c b/release/src/router/odhcp6c/src/odhcp6c.c index 3e51e92846b..8962cbc2194 100644 --- a/release/src/router/odhcp6c/src/odhcp6c.c +++ b/release/src/router/odhcp6c/src/odhcp6c.c @@ -1,6 +1,6 @@ /** * Copyright (C) 2012-2014 Steven Barth - * Copyright (C) 2017 Hans Dedecker + * Copyright (C) 2017-2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include #include @@ -45,9 +47,15 @@ ((((__const uint32_t *) (a))[0] & htonl (0xfe000000)) \ == htonl (0xfc000000)) #endif +#define ARRAY_SEP " ,\t" static void sighandler(int signal); static int usage(void); +static int add_opt(const uint16_t code, const uint8_t *data, + const uint16_t len); +static int parse_opt_data(const char *data, uint8_t **dst, + const unsigned int type, const bool array); +static int parse_opt(const char *opt); static uint8_t *state_data[_STATE_MAX] = {NULL}; static size_t state_len[_STATE_MAX] = {0}; @@ -65,6 +73,101 @@ static char *ifname = NULL; static unsigned int script_sync_delay = 10; static unsigned int script_accu_delay = 1; +static struct odhcp6c_opt opts[] = { + { .code = DHCPV6_OPT_CLIENTID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_SERVERID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_IA_NA, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str= NULL }, + { .code = DHCPV6_OPT_IA_TA, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_IA_ADDR, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ORO, .flags = OPT_INTERNAL, .str = NULL }, + { .code = DHCPV6_OPT_PREF, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ELAPSED, .flags = OPT_INTERNAL, .str = NULL }, + { .code = DHCPV6_OPT_RELAY_MSG, .flags = OPT_INTERNAL, .str = NULL }, + { .code = DHCPV6_OPT_AUTH, .flags = OPT_U8 | OPT_NO_PASSTHRU, .str = "authentication" }, + { .code = DHCPV6_OPT_UNICAST, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_STATUS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_RAPID_COMMIT, .flags = OPT_INTERNAL, .str = NULL }, + { .code = DHCPV6_OPT_USER_CLASS, .flags = OPT_USER_CLASS | OPT_ARRAY, .str = "userclass" }, + { .code = DHCPV6_OPT_VENDOR_CLASS, .flags = OPT_U8, .str = "vendorclass" }, + { .code = DHCPV6_OPT_INTERFACE_ID, .flags = OPT_INTERNAL, .str = NULL }, + { .code = DHCPV6_OPT_RECONF_MESSAGE, .flags = OPT_INTERNAL, .str = NULL }, + { .code = DHCPV6_OPT_RECONF_ACCEPT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_SIP_SERVER_D, .flags = OPT_DNS_STR | OPT_ORO, .str = "sipserver_d" }, + { .code = DHCPV6_OPT_SIP_SERVER_A, .flags = OPT_IP6 | OPT_ARRAY | OPT_ORO, .str = "sipserver_a" }, + { .code = DHCPV6_OPT_DNS_SERVERS, .flags = OPT_IP6 | OPT_ARRAY | OPT_ORO, .str = "dns" }, + { .code = DHCPV6_OPT_DNS_DOMAIN, .flags = OPT_DNS_STR | OPT_ORO, .str = "search" }, + { .code = DHCPV6_OPT_IA_PD, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_IA_PREFIX, .flags = OPT_INTERNAL, .str = NULL }, + { .code = DHCPV6_OPT_SNTP_SERVERS, .flags = OPT_IP6 | OPT_ARRAY | OPT_ORO, .str = "sntpservers" }, + { .code = DHCPV6_OPT_INFO_REFRESH, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO | OPT_ORO_STATELESS, .str = NULL }, + { .code = DHCPV6_OPT_REMOTE_ID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_SUBSCRIBER_ID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_FQDN, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO, .str = NULL }, + { .code = DHCPV6_OPT_ERO, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_LQ_QUERY, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_CLIENT_DATA, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_CLT_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_LQ_RELAY_DATA, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_LQ_CLIENT_LINK, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_RELAY_ID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_NTP_SERVER, .flags = OPT_U8 | OPT_ORO, .str = "ntpserver" }, + { .code = DHCPV6_OPT_CLIENT_ARCH_TYPE, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_AFTR_NAME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO, .str = NULL }, + { .code = DHCPV6_OPT_RSOO, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_PD_EXCLUDE, .flags = OPT_INTERNAL | OPT_ORO | OPT_ORO_STATEFUL, .str = NULL }, + { .code = DHCPV6_OPT_VSS, .flags = OPT_U8, .str = "vss" }, + { .code = DHCPV6_OPT_LINK_LAYER_ADDRESS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_LINK_ADDRESS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_RADIUS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_SOL_MAX_RT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO | OPT_ORO_SOLICIT, .str = NULL }, + { .code = DHCPV6_OPT_INF_MAX_RT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO | OPT_ORO_STATELESS, .str = NULL }, +#ifdef EXT_CER_ID + { .code = DHCPV6_OPT_CER_ID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, +#endif + { .code = DHCPV6_OPT_DHCPV4_MSG, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_S46_RULE, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_S46_BR, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_S46_DMR, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_S46_V4V6BIND, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_S46_PORTPARAMS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_S46_CONT_MAPE, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO, .str = NULL }, + { .code = DHCPV6_OPT_S46_CONT_MAPT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO, .str = NULL }, + { .code = DHCPV6_OPT_S46_CONT_LW, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU | OPT_ORO, .str = NULL }, + { .code = DHCPV6_OPT_LQ_BASE_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_LQ_START_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_LQ_END_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ANI_ATT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ANI_NETWORK_NAME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ANI_AP_NAME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ANI_AP_BSSID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ANI_OPERATOR_ID, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_ANI_OPERATOR_REALM, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_MUD_URL_V6, .flags = OPT_STR | OPT_NO_PASSTHRU, .str = "mud_url_v6" }, + { .code = DHCPV6_OPT_F_BINDING_STATUS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_CONNECT_FLAGS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_DNS_REMOVAL_INFO, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_DNS_HOST_NAME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_DNS_ZONE_NAME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_DNS_FLAGS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_EXPIRATION_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_MAX_UNACKED_BNDUPD, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_MCLT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_PARTNER_LIFETIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_PARTNER_LIFETIME_SENT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_PARTNER_DOWN_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_PARTNER_RAW_CLT_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_PROTOCOL_VERSION, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_KEEPALIVE_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_RECONFIGURE_DATA, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_RELATIONSHIP_NAME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_SERVER_FLAGS, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_SERVER_STATE, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_START_TIME_OF_STATE, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_F_STATE_EXPIRATION_TIME, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = DHCPV6_OPT_RELAY_PORT, .flags = OPT_INTERNAL | OPT_NO_PASSTHRU, .str = NULL }, + { .code = 0, .flags = 0, .str = NULL }, +}; + int main(_unused int argc, char* const argv[]) { static struct in6_addr ifid = IN6ADDR_ANY_INIT; @@ -72,23 +175,23 @@ int main(_unused int argc, char* const argv[]) const char *pidfile = NULL; const char *script = "/usr/sbin/odhcp6c-update"; ssize_t l; - uint8_t buf[134]; + uint8_t buf[134], *o_data; char *optpos; uint16_t opttype; - uint16_t optlen; enum odhcp6c_ia_mode ia_na_mode = IA_MODE_TRY; enum odhcp6c_ia_mode ia_pd_mode = IA_MODE_NONE; + struct odhcp6c_opt *opt; int ia_pd_iaid_index = 0; int sol_timeout = DHCPV6_SOL_MAX_RT; int verbosity = 0; bool help = false, daemonize = false; int logopt = LOG_PID; - int c; + int c, res; unsigned int client_options = DHCPV6_CLIENT_FQDN | DHCPV6_ACCEPT_RECONFIGURE; unsigned int ra_options = RA_RDNSS_DEFAULT_LIFETIME; unsigned int ra_holdoff_interval = RA_MIN_ADV_INTERVAL; - while ((c = getopt(argc, argv, "S::N:V:P:FB:c:i:r:Ru:s:kt:m:Lhedp:fav")) != -1) { + while ((c = getopt(argc, argv, "S::N:V:P:FB:c:i:r:Ru:Ux:s:kt:m:Lhedp:fav")) != -1) { switch (c) { case 'S': allow_slaac_only = (optarg) ? atoi(optarg) : -1; @@ -107,11 +210,27 @@ int main(_unused int argc, char* const argv[]) break; case 'V': - l = script_unhexlify(buf, sizeof(buf), optarg); - if (!l) + opt = odhcp6c_find_opt(DHCPV6_OPT_VENDOR_CLASS); + if (!opt) { + syslog(LOG_ERR, "Failed to set vendor-class option"); + return 1; + } + + o_data = NULL; + res = parse_opt_data(optarg, &o_data, opt->flags & OPT_MASK_SIZE, + (opt->flags & OPT_ARRAY) == OPT_ARRAY); + if (res > 0) { + res = add_opt(opt->code, o_data, res); + if (res) { + if (res > 0) + return 1; + + help = true; + } + } else help = true; - odhcp6c_add_state(STATE_VENDORCLASS, buf, l); + free(o_data); break; case 'P': @@ -139,7 +258,10 @@ int main(_unused int argc, char* const argv[]) else prefix.iaid = htonl(++ia_pd_iaid_index); - odhcp6c_add_state(STATE_IA_PD_INIT, &prefix, sizeof(prefix)); + if (odhcp6c_add_state(STATE_IA_PD_INIT, &prefix, sizeof(prefix))) { + syslog(LOG_ERR, "Failed to set request IPv6-Prefix"); + return 1; + } break; case 'F': @@ -154,7 +276,10 @@ int main(_unused int argc, char* const argv[]) buf[1] = DHCPV6_OPT_CLIENTID; buf[2] = 0; buf[3] = l; - odhcp6c_add_state(STATE_CLIENT_ID, buf, l + 4); + if (odhcp6c_add_state(STATE_CLIENT_ID, buf, l + 4)) { + syslog(LOG_ERR, "Failed to override client-ID"); + return 1; + } } else help = true; break; @@ -173,7 +298,10 @@ int main(_unused int argc, char* const argv[]) else if (optpos[0]) optarg = &optpos[1]; - odhcp6c_add_state(STATE_ORO, &opttype, 2); + if (odhcp6c_add_state(STATE_ORO, &opttype, 2)) { + syslog(LOG_ERR, "Failed to add requested option"); + return 1; + } } break; @@ -182,9 +310,31 @@ int main(_unused int argc, char* const argv[]) break; case 'u': - optlen = htons(strlen(optarg)); - odhcp6c_add_state(STATE_USERCLASS, &optlen, 2); - odhcp6c_add_state(STATE_USERCLASS, optarg, strlen(optarg)); + opt = odhcp6c_find_opt(DHCPV6_OPT_USER_CLASS); + if (!opt) { + syslog(LOG_ERR, "Failed to set user-class option"); + return 1; + } + + o_data = NULL; + res = parse_opt_data(optarg, &o_data, opt->flags & OPT_MASK_SIZE, + (opt->flags & OPT_ARRAY) == OPT_ARRAY); + if (res > 0) { + res = add_opt(opt->code, o_data, res); + if (res) { + if (res > 0) + return 1; + + help = true; + } + } else + help = true; + + free(o_data); + break; + + case 'U': + client_options |= DHCPV6_IGNORE_OPT_UNICAST; break; case 's': @@ -231,6 +381,16 @@ int main(_unused int argc, char* const argv[]) ++verbosity; break; + case 'x': + res = parse_opt(optarg); + if (res) { + if (res > 0) + return res; + + help = true; + } + break; + default: help = true; break; @@ -311,7 +471,7 @@ int main(_unused int argc, char* const argv[]) continue; do { - int res = dhcpv6_request(mode == DHCPV6_STATELESS ? + res = dhcpv6_request(mode == DHCPV6_STATELESS ? DHCPV6_MSG_INFO_REQ : DHCPV6_MSG_REQUEST); bool signalled = odhcp6c_signal_process(); @@ -337,7 +497,7 @@ int main(_unused int argc, char* const argv[]) signal_usr1 = false; script_call("informed", script_sync_delay, true); - int res = dhcpv6_poll_reconfigure(); + res = dhcpv6_poll_reconfigure(); odhcp6c_signal_process(); if (res > 0) @@ -369,7 +529,7 @@ int main(_unused int argc, char* const argv[]) while (!signal_usr2 && !signal_term) { // Renew Cycle // Wait for T1 to expire or until we get a reconfigure - int res = dhcpv6_poll_reconfigure(); + res = dhcpv6_poll_reconfigure(); odhcp6c_signal_process(); if (res > 0) { script_call("updated", 0, false); @@ -452,6 +612,12 @@ static int usage(void) " -F Force IPv6-Prefix\n" " -V Set vendor-class option (base-16 encoded)\n" " -u Set user-class option string\n" + " -x : Add option opt (with value val) in sent packets (cumulative)\n" + " Examples of IPv6 address, string and base-16 encoded options:\n" + " -x dns:2001:2001::1,2001:2001::2 - option 23\n" + " -x 15:office - option 15 (userclass)\n" + " -x 0x1f4:ABBA - option 500\n" + " -x 202:'\"file\"' - option 202\n" " -c Override client-ID (base-16 encoded 16-bit type + value)\n" " -i Use a custom interface identifier for RA handling\n" " -r Options to be requested (comma-separated)\n" @@ -463,6 +629,7 @@ static int usage(void) " -t Maximum timeout for DHCPv6-SOLICIT (120)\n" " -m Minimum time between accepting RA updates (3)\n" " -L Ignore default lifetime for RDNSS records\n" + " -U Ignore Server Unicast option\n" "\nInvocation options:\n" " -p Set pidfile (/var/run/odhcp6c.pid)\n" " -d Daemonize\n" @@ -528,12 +695,16 @@ void odhcp6c_clear_state(enum odhcp6c_state state) state_len[state] = 0; } -void odhcp6c_add_state(enum odhcp6c_state state, const void *data, size_t len) +int odhcp6c_add_state(enum odhcp6c_state state, const void *data, size_t len) { uint8_t *n = odhcp6c_resize_state(state, len); - if (n) - memcpy(n, data, len); + if (!n) + return -1; + + memcpy(n, data, len); + + return 0; } int odhcp6c_insert_state(enum odhcp6c_state state, size_t offset, const void *data, size_t len) @@ -626,8 +797,8 @@ bool odhcp6c_update_entry(enum odhcp6c_state state, struct odhcp6c_entry *new, x->t1 = new->t1; x->t2 = new->t2; x->iaid = new->iaid; - } else - odhcp6c_add_state(state, new, odhcp6c_entry_size(new)); + } else if (odhcp6c_add_state(state, new, odhcp6c_entry_size(new))) + return false; } else if (x) odhcp6c_remove_state(state, ((uint8_t*)x) - start, odhcp6c_entry_size(x)); @@ -671,6 +842,20 @@ static void odhcp6c_expire_list(enum odhcp6c_state state, uint32_t elapsed) } } +static uint8_t *odhcp6c_state_find_opt(const uint16_t code) +{ + size_t opts_len; + uint8_t *odata, *opts = odhcp6c_get_state(STATE_OPTS, &opts_len); + uint16_t otype, olen; + + dhcpv6_for_each_option(opts, &opts[opts_len], otype, olen, odata) { + if (otype == code) + return &odata[-4]; + } + + return NULL; +} + void odhcp6c_expire(void) { time_t now = odhcp6c_get_milli_time() / 1000; @@ -705,6 +890,7 @@ bool odhcp6c_addr_in_scope(const struct in6_addr *addr) { FILE *fd = fopen("/proc/net/if_inet6", "r"); int len; + bool ret = false; char buf[256]; if (fd == NULL) @@ -719,13 +905,13 @@ bool odhcp6c_addr_in_scope(const struct in6_addr *addr) len = strlen(buf); if ((len <= 0) || buf[len - 1] != '\n') - return false; + break; buf[--len] = '\0'; if (sscanf(buf, "%s %x %x %x %x %s", addr_buf, &dummy, &dummy, &dummy, &flags, name) != 6) - return false; + break; if (strcmp(name, ifname) || (flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE | IFA_F_DEPRECATED))) @@ -733,7 +919,7 @@ bool odhcp6c_addr_in_scope(const struct in6_addr *addr) for (i = 0; i < strlen(addr_buf); i++) { if (!isxdigit(addr_buf[i]) || isupper(addr_buf[i])) - return false; + break; } memset(&inet6_addr, 0, sizeof(inet6_addr)); @@ -746,11 +932,14 @@ bool odhcp6c_addr_in_scope(const struct in6_addr *addr) } if ((IN6_IS_ADDR_LINKLOCAL(&inet6_addr) == IN6_IS_ADDR_LINKLOCAL(addr)) && - (IN6_IS_ADDR_UNIQUELOCAL(&inet6_addr) == IN6_IS_ADDR_UNIQUELOCAL(addr))) - return true; + (IN6_IS_ADDR_UNIQUELOCAL(&inet6_addr) == IN6_IS_ADDR_UNIQUELOCAL(addr))) { + ret = true; + break; + } } - return false; + fclose(fd); + return ret; } static void sighandler(int signal) @@ -764,3 +953,310 @@ static void sighandler(int signal) else signal_term = true; } + +static int add_opt(const uint16_t code, const uint8_t *data, const uint16_t len) +{ + struct { + uint16_t code; + uint16_t len; + } opt_hdr = { htons(code), htons(len) }; + + if (odhcp6c_state_find_opt(code)) + return -1; + + if (odhcp6c_add_state(STATE_OPTS, &opt_hdr, sizeof(opt_hdr)) || + odhcp6c_add_state(STATE_OPTS, data, len)) { + syslog(LOG_ERR, "Failed to add option %hu", code); + return 1; + } + + return 0; +} + +struct odhcp6c_opt *odhcp6c_find_opt(const uint16_t code) +{ + struct odhcp6c_opt *opt = opts; + + while (opt->code) { + if (opt->code == code) + return opt; + + opt++; + } + + return NULL; +} + +static struct odhcp6c_opt *odhcp6c_find_opt_by_name(const char *name) +{ + struct odhcp6c_opt *opt = opts; + + if (!name || !strlen(name)) + return NULL; + + while (opt->code && (!opt->str || strcmp(opt->str, name))) + opt++; + + return (opt->code > 0 ? opt : NULL); +} + +/* Find first occurrence of any character in the string + * within the string + * */ +static char *get_sep_pos(const char *haystack, const char *needles) +{ + unsigned int i; + char *first = NULL; + + for (i = 0; i < strlen(needles); i++) { + char *found = strchr(haystack, needles[i]); + if (found && ((found < first) || (first == NULL))) + first = found; + } + + return first; +} + +static int parse_opt_u8(const char *src, uint8_t **dst) +{ + int len = strlen(src); + + *dst = realloc(*dst, len/2); + if (!*dst) + return -1; + + return script_unhexlify(*dst, len, src); +} + +static int parse_opt_string(const char *src, uint8_t **dst, const bool array) +{ + int o_len = 0; + char *sep = get_sep_pos(src, ARRAY_SEP); + + if (sep && !array) + return -1; + + do { + if (sep) { + *sep = 0; + sep++; + } + + int len = strlen(src); + + *dst = realloc(*dst, o_len + len); + if (!*dst) + return -1; + + memcpy(&((*dst)[o_len]), src, len); + + o_len += len; + src = sep; + + if (sep) + sep = get_sep_pos(src, ARRAY_SEP); + } while (src); + + return o_len; +} + +static int parse_opt_dns_string(const char *src, uint8_t **dst, const bool array) +{ + int o_len = 0; + char *sep = get_sep_pos(src, ARRAY_SEP); + + if (sep && !array) + return -1; + + do { + uint8_t tmp[256]; + + if (sep) { + *sep = 0; + sep++; + } + + int len = dn_comp(src, tmp, sizeof(tmp), NULL, NULL); + if (len < 0) + return -1; + + *dst = realloc(*dst, o_len + len); + if (!*dst) + return -1; + + memcpy(&((*dst)[o_len]), tmp, len); + + o_len += len; + src = sep; + + if (sep) + sep = get_sep_pos(src, ARRAY_SEP); + } while (src); + + return o_len; +} + +static int parse_opt_ip6(const char *src, uint8_t **dst, const bool array) +{ + int o_len = 0; + char *sep = get_sep_pos(src, ARRAY_SEP); + + if (sep && !array) + return -1; + + do { + int len = sizeof(struct in6_addr); + + if (sep) { + *sep = 0; + sep++; + } + + *dst = realloc(*dst, o_len + len); + if (!*dst) + return -1; + + if (inet_pton(AF_INET6, src, &((*dst)[o_len])) < 1) + return -1; + + o_len += len; + src = sep; + + if (sep) + sep = get_sep_pos(src, ARRAY_SEP); + } while (src); + + return o_len; +} + +static int parse_opt_user_class(const char *src, uint8_t **dst, const bool array) +{ + int o_len = 0; + char *sep = get_sep_pos(src, ARRAY_SEP); + + if (sep && !array) + return -1; + + do { + if (sep) { + *sep = 0; + sep++; + } + uint16_t str_len = strlen(src); + + *dst = realloc(*dst, o_len + str_len + 2); + if (!*dst) + return -1; + + struct user_class { + uint16_t len; + uint8_t data[]; + } *e = (struct user_class *)&((*dst)[o_len]); + + e->len = ntohs(str_len); + memcpy(e->data, src, str_len); + + o_len += str_len + 2; + src = sep; + + if (sep) + sep = get_sep_pos(src, ARRAY_SEP); + } while (src); + + return o_len; +} + +static int parse_opt_data(const char *data, uint8_t **dst, const unsigned int type, + const bool array) +{ + int ret = 0; + + switch (type) { + case OPT_U8: + ret = parse_opt_u8(data, dst); + break; + + case OPT_STR: + ret = parse_opt_string(data, dst, array); + break; + + case OPT_DNS_STR: + ret = parse_opt_dns_string(data, dst, array); + break; + + case OPT_IP6: + ret = parse_opt_ip6(data, dst, array); + break; + + case OPT_USER_CLASS: + ret = parse_opt_user_class(data, dst, array); + break; + + default: + ret = -1; + break; + } + + return ret; +} + +static int parse_opt(const char *opt) +{ + uint32_t optn; + char *data; + uint8_t *payload = NULL; + int payload_len; + unsigned int type = OPT_U8; + bool array = false; + struct odhcp6c_opt *dopt = NULL; + int ret = -1; + + data = get_sep_pos(opt, ":"); + if (!data) + return -1; + + *data = '\0'; + data++; + + if (strlen(opt) == 0 || strlen(data) == 0) + return -1; + + dopt = odhcp6c_find_opt_by_name(opt); + if (!dopt) { + char *e; + optn = strtoul(opt, &e, 0); + if (*e || e == opt || optn > USHRT_MAX) + return -1; + + dopt = odhcp6c_find_opt(optn); + } else + optn = dopt->code; + + /* Check if the type for the content is well-known */ + if (dopt) { + /* Refuse internal options */ + if (dopt->flags & OPT_INTERNAL) + return -1; + + type = dopt->flags & OPT_MASK_SIZE; + array = ((dopt->flags & OPT_ARRAY) == OPT_ARRAY) ? true : false; + } else if (data[0] == '"' || data[0] == '\'') { + char *end = strrchr(data + 1, data[0]); + + if (end && (end == (data + strlen(data) - 1))) { + /* Raw option is specified as a string */ + type = OPT_STR; + data++; + *end = '\0'; + } + + } + + payload_len = parse_opt_data(data, &payload, type, array); + if (payload_len > 0) + ret = add_opt(optn, payload, payload_len); + + free(payload); + + return ret; +} diff --git a/release/src/router/odhcp6c/src/odhcp6c.h b/release/src/router/odhcp6c/src/odhcp6c.h index 9e13d024f18..5e29c27d664 100644 --- a/release/src/router/odhcp6c/src/odhcp6c.h +++ b/release/src/router/odhcp6c/src/odhcp6c.h @@ -1,5 +1,6 @@ /** * Copyright (C) 2012-2014 Steven Barth + * Copyright (C) 2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -52,26 +53,43 @@ enum dhcvp6_opt { DHCPV6_OPT_RAPID_COMMIT = 14, DHCPV6_OPT_USER_CLASS = 15, DHCPV6_OPT_VENDOR_CLASS = 16, + DHCPV6_OPT_INTERFACE_ID = 18, DHCPV6_OPT_RECONF_MESSAGE = 19, DHCPV6_OPT_RECONF_ACCEPT = 20, + DHCPV6_OPT_SIP_SERVER_D = 21, + DHCPV6_OPT_SIP_SERVER_A = 22, DHCPV6_OPT_DNS_SERVERS = 23, DHCPV6_OPT_DNS_DOMAIN = 24, DHCPV6_OPT_IA_PD = 25, DHCPV6_OPT_IA_PREFIX = 26, DHCPV6_OPT_SNTP_SERVERS = 31, DHCPV6_OPT_INFO_REFRESH = 32, + DHCPV6_OPT_REMOTE_ID = 37, + DHCPV6_OPT_SUBSCRIBER_ID = 38, DHCPV6_OPT_FQDN = 39, + DHCPV6_OPT_ERO = 43, + DHCPV6_OPT_LQ_QUERY = 44, + DHCPV6_OPT_CLIENT_DATA = 45, + DHCPV6_OPT_CLT_TIME = 46, + DHCPV6_OPT_LQ_RELAY_DATA = 47, + DHCPV6_OPT_LQ_CLIENT_LINK = 48, + DHCPV6_OPT_RELAY_ID = 53, DHCPV6_OPT_NTP_SERVER = 56, - DHCPV6_OPT_SIP_SERVER_D = 21, - DHCPV6_OPT_SIP_SERVER_A = 22, + DHCPV6_OPT_CLIENT_ARCH_TYPE = 61, DHCPV6_OPT_AFTR_NAME = 64, + DHCPV6_OPT_RSOO = 66, DHCPV6_OPT_PD_EXCLUDE = 67, + DHCPV6_OPT_VSS = 68, + DHCPV6_OPT_LINK_LAYER_ADDRESS = 79, + DHCPV6_OPT_LINK_ADDRESS = 80, + DHCPV6_OPT_RADIUS = 81, DHCPV6_OPT_SOL_MAX_RT = 82, DHCPV6_OPT_INF_MAX_RT = 83, #ifdef EXT_CER_ID /* draft-donley-dhc-cer-id-option-03 */ DHCPV6_OPT_CER_ID = EXT_CER_ID, #endif + DHCPV6_OPT_DHCPV4_MSG = 87, /* draft-ietf-softwire-map-dhcp-08 */ DHCPV6_OPT_S46_RULE = 89, DHCPV6_OPT_S46_BR = 90, @@ -81,6 +99,38 @@ enum dhcvp6_opt { DHCPV6_OPT_S46_CONT_MAPE = 94, DHCPV6_OPT_S46_CONT_MAPT = 95, DHCPV6_OPT_S46_CONT_LW = 96, + DHCPV6_OPT_LQ_BASE_TIME = 100, + DHCPV6_OPT_LQ_START_TIME = 101, + DHCPV6_OPT_LQ_END_TIME = 102, + DHCPV6_OPT_ANI_ATT = 105, + DHCPV6_OPT_ANI_NETWORK_NAME = 106, + DHCPV6_OPT_ANI_AP_NAME = 107, + DHCPV6_OPT_ANI_AP_BSSID = 108, + DHCPV6_OPT_ANI_OPERATOR_ID = 109, + DHCPV6_OPT_ANI_OPERATOR_REALM = 110, + DHCPV6_OPT_MUD_URL_V6 = 112, + DHCPV6_OPT_F_BINDING_STATUS = 114, + DHCPV6_OPT_F_CONNECT_FLAGS = 115, + DHCPV6_OPT_F_DNS_REMOVAL_INFO = 116, + DHCPV6_OPT_F_DNS_HOST_NAME = 117, + DHCPV6_OPT_F_DNS_ZONE_NAME = 118, + DHCPV6_OPT_F_DNS_FLAGS = 119, + DHCPV6_OPT_F_EXPIRATION_TIME = 120, + DHCPV6_OPT_F_MAX_UNACKED_BNDUPD = 121, + DHCPV6_OPT_F_MCLT = 122, + DHCPV6_OPT_F_PARTNER_LIFETIME = 123, + DHCPV6_OPT_F_PARTNER_LIFETIME_SENT = 124, + DHCPV6_OPT_F_PARTNER_DOWN_TIME = 125, + DHCPV6_OPT_F_PARTNER_RAW_CLT_TIME = 126, + DHCPV6_OPT_F_PROTOCOL_VERSION = 127, + DHCPV6_OPT_F_KEEPALIVE_TIME = 128, + DHCPV6_OPT_F_RECONFIGURE_DATA = 129, + DHCPV6_OPT_F_RELATIONSHIP_NAME = 130, + DHCPV6_OPT_F_SERVER_FLAGS = 131, + DHCPV6_OPT_F_SERVER_STATE = 132, + DHCPV6_OPT_F_START_TIME_OF_STATE = 133, + DHCPV6_OPT_F_STATE_EXPIRATION_TIME = 134, + DHCPV6_OPT_RELAY_PORT = 135, }; enum dhcpv6_opt_npt { @@ -119,6 +169,7 @@ enum dhcpv6_config { DHCPV6_STRICT_OPTIONS = 1, DHCPV6_CLIENT_FQDN = 2, DHCPV6_ACCEPT_RECONFIGURE = 4, + DHCPV6_IGNORE_OPT_UNICAST = 8, }; typedef int(reply_handler)(enum dhcpv6_msg orig, const int rc, @@ -261,8 +312,7 @@ enum odhcp6c_state { STATE_RA_DNS, STATE_RA_SEARCH, STATE_AFTR_NAME, - STATE_VENDORCLASS, - STATE_USERCLASS, + STATE_OPTS, STATE_CER, STATE_S46_MAPT, STATE_S46_MAPE, @@ -323,6 +373,28 @@ struct odhcp6c_request_prefix { uint16_t length; }; +enum odhcp6c_opt_flags { + OPT_U8 = 0, + OPT_IP6, + OPT_STR, + OPT_DNS_STR, + OPT_USER_CLASS, + OPT_MASK_SIZE = 0x0F, + OPT_ARRAY = 0x10, + OPT_INTERNAL = 0x20, + OPT_NO_PASSTHRU = 0x40, + OPT_ORO = 0x80, + OPT_ORO_STATEFUL = 0x100, + OPT_ORO_STATELESS = 0x200, + OPT_ORO_SOLICIT = 0x400 +}; + +struct odhcp6c_opt { + uint16_t code; + uint16_t flags; + const char *str; +}; + int init_dhcpv6(const char *ifname, unsigned int client_options, int sol_timeout); int dhcpv6_set_ia_mode(enum odhcp6c_ia_mode na, enum odhcp6c_ia_mode pd); int dhcpv6_request(enum dhcpv6_msg type); @@ -333,10 +405,10 @@ int init_rtnetlink(void); int set_rtnetlink_addr(int ifindex, const struct in6_addr *addr, uint32_t pref, uint32_t valid); -int ra_conf_hoplimit(int newvalue); -int ra_conf_mtu(int newvalue); -int ra_conf_reachable(int newvalue); -int ra_conf_retransmit(int newvalue); +int ra_get_hoplimit(void); +int ra_get_mtu(void); +int ra_get_reachable(void); +int ra_get_retransmit(void); int script_init(const char *path, const char *ifname); ssize_t script_unhexlify(uint8_t *dst, size_t len, const char *src); @@ -350,7 +422,7 @@ bool odhcp6c_addr_in_scope(const struct in6_addr *addr); // State manipulation void odhcp6c_clear_state(enum odhcp6c_state state); -void odhcp6c_add_state(enum odhcp6c_state state, const void *data, size_t len); +int odhcp6c_add_state(enum odhcp6c_state state, const void *data, size_t len); void odhcp6c_append_state(enum odhcp6c_state state, const void *data, size_t len); int odhcp6c_insert_state(enum odhcp6c_state state, size_t offset, const void *data, size_t len); size_t odhcp6c_remove_state(enum odhcp6c_state state, size_t offset, size_t len); @@ -363,3 +435,4 @@ bool odhcp6c_update_entry(enum odhcp6c_state state, struct odhcp6c_entry *new, void odhcp6c_expire(void); uint32_t odhcp6c_elapsed(void); +struct odhcp6c_opt *odhcp6c_find_opt(const uint16_t code); diff --git a/release/src/router/odhcp6c/src/ra.c b/release/src/router/odhcp6c/src/ra.c index f9276418768..fcfb6c0ede6 100644 --- a/release/src/router/odhcp6c/src/ra.c +++ b/release/src/router/odhcp6c/src/ra.c @@ -1,6 +1,6 @@ /** * Copyright (C) 2012-2014 Steven Barth - * Copyright (C) 2017 Hans Dedecker + * Copyright (C) 2017-2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -13,6 +13,7 @@ * */ +#include #include #include #include @@ -57,6 +58,10 @@ static volatile int rs_attempt = 0; static struct in6_addr lladdr = IN6ADDR_ANY_INIT; static unsigned int ra_options = 0; static unsigned int ra_holdoff_interval = 0; +static int ra_hoplimit = 0; +static int ra_mtu = 0; +static int ra_reachable = 0; +static int ra_retransmit = 0; struct { struct icmp6_hdr hdr; @@ -82,11 +87,11 @@ int ra_init(const char *ifname, const struct in6_addr *ifid, sock = fflags(sock, O_CLOEXEC); #endif if (sock < 0) - return -1; + goto failure; if_index = if_nametoindex(ifname); if (!if_index) - return -1; + goto failure; strncpy(if_name, ifname, sizeof(if_name) - 1); lladdr = *ifid; @@ -98,16 +103,21 @@ int ra_init(const char *ifname, const struct in6_addr *ifid, rtnl = fflags(rtnl, O_CLOEXEC); #endif if (rtnl < 0) - return -1; + goto failure; struct sockaddr_nl rtnl_kernel = { .nl_family = AF_NETLINK }; if (connect(rtnl, (const struct sockaddr*)&rtnl_kernel, sizeof(rtnl_kernel)) < 0) - return -1; + goto failure; int val = RTNLGRP_LINK; - setsockopt(rtnl, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &val, sizeof(val)); - fcntl(rtnl, F_SETOWN, ourpid); - fcntl(rtnl, F_SETFL, fcntl(sock, F_GETFL) | O_ASYNC); + if (setsockopt(rtnl, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &val, sizeof(val)) < 0) + goto failure; + + if (fcntl(rtnl, F_SETOWN, ourpid) < 0) + goto failure; + + if (fcntl(rtnl, F_SETFL, fcntl(sock, F_GETFL) | O_ASYNC) < 0) + goto failure; struct { struct nlmsghdr hdr; @@ -116,43 +126,67 @@ int ra_init(const char *ifname, const struct in6_addr *ifid, .hdr = {sizeof(req), RTM_GETLINK, NLM_F_REQUEST, 1, 0}, .ifi = {.ifi_index = if_index} }; - send(rtnl, &req, sizeof(req), 0); + if (send(rtnl, &req, sizeof(req), 0) < 0) + goto failure; + ra_link_up(); // Filter ICMPv6 package types struct icmp6_filter filt; ICMP6_FILTER_SETBLOCKALL(&filt); ICMP6_FILTER_SETPASS(ND_ROUTER_ADVERT, &filt); - setsockopt(sock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt, sizeof(filt)); + if (setsockopt(sock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt, sizeof(filt)) < 0) + goto failure; // Bind to all-nodes struct ipv6_mreq an = {ALL_IPV6_NODES, if_index}; - setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &an, sizeof(an)); + if (setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &an, sizeof(an)) < 0) + goto failure; // Let the kernel compute our checksums val = 2; - setsockopt(sock, IPPROTO_RAW, IPV6_CHECKSUM, &val, sizeof(val)); + if (setsockopt(sock, IPPROTO_RAW, IPV6_CHECKSUM, &val, sizeof(val)) < 0) + goto failure; // This is required by RFC 4861 val = 255; - setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &val, sizeof(val)); + if (setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &val, sizeof(val)) < 0) + goto failure; // Receive multicast hops val = 1; - setsockopt(sock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &val, sizeof(val)); + if (setsockopt(sock, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &val, sizeof(val)) < 0) + goto failure; // Bind to one device - setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)); + if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)) < 0) + goto failure; // Add async-mode - fcntl(sock, F_SETOWN, ourpid); - fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_ASYNC); + if (fcntl(sock, F_SETOWN, ourpid) < 0) + goto failure; + + val = fcntl(sock, F_GETFL); + if (val < 0) + goto failure; + + if (fcntl(sock, F_SETFL, val | O_ASYNC) < 0) + goto failure; // Send RS signal(SIGALRM, ra_send_rs); ra_send_rs(SIGALRM); return 0; + +failure: + if (sock >= 0) + close(sock); + + if (rtnl >= 0) + close(rtnl); + + return -1; } static void ra_send_rs(int signal __attribute__((unused))) @@ -166,7 +200,8 @@ static void ra_send_rs(int signal __attribute__((unused))) else len = sizeof(struct icmp6_hdr); - sendto(sock, &rs, len, MSG_DONTWAIT, (struct sockaddr*)&dest, sizeof(dest)); + if (sendto(sock, &rs, len, MSG_DONTWAIT, (struct sockaddr*)&dest, sizeof(dest)) < 0) + syslog(LOG_ERR, "Failed to send RS (%s)", strerror(errno)); if (++rs_attempt <= 3) alarm(4); @@ -251,44 +286,64 @@ static bool ra_icmpv6_valid(struct sockaddr_in6 *source, int hlim, uint8_t *data return opt == end; } -int ra_conf_hoplimit(int newvalue) +static bool ra_set_hoplimit(int val) { - static int value = 0; - - if (newvalue > 0) - value = newvalue; + if (val > 0 && val != ra_hoplimit) { + ra_hoplimit = val; + return true; + } - return value; + return false; } -int ra_conf_mtu(int newvalue) +static bool ra_set_mtu(int val) { - static int value = 0; + if (val >= 1280 && val <= 65535 && ra_mtu != val) { + ra_mtu = val; + return true; + } + + return false; +} - if (newvalue >= 1280 && newvalue <= 65535) - value = newvalue; +static bool ra_set_reachable(int val) +{ + if (val > 0 && val <= 3600000 && ra_reachable != val) { + ra_reachable = val; + return true; + } - return value; + return false; } -int ra_conf_reachable(int newvalue) +static bool ra_set_retransmit(int val) { - static int value = 0; + if (val > 0 && val <= 60000 && ra_retransmit != val) { + ra_retransmit = val; + return true; + } - if (newvalue > 0 && newvalue <= 3600000) - value = newvalue; + return false; +} - return value; +int ra_get_hoplimit(void) +{ + return ra_hoplimit; } -int ra_conf_retransmit(int newvalue) +int ra_get_mtu(void) { - static int value = 0; + return ra_mtu; +} - if (newvalue > 0 && newvalue <= 60000) - value = newvalue; +int ra_get_reachable(void) +{ + return ra_reachable; +} - return value; +int ra_get_retransmit(void) +{ + return ra_retransmit; } bool ra_process(void) @@ -311,11 +366,13 @@ bool ra_process(void) socklen_t alen = sizeof(addr); int sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); - if (!connect(sock, (struct sockaddr*)&addr, sizeof(addr)) && - !getsockname(sock, (struct sockaddr*)&addr, &alen)) - lladdr = addr.sin6_addr; + if (sock >= 0) { + if (!connect(sock, (struct sockaddr*)&addr, sizeof(addr)) && + !getsockname(sock, (struct sockaddr*)&addr, &alen)) + lladdr = addr.sin6_addr; - close(sock); + close(sock); + } } while (true) { @@ -374,28 +431,39 @@ bool ra_process(void) 0, ra_holdoff_interval); // Parse hoplimit - ra_conf_hoplimit(adv->nd_ra_curhoplimit); + changed |= ra_set_hoplimit(adv->nd_ra_curhoplimit); // Parse ND parameters - ra_conf_reachable(ntohl(adv->nd_ra_reachable)); - ra_conf_retransmit(ntohl(adv->nd_ra_retransmit)); + changed |= ra_set_reachable(ntohl(adv->nd_ra_reachable)); + changed |= ra_set_retransmit(ntohl(adv->nd_ra_retransmit)); // Evaluate options struct icmpv6_opt *opt; icmpv6_for_each_option(opt, &adv[1], &buf[len]) { if (opt->type == ND_OPT_MTU) { uint32_t *mtu = (uint32_t*)&opt->data[2]; - ra_conf_mtu(ntohl(*mtu)); + changed |= ra_set_mtu(ntohl(*mtu)); } else if (opt->type == ND_OPT_ROUTE_INFORMATION && opt->len <= 3) { + struct icmpv6_opt_route_info *ri = (struct icmpv6_opt_route_info *)opt; + + if (ri->prefix_len > 128) { + continue; + } else if (ri->prefix_len > 64) { + if (ri->len < 2) + continue; + } else if (ri->prefix_len > 0) { + if (ri->len < 1) + continue; + } + entry->router = from.sin6_addr; entry->target = any; - entry->priority = pref_to_priority(opt->data[1]); - entry->length = opt->data[0]; - uint32_t *valid = (uint32_t*)&opt->data[2]; - entry->valid = ntohl(*valid); - memcpy(&entry->target, &opt->data[6], (opt->len - 1) * 8); + entry->priority = pref_to_priority(ri->flags); + entry->length = ri->prefix_len; + entry->valid = ntohl(ri->lifetime); + memcpy(&entry->target, ri->prefix, (ri->len - 1) * 8); - if (entry->length > 128 || IN6_IS_ADDR_LINKLOCAL(&entry->target) + if (IN6_IS_ADDR_LINKLOCAL(&entry->target) || IN6_IS_ADDR_LOOPBACK(&entry->target) || IN6_IS_ADDR_MULTICAST(&entry->target)) continue; diff --git a/release/src/router/odhcp6c/src/ra.h b/release/src/router/odhcp6c/src/ra.h index c95c0194f3d..9acc8cd971a 100644 --- a/release/src/router/odhcp6c/src/ra.h +++ b/release/src/router/odhcp6c/src/ra.h @@ -1,5 +1,6 @@ /** * Copyright (C) 2012-2014 Steven Barth + * Copyright (C) 2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -25,6 +26,15 @@ struct icmpv6_opt { uint8_t data[6]; }; +struct icmpv6_opt_route_info { + uint8_t type; + uint8_t len; + uint8_t prefix_len; + uint8_t flags; + uint32_t lifetime; + uint8_t prefix[]; +}; + #define ND_OPT_ROUTE_INFORMATION 24 diff --git a/release/src/router/odhcp6c/src/script.c b/release/src/router/odhcp6c/src/script.c index 613872a4ffa..f32d4e2cd33 100644 --- a/release/src/router/odhcp6c/src/script.c +++ b/release/src/router/odhcp6c/src/script.c @@ -1,6 +1,6 @@ /** * Copyright (C) 2012-2014 Steven Barth - * Copyright (C) 2017 Hans Dedecker + * Copyright (C) 2017-2018 Hans Dedecker * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -393,8 +393,15 @@ void script_call(const char *status, int delay, bool resume) bool running_script = false; if (running) { + time_t diff = now - started; + kill(running, SIGTERM); - delay -= now - started; + + if (diff > delay) + delay -= diff; + else + delay = 0; + running_script = true; } @@ -471,10 +478,10 @@ void script_call(const char *status, int delay, bool resume) entry_to_env("RA_DNS", ra_dns, ra_dns_len, ENTRY_HOST); search_to_env("RA_DOMAINS", ra_search, ra_search_len); - int_to_env("RA_HOPLIMIT", ra_conf_hoplimit(0)); - int_to_env("RA_MTU", ra_conf_mtu(0)); - int_to_env("RA_REACHABLE", ra_conf_reachable(0)); - int_to_env("RA_RETRANSMIT", ra_conf_retransmit(0)); + int_to_env("RA_HOPLIMIT", ra_get_hoplimit()); + int_to_env("RA_MTU", ra_get_mtu()); + int_to_env("RA_REACHABLE", ra_get_reachable()); + int_to_env("RA_RETRANSMIT", ra_get_retransmit()); char *buf = malloc(10 + passthru_len * 2); strncpy(buf, "PASSTHRU=", 10); diff --git a/release/src/router/rc/udhcpc.c b/release/src/router/rc/udhcpc.c index 8a82e417646..5af0974af1a 100644 --- a/release/src/router/rc/udhcpc.c +++ b/release/src/router/rc/udhcpc.c @@ -1368,7 +1368,7 @@ int dhcp6c_wan(int argc, char **argv) else if (strcmp(argv[2], "informed") == 0) return bound6(argv[1], 0); else if (strcmp(argv[2], "ra-updated") == 0) - return ra_updated6(argv[2]); + return ra_updated6(argv[1]); return 0; } @@ -1441,8 +1441,6 @@ start_dhcp6c(void) dhcp6c_argv[index++] = "-r23"; /* dns */ dhcp6c_argv[index++] = "-r24"; /* domain */ } - dhcp6c_argv[index++] = "-r82"; /* sol_max_rt */ - dhcp6c_argv[index++] = "-r83"; /* inf_max_rt */ if (nvram_get_int("ipv6_debug")) dhcp6c_argv[index++] = "-v"; From bfb93365d955eb18da29659be2fe6b43f1e02f4d Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sun, 15 Dec 2019 23:24:24 +0500 Subject: [PATCH 03/78] odhcp6c: use reconfigure accept option only if allowed by server some dhcpv6 servers don't reply to request messages with reconfigure accept option, therefore let's just skip it if there was no such option in selected advertisement message. --- release/src/router/odhcp6c/src/dhcpv6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release/src/router/odhcp6c/src/dhcpv6.c b/release/src/router/odhcp6c/src/dhcpv6.c index 847d80dd1eb..9a2f2248369 100644 --- a/release/src/router/odhcp6c/src/dhcpv6.c +++ b/release/src/router/odhcp6c/src/dhcpv6.c @@ -511,7 +511,8 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) iov[IOV_HDR_IA_NA].iov_len = 0; if ((type != DHCPV6_MSG_SOLICIT && type != DHCPV6_MSG_REQUEST) || - !(client_options & DHCPV6_ACCEPT_RECONFIGURE)) + !(client_options & DHCPV6_ACCEPT_RECONFIGURE) || + (type != DHCPV6_MSG_SOLICIT && !accept_reconfig)) iov[IOV_RECONF_ACCEPT].iov_len = 0; if (!(client_options & DHCPV6_CLIENT_FQDN)) From 2cd754e8a350d29d3eaef063716a3985872dfd8d Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sun, 15 Dec 2019 23:24:32 +0500 Subject: [PATCH 04/78] odhcp6c: fix loop where clients issue a RENEW and REBIND every ~1s Upstream commit https://git.openwrt.org/?p=project/odhcp6c.git;a=commit;h=473f248e2db6c6c39e7aecf78f888e44f36ff5c4 has introduced issue where if a server stops returning some IA_NA or IA_PD entries, their T1/T2 would eventually tick down to 0, and dhcpv6_calc_refresh_timers() would keep yielding T1=T2=0, corrected to T1=0, T2=1 for REBINDs. This would then cause a loop where clients issue a RENEW and REBIND every ~1s, overwhelming DHCPv6 servers. There's side fix https://github.com/AlsoBearPerson/odhcp6c/commit/250f56a73e7a1b5e1e90f53982e8915065947450, but it seems not well done. Let's just partially revert original commit to the previous behavior and wait for proper fix in upstream instead (Hans was warned about). --- release/src/router/odhcp6c/src/dhcpv6.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/release/src/router/odhcp6c/src/dhcpv6.c b/release/src/router/odhcp6c/src/dhcpv6.c index 9a2f2248369..0e294a683a7 100644 --- a/release/src/router/odhcp6c/src/dhcpv6.c +++ b/release/src/router/odhcp6c/src/dhcpv6.c @@ -1181,6 +1181,11 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, odhcp6c_clear_state(STATE_SERVER_ADDR); odhcp6c_add_state(STATE_SERVER_ADDR, &from->sin6_addr, 16); } else if (orig == DHCPV6_MSG_RENEW) { +/* TODO: partially revert upstream commit "dhcpv6: always trigger script update in case of IA updates" + * https://git.openwrt.org/?p=project/odhcp6c.git;a=commit;h=473f248e2db6c6c39e7aecf78f888e44f36ff5c4 + * this would then cause a loop where clients issue a RENEW and REBIND every ~1s, overwhelming DHCPv6 servers. + * refer https://github.com/AlsoBearPerson/odhcp6c/commit/250f56a73e7a1b5e1e90f53982e8915065947450 */ +#if 0 // Send further renews if T1 is not set and // no updated IAs if (!t1) { @@ -1190,8 +1195,18 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, // Grace period of 1 second t1 = 1; } +#else + // Send further renews if T1 is not set + if (!t1) + ret = -1; +#endif } else if (orig == DHCPV6_MSG_REBIND) { +/* TODO: partially revert upstream commit "dhcpv6: always trigger script update in case of IA updates" + * https://git.openwrt.org/?p=project/odhcp6c.git;a=commit;h=473f248e2db6c6c39e7aecf78f888e44f36ff5c4 + * this would then cause a loop where clients issue a RENEW and REBIND every ~1s, overwhelming DHCPv6 servers. + * refer https://github.com/AlsoBearPerson/odhcp6c/commit/250f56a73e7a1b5e1e90f53982e8915065947450 */ +#if 0 // Send further rebinds if T1 and T2 is not set and // no updated IAs if (!t1 && !t2) { @@ -1201,6 +1216,11 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, // Grace period of 1 second t2 = 1; } +#else + // Send further rebinds if T1 and T2 is not set + if (!t1 && !t2) + ret = -1; +#endif odhcp6c_clear_state(STATE_SERVER_ADDR); odhcp6c_add_state(STATE_SERVER_ADDR, &from->sin6_addr, 16); From fb32c9b753471c8a2eb895ea222137942fffb689 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sun, 15 Dec 2019 23:33:56 +0500 Subject: [PATCH 05/78] libconfuse: update to 3.2.2 --- release/src/router/Makefile | 19 +- release/src/router/libconfuse/.gitignore | 21 +- release/src/router/libconfuse/ChangeLog.md | 47 +- release/src/router/libconfuse/Makefile.am | 2 +- release/src/router/libconfuse/Makefile.in | 18 +- release/src/router/libconfuse/README.md | 2 + release/src/router/libconfuse/aclocal.m4 | 52 +- release/src/router/libconfuse/configure | 21 +- release/src/router/libconfuse/configure.ac | 2 +- release/src/router/libconfuse/doc/Doxyfile | 2385 ---------- release/src/router/libconfuse/doc/Makefile.in | 4 +- .../router/libconfuse/doc/html/annotated.html | 106 - .../router/libconfuse/doc/html/arrowdown.png | Bin 246 -> 0 bytes .../router/libconfuse/doc/html/arrowright.png | Bin 229 -> 0 bytes .../src/router/libconfuse/doc/html/bc_s.png | Bin 676 -> 0 bytes .../src/router/libconfuse/doc/html/bdwn.png | Bin 147 -> 0 bytes .../router/libconfuse/doc/html/classes.html | 106 - .../src/router/libconfuse/doc/html/closed.png | Bin 132 -> 0 bytes .../libconfuse/doc/html/confuse_8h.html | 4074 ----------------- .../doc/html/confuse_8h_source.html | 205 - .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 108 - .../src/router/libconfuse/doc/html/doc.png | Bin 746 -> 0 bytes .../router/libconfuse/doc/html/doxygen.css | 1474 ------ .../router/libconfuse/doc/html/doxygen.png | Bin 3779 -> 0 bytes .../router/libconfuse/doc/html/dynsections.js | 97 - .../router/libconfuse/doc/html/examples.html | 99 - .../src/router/libconfuse/doc/html/files.html | 102 - .../libconfuse/doc/html/folderclosed.png | Bin 616 -> 0 bytes .../router/libconfuse/doc/html/folderopen.png | Bin 597 -> 0 bytes .../doc/html/ftpconf_8c-example.html | 91 - .../router/libconfuse/doc/html/functions.html | 251 - .../libconfuse/doc/html/functions_vars.html | 251 - .../router/libconfuse/doc/html/globals.html | 493 -- .../libconfuse/doc/html/globals_defs.html | 223 - .../libconfuse/doc/html/globals_enum.html | 111 - .../libconfuse/doc/html/globals_eval.html | 129 - .../libconfuse/doc/html/globals_func.html | 331 -- .../libconfuse/doc/html/globals_type.html | 126 - .../src/router/libconfuse/doc/html/index.html | 96 - .../src/router/libconfuse/doc/html/jquery.js | 68 - .../src/router/libconfuse/doc/html/nav_f.png | Bin 153 -> 0 bytes .../src/router/libconfuse/doc/html/nav_g.png | Bin 95 -> 0 bytes .../src/router/libconfuse/doc/html/nav_h.png | Bin 98 -> 0 bytes .../src/router/libconfuse/doc/html/open.png | Bin 123 -> 0 bytes .../doc/html/reread_8c-example.html | 91 - .../libconfuse/doc/html/search/all_0.html | 26 - .../libconfuse/doc/html/search/all_0.js | 4 - .../libconfuse/doc/html/search/all_1.html | 26 - .../libconfuse/doc/html/search/all_1.js | 137 - .../libconfuse/doc/html/search/all_2.html | 26 - .../libconfuse/doc/html/search/all_2.js | 4 - .../libconfuse/doc/html/search/all_3.html | 26 - .../libconfuse/doc/html/search/all_3.js | 4 - .../libconfuse/doc/html/search/all_4.html | 26 - .../libconfuse/doc/html/search/all_4.js | 7 - .../libconfuse/doc/html/search/all_5.html | 26 - .../libconfuse/doc/html/search/all_5.js | 5 - .../libconfuse/doc/html/search/all_6.html | 26 - .../libconfuse/doc/html/search/all_6.js | 6 - .../libconfuse/doc/html/search/all_7.html | 26 - .../libconfuse/doc/html/search/all_7.js | 4 - .../libconfuse/doc/html/search/all_8.html | 26 - .../libconfuse/doc/html/search/all_8.js | 8 - .../libconfuse/doc/html/search/all_9.html | 26 - .../libconfuse/doc/html/search/all_9.js | 7 - .../libconfuse/doc/html/search/all_a.html | 26 - .../libconfuse/doc/html/search/all_a.js | 5 - .../libconfuse/doc/html/search/all_b.html | 26 - .../libconfuse/doc/html/search/all_b.js | 6 - .../libconfuse/doc/html/search/classes_0.html | 26 - .../libconfuse/doc/html/search/classes_0.js | 8 - .../libconfuse/doc/html/search/close.png | Bin 273 -> 0 bytes .../libconfuse/doc/html/search/defines_0.html | 26 - .../libconfuse/doc/html/search/defines_0.js | 40 - .../libconfuse/doc/html/search/enums_0.html | 26 - .../libconfuse/doc/html/search/enums_0.js | 5 - .../doc/html/search/enumvalues_0.html | 26 - .../doc/html/search/enumvalues_0.js | 11 - .../libconfuse/doc/html/search/files_0.html | 26 - .../libconfuse/doc/html/search/files_0.js | 4 - .../doc/html/search/functions_0.html | 26 - .../libconfuse/doc/html/search/functions_0.js | 76 - .../libconfuse/doc/html/search/mag_sel.png | Bin 563 -> 0 bytes .../libconfuse/doc/html/search/nomatches.html | 12 - .../libconfuse/doc/html/search/pages_0.html | 26 - .../libconfuse/doc/html/search/pages_0.js | 4 - .../libconfuse/doc/html/search/search.css | 271 -- .../libconfuse/doc/html/search/search.js | 791 ---- .../libconfuse/doc/html/search/search_l.png | Bin 604 -> 0 bytes .../libconfuse/doc/html/search/search_m.png | Bin 158 -> 0 bytes .../libconfuse/doc/html/search/search_r.png | Bin 612 -> 0 bytes .../libconfuse/doc/html/search/searchdata.js | 42 - .../doc/html/search/typedefs_0.html | 26 - .../libconfuse/doc/html/search/typedefs_0.js | 10 - .../doc/html/search/variables_0.html | 26 - .../libconfuse/doc/html/search/variables_0.js | 4 - .../doc/html/search/variables_1.html | 26 - .../libconfuse/doc/html/search/variables_1.js | 4 - .../doc/html/search/variables_2.html | 26 - .../libconfuse/doc/html/search/variables_2.js | 4 - .../doc/html/search/variables_3.html | 26 - .../libconfuse/doc/html/search/variables_3.js | 4 - .../doc/html/search/variables_4.html | 26 - .../libconfuse/doc/html/search/variables_4.js | 7 - .../doc/html/search/variables_5.html | 26 - .../libconfuse/doc/html/search/variables_5.js | 4 - .../doc/html/search/variables_6.html | 26 - .../libconfuse/doc/html/search/variables_6.js | 6 - .../doc/html/search/variables_7.html | 26 - .../libconfuse/doc/html/search/variables_7.js | 4 - .../doc/html/search/variables_8.html | 26 - .../libconfuse/doc/html/search/variables_8.js | 8 - .../doc/html/search/variables_9.html | 26 - .../libconfuse/doc/html/search/variables_9.js | 7 - .../doc/html/search/variables_a.html | 26 - .../libconfuse/doc/html/search/variables_a.js | 5 - .../doc/html/search/variables_b.html | 26 - .../libconfuse/doc/html/search/variables_b.js | 6 - .../doc/html/simple_8c-example.html | 91 - .../router/libconfuse/doc/html/splitbar.png | Bin 314 -> 0 bytes .../doc/html/structcfg__defvalue__t.html | 130 - .../doc/html/structcfg__opt__t.html | 168 - .../libconfuse/doc/html/structcfg__t.html | 164 - .../router/libconfuse/doc/html/sync_off.png | Bin 853 -> 0 bytes .../router/libconfuse/doc/html/sync_on.png | Bin 845 -> 0 bytes .../src/router/libconfuse/doc/html/tab_a.png | Bin 142 -> 0 bytes .../src/router/libconfuse/doc/html/tab_b.png | Bin 169 -> 0 bytes .../src/router/libconfuse/doc/html/tab_h.png | Bin 177 -> 0 bytes .../src/router/libconfuse/doc/html/tab_s.png | Bin 184 -> 0 bytes .../src/router/libconfuse/doc/html/tabs.css | 60 - .../doc/html/unioncfg__simple__t.html | 104 - .../doc/html/unioncfg__value__t.html | 134 - .../libconfuse/doc/man/man3/cfg_defvalue_t.3 | 42 - .../libconfuse/doc/man/man3/cfg_opt_t.3 | 84 - .../libconfuse/doc/man/man3/cfg_simple_t.3 | 18 - .../router/libconfuse/doc/man/man3/cfg_t.3 | 72 - .../libconfuse/doc/man/man3/cfg_value_t.3 | 46 - .../libconfuse/doc/man/man3/confuse.h.3 | 2542 ---------- .../libconfuse/doc/tutorial-html/ar01s02.html | 59 - .../libconfuse/doc/tutorial-html/ar01s03.html | 78 - .../libconfuse/doc/tutorial-html/ar01s04.html | 110 - .../libconfuse/doc/tutorial-html/ar01s05.html | 44 - .../libconfuse/doc/tutorial-html/ar01s06.html | 123 - .../libconfuse/doc/tutorial-html/ar01s07.html | 14 - .../libconfuse/doc/tutorial-html/ar01s08.html | 34 - .../libconfuse/doc/tutorial-html/ar01s09.html | 4 - .../libconfuse/doc/tutorial-html/index.html | 84 - .../libconfuse/doc/tutorial-html/tutorial.css | 64 - .../src/router/libconfuse/doc/tutorial.xml | 2 +- .../router/libconfuse/examples/Makefile.in | 4 +- release/src/router/libconfuse/libconfuse.spec | 125 - release/src/router/libconfuse/m4/Makefile.in | 4 +- release/src/router/libconfuse/m4/libtool.m4 | 1 - release/src/router/libconfuse/po/confuse.pot | 4 +- release/src/router/libconfuse/po/de.gmo | Bin 2529 -> 2488 bytes release/src/router/libconfuse/po/de.po | 2 +- release/src/router/libconfuse/po/fr.gmo | Bin 2456 -> 2415 bytes release/src/router/libconfuse/po/fr.po | 2 +- release/src/router/libconfuse/po/sv.gmo | Bin 3018 -> 2977 bytes release/src/router/libconfuse/po/sv.po | 2 +- release/src/router/libconfuse/src/Makefile.am | 2 +- release/src/router/libconfuse/src/Makefile.in | 6 +- release/src/router/libconfuse/src/lexer.c | 958 ++-- release/src/router/libconfuse/src/lexer.l | 2 +- release/src/router/libconfuse/support/ar-lib | 2 +- .../router/libconfuse/support/config.guess | 679 +-- .../src/router/libconfuse/support/config.sub | 284 +- release/src/router/libconfuse/support/depcomp | 6 +- .../src/router/libconfuse/support/ltmain.sh | 4 +- release/src/router/libconfuse/support/ylwrap | 6 +- .../src/router/libconfuse/tests/Makefile.in | 4 +- 171 files changed, 1217 insertions(+), 18722 deletions(-) delete mode 100644 release/src/router/libconfuse/doc/Doxyfile delete mode 100644 release/src/router/libconfuse/doc/html/annotated.html delete mode 100644 release/src/router/libconfuse/doc/html/arrowdown.png delete mode 100644 release/src/router/libconfuse/doc/html/arrowright.png delete mode 100644 release/src/router/libconfuse/doc/html/bc_s.png delete mode 100644 release/src/router/libconfuse/doc/html/bdwn.png delete mode 100644 release/src/router/libconfuse/doc/html/classes.html delete mode 100644 release/src/router/libconfuse/doc/html/closed.png delete mode 100644 release/src/router/libconfuse/doc/html/confuse_8h.html delete mode 100644 release/src/router/libconfuse/doc/html/confuse_8h_source.html delete mode 100644 release/src/router/libconfuse/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html delete mode 100644 release/src/router/libconfuse/doc/html/doc.png delete mode 100644 release/src/router/libconfuse/doc/html/doxygen.css delete mode 100644 release/src/router/libconfuse/doc/html/doxygen.png delete mode 100644 release/src/router/libconfuse/doc/html/dynsections.js delete mode 100644 release/src/router/libconfuse/doc/html/examples.html delete mode 100644 release/src/router/libconfuse/doc/html/files.html delete mode 100644 release/src/router/libconfuse/doc/html/folderclosed.png delete mode 100644 release/src/router/libconfuse/doc/html/folderopen.png delete mode 100644 release/src/router/libconfuse/doc/html/ftpconf_8c-example.html delete mode 100644 release/src/router/libconfuse/doc/html/functions.html delete mode 100644 release/src/router/libconfuse/doc/html/functions_vars.html delete mode 100644 release/src/router/libconfuse/doc/html/globals.html delete mode 100644 release/src/router/libconfuse/doc/html/globals_defs.html delete mode 100644 release/src/router/libconfuse/doc/html/globals_enum.html delete mode 100644 release/src/router/libconfuse/doc/html/globals_eval.html delete mode 100644 release/src/router/libconfuse/doc/html/globals_func.html delete mode 100644 release/src/router/libconfuse/doc/html/globals_type.html delete mode 100644 release/src/router/libconfuse/doc/html/index.html delete mode 100644 release/src/router/libconfuse/doc/html/jquery.js delete mode 100644 release/src/router/libconfuse/doc/html/nav_f.png delete mode 100644 release/src/router/libconfuse/doc/html/nav_g.png delete mode 100644 release/src/router/libconfuse/doc/html/nav_h.png delete mode 100644 release/src/router/libconfuse/doc/html/open.png delete mode 100644 release/src/router/libconfuse/doc/html/reread_8c-example.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_1.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_1.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_2.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_2.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_3.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_3.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_4.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_4.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_5.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_5.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_6.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_6.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_7.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_7.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_8.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_8.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_9.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_9.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_a.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_a.js delete mode 100644 release/src/router/libconfuse/doc/html/search/all_b.html delete mode 100644 release/src/router/libconfuse/doc/html/search/all_b.js delete mode 100644 release/src/router/libconfuse/doc/html/search/classes_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/classes_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/close.png delete mode 100644 release/src/router/libconfuse/doc/html/search/defines_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/defines_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/enums_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/enums_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/enumvalues_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/enumvalues_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/files_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/files_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/functions_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/functions_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/mag_sel.png delete mode 100644 release/src/router/libconfuse/doc/html/search/nomatches.html delete mode 100644 release/src/router/libconfuse/doc/html/search/pages_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/pages_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/search.css delete mode 100644 release/src/router/libconfuse/doc/html/search/search.js delete mode 100644 release/src/router/libconfuse/doc/html/search/search_l.png delete mode 100644 release/src/router/libconfuse/doc/html/search/search_m.png delete mode 100644 release/src/router/libconfuse/doc/html/search/search_r.png delete mode 100644 release/src/router/libconfuse/doc/html/search/searchdata.js delete mode 100644 release/src/router/libconfuse/doc/html/search/typedefs_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/typedefs_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_0.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_0.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_1.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_1.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_2.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_2.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_3.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_3.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_4.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_4.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_5.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_5.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_6.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_6.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_7.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_7.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_8.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_8.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_9.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_9.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_a.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_a.js delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_b.html delete mode 100644 release/src/router/libconfuse/doc/html/search/variables_b.js delete mode 100644 release/src/router/libconfuse/doc/html/simple_8c-example.html delete mode 100644 release/src/router/libconfuse/doc/html/splitbar.png delete mode 100644 release/src/router/libconfuse/doc/html/structcfg__defvalue__t.html delete mode 100644 release/src/router/libconfuse/doc/html/structcfg__opt__t.html delete mode 100644 release/src/router/libconfuse/doc/html/structcfg__t.html delete mode 100644 release/src/router/libconfuse/doc/html/sync_off.png delete mode 100644 release/src/router/libconfuse/doc/html/sync_on.png delete mode 100644 release/src/router/libconfuse/doc/html/tab_a.png delete mode 100644 release/src/router/libconfuse/doc/html/tab_b.png delete mode 100644 release/src/router/libconfuse/doc/html/tab_h.png delete mode 100644 release/src/router/libconfuse/doc/html/tab_s.png delete mode 100644 release/src/router/libconfuse/doc/html/tabs.css delete mode 100644 release/src/router/libconfuse/doc/html/unioncfg__simple__t.html delete mode 100644 release/src/router/libconfuse/doc/html/unioncfg__value__t.html delete mode 100644 release/src/router/libconfuse/doc/man/man3/cfg_defvalue_t.3 delete mode 100644 release/src/router/libconfuse/doc/man/man3/cfg_opt_t.3 delete mode 100644 release/src/router/libconfuse/doc/man/man3/cfg_simple_t.3 delete mode 100644 release/src/router/libconfuse/doc/man/man3/cfg_t.3 delete mode 100644 release/src/router/libconfuse/doc/man/man3/cfg_value_t.3 delete mode 100644 release/src/router/libconfuse/doc/man/man3/confuse.h.3 delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s02.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s03.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s04.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s05.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s06.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s07.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s08.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/ar01s09.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/index.html delete mode 100644 release/src/router/libconfuse/doc/tutorial-html/tutorial.css delete mode 100644 release/src/router/libconfuse/libconfuse.spec diff --git a/release/src/router/Makefile b/release/src/router/Makefile index 5460720c3a1..6443fcdb261 100644 --- a/release/src/router/Makefile +++ b/release/src/router/Makefile @@ -6927,28 +6927,25 @@ libical-2.0.0-install: ln -sf libicalvcal.so.2.0.0 libicalvcal.so.2 libconfuse/Makefile: - cd libconfuse && $(CONFIGURE) \ - CFLAGS="$(EXTRACFLAGS) -Os -I$(STAGEDIR)/usr/include -ffunction-sections -fdata-sections -fPIC" \ - LDFLAGS="$(LDFLAGS) -ffunction-sections -fdata-sections -Wl,--gc-sections" \ - --prefix=/usr --disable-shared \ - --without-libiconv-prefix --without-libintl-prefix --disable-examples --disable-nls + cd libconfuse && $(CONFIGURE) --prefix=/usr --disable-shared \ + --disable-examples --disable-nls \ + --without-libiconv-prefix --without-libintl-prefix \ + CFLAGS="-Wall -Os -ffunction-sections -fdata-sections -fPIC $(EXTRACFLAGS)" \ + LDFLAGS="-Wl,--gc-sections $(LDFLAGS)" -libconfuse: libiconv-1.14 libconfuse/Makefile - @$(SEP) - $(MAKE) -C $@ +libconfuse: libconfuse/Makefile + $(MAKE) -C $@ && $(MAKE) $@-stage libconfuse-install: - @$(SEP) # Do nothing + @true # install -D libconfuse/src/.libs/libconfuse.so.1.1.0 $(INSTALLDIR)/libconfuse/usr/lib/libconfuse.so.1.1.0 # cd $(INSTALLDIR)/libconfuse/usr/lib && \ # ln -sf libconfuse.so.1.1.0 libconfuse.so.1 &&\ # ln -sf libconfuse.so.1.1.0 libconfuse.so # $(STRIP) $(INSTALLDIR)/libconfuse/usr/lib/*.so.* - libconfuse-clean: - @$(SEP) [ ! -f libconfuse/Makefile ] || $(MAKE) -C libconfuse distclean @rm -f libconfuse/Makefile diff --git a/release/src/router/libconfuse/.gitignore b/release/src/router/libconfuse/.gitignore index 567e584d1a5..e6c6f55040b 100644 --- a/release/src/router/libconfuse/.gitignore +++ b/release/src/router/libconfuse/.gitignore @@ -1,12 +1,19 @@ -Makefile +*.o +*.a +*.lo +*.la .deps .libs -*.la -*.lo -*.o +.dirstamp +autom4te.cache config.h -*.pc -Makefile.in +config.log +config.status +Makefile +Doxyfile POTFILES +po/Makefile.in +libconfuse.pc +libconfuse.spec libtool - +stamp-h1 diff --git a/release/src/router/libconfuse/ChangeLog.md b/release/src/router/libconfuse/ChangeLog.md index 266b8b7e0c4..eddd7a2039e 100644 --- a/release/src/router/libconfuse/ChangeLog.md +++ b/release/src/router/libconfuse/ChangeLog.md @@ -4,6 +4,25 @@ Change Log All notable changes in libConfuse are documented in this file. +[v3.2.2][] - 2018-08-19 +----------------------- + +This is a security patch release for CVE-2018-14447. The vulnerability +affects all releases since v3.1 when the `CFGF_COMMENTS` functionality +was first introduced. + +### Fixes +* Issue #109: Out of bounds read in `lexer.l:trim_whitespace()`. + + +[v3.2.1][] - 2017-08-17 +----------------------- + +### Fixes +* Issue #101: Bump ABI major number due to incompatible change in struct + when adding option annotation/comments in [v3.1][]: `1.1.0 -> 2.0.0` + + [v3.2][] - 2017-06-03 --------------------- @@ -68,7 +87,7 @@ library! * Support for handling unknown options. The idea is to provide future proofing of configuration files, i.e. if a new parameter is added, the new config file will not fail if loaded in an older version of your - program. See the `CFGF_IGNORE_UNKNOWN` flag in the documenation for + program. See the `CFGF_IGNORE_UNKNOWN` flag in the documentation for more information. Idea and implementation by Frank Hunleth. * Add public API for removing sections at runtime, by Peter Rosin. * Allow `cfg_opt_getval()` on options that are `CFGF_MULTI` sections, @@ -341,15 +360,17 @@ v1.2.2 - 2002-11-27 * updated the manual -[UNRELEASED]: https://github.com/martinh/libconfuse/compare/v3.2...HEAD -[v3.2]: https://github.com/martinh/libconfuse/compare/v3.1...v3.2 -[v3.1]: https://github.com/martinh/libconfuse/compare/v3.0...v3.1 -[v3.0]: https://github.com/martinh/libconfuse/compare/v2.8...v3.0 -[v2.8]: https://github.com/martinh/libconfuse/compare/v2.7...v2.8 -[v2.7]: https://github.com/martinh/libconfuse/compare/v2.6...v2.7 -[v2.6]: https://github.com/martinh/libconfuse/compare/v2.5...v2.6 -[v2.5]: https://github.com/martinh/libconfuse/compare/v2.4...v2.5 -[v2.4]: https://github.com/martinh/libconfuse/compare/v2.3...v2.4 -[v2.3]: https://github.com/martinh/libconfuse/compare/v2.2...v2.3 -[v2.2]: https://github.com/martinh/libconfuse/compare/v2.1...v2.2 -[v2.1]: https://github.com/martinh/libconfuse/compare/v2.0...v2.1 +[UNRELEASED]: https://github.com/martinh/libconfuse/compare/v3.2.2...HEAD +[v3.2.2]: https://github.com/martinh/libconfuse/compare/v3.2.1...v3.2.2 +[v3.2.1]: https://github.com/martinh/libconfuse/compare/v3.2...v3.2.1 +[v3.2]: https://github.com/martinh/libconfuse/compare/v3.1...v3.2 +[v3.1]: https://github.com/martinh/libconfuse/compare/v3.0...v3.1 +[v3.0]: https://github.com/martinh/libconfuse/compare/v2.8...v3.0 +[v2.8]: https://github.com/martinh/libconfuse/compare/v2.7...v2.8 +[v2.7]: https://github.com/martinh/libconfuse/compare/v2.6...v2.7 +[v2.6]: https://github.com/martinh/libconfuse/compare/v2.5...v2.6 +[v2.5]: https://github.com/martinh/libconfuse/compare/v2.4...v2.5 +[v2.4]: https://github.com/martinh/libconfuse/compare/v2.3...v2.4 +[v2.3]: https://github.com/martinh/libconfuse/compare/v2.2...v2.3 +[v2.2]: https://github.com/martinh/libconfuse/compare/v2.1...v2.2 +[v2.1]: https://github.com/martinh/libconfuse/compare/v2.0...v2.1 diff --git a/release/src/router/libconfuse/Makefile.am b/release/src/router/libconfuse/Makefile.am index 414491a97ea..d0fccb115d7 100644 --- a/release/src/router/libconfuse/Makefile.am +++ b/release/src/router/libconfuse/Makefile.am @@ -92,7 +92,7 @@ release-hook: ## Target to run when building a release ## distcheck <-- does not work atm., wrong search path for source/header files -release: release-hook dist dist-zip md5-dist +release: release-hook distcheck dist-zip md5-dist @echo @echo "Resulting release files:" @echo "=================================================================" diff --git a/release/src/router/libconfuse/Makefile.in b/release/src/router/libconfuse/Makefile.in index aa0dab91668..c32752671c3 100644 --- a/release/src/router/libconfuse/Makefile.in +++ b/release/src/router/libconfuse/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -205,8 +205,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/support/ltmain.sh $(top_srcdir)/support/missing \ ABOUT-NLS AUTHORS INSTALL support/ar-lib support/compile \ support/config.guess support/config.rpath support/config.sub \ - support/install-sh support/ltmain.sh support/missing \ - support/ylwrap + support/depcomp support/install-sh support/ltmain.sh \ + support/missing support/ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -682,7 +682,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -707,7 +707,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist dist-all: @@ -720,7 +720,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -730,7 +730,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -994,7 +994,7 @@ release-hook: echo; \ fi -release: release-hook dist dist-zip md5-dist +release: release-hook distcheck dist-zip md5-dist @echo @echo "Resulting release files:" @echo "=================================================================" diff --git a/release/src/router/libconfuse/README.md b/release/src/router/libconfuse/README.md index b6f4f23cb56..97baa873c1a 100644 --- a/release/src/router/libconfuse/README.md +++ b/release/src/router/libconfuse/README.md @@ -89,6 +89,8 @@ with the source: News ---- +* 2018-08-19: libConfuse version 3.2.2 released (CVE-2018-14447) +* 2017-08-17: libConfuse version 3.2.1 released (major ABI bump!) * 2017-06-03: libConfuse version 3.2 released * 2017-05-24: libConfuse version 3.1 released * 2016-03-03: libConfuse version 3.0 released diff --git a/release/src/router/libconfuse/aclocal.m4 b/release/src/router/libconfuse/aclocal.m4 index 709813f6125..2899cd428b4 100644 --- a/release/src/router/libconfuse/aclocal.m4 +++ b/release/src/router/libconfuse/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -118,7 +118,7 @@ AC_SUBST([AR])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,7 +170,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,7 +201,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -392,7 +392,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -468,7 +468,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -665,7 +665,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -686,7 +686,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -705,7 +705,7 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Copyright (C) 1998-2014 Free Software Foundation, Inc. +# Copyright (C) 1998-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -726,7 +726,7 @@ fi]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -761,7 +761,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -811,7 +811,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -852,7 +852,7 @@ fi # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -879,7 +879,7 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -908,7 +908,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -955,7 +955,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -974,7 +974,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1055,7 +1055,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1115,7 +1115,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1143,7 +1143,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1162,7 +1162,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/release/src/router/libconfuse/configure b/release/src/router/libconfuse/configure index 532fcf11bea..c337a1768a1 100755 --- a/release/src/router/libconfuse/configure +++ b/release/src/router/libconfuse/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libConfuse 3.2. +# Generated by GNU Autoconf 2.69 for libConfuse 3.2.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libConfuse' PACKAGE_TARNAME='confuse' -PACKAGE_VERSION='3.2' -PACKAGE_STRING='libConfuse 3.2' +PACKAGE_VERSION='3.2.2' +PACKAGE_STRING='libConfuse 3.2.2' PACKAGE_BUGREPORT='https://github.com/martinh/libconfuse/issues' PACKAGE_URL='' @@ -1361,7 +1361,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libConfuse 3.2 to adapt to many kinds of systems. +\`configure' configures libConfuse 3.2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1432,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libConfuse 3.2:";; + short | recursive ) echo "Configuration of libConfuse 3.2.2:";; esac cat <<\_ACEOF @@ -1553,7 +1553,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libConfuse configure 3.2 +libConfuse configure 3.2.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1922,7 +1922,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libConfuse $as_me 3.2, which was +It was created by libConfuse $as_me 3.2.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2809,7 +2809,7 @@ fi # Define the identity of the package. PACKAGE='confuse' - VERSION='3.2' + VERSION='3.2.2' cat >>confdefs.h <<_ACEOF @@ -15575,7 +15575,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libConfuse $as_me 3.2, which was +This file was extended by libConfuse $as_me 3.2.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15641,7 +15641,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libConfuse config.status 3.2 +libConfuse config.status 3.2.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16779,7 +16779,6 @@ $as_echo X"$file" | cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. diff --git a/release/src/router/libconfuse/configure.ac b/release/src/router/libconfuse/configure.ac index be8d5c98448..3890d7f66c6 100644 --- a/release/src/router/libconfuse/configure.ac +++ b/release/src/router/libconfuse/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with -*- autoconf -*- to produce a configure script. AC_PREREQ(2.50) -AC_INIT(libConfuse, 3.2, https://github.com/martinh/libconfuse/issues, confuse) +AC_INIT(libConfuse, 3.2.2, https://github.com/martinh/libconfuse/issues, confuse) AC_CONFIG_AUX_DIR(support) AM_MAINTAINER_MODE AM_INIT_AUTOMAKE([foreign dist-xz]) diff --git a/release/src/router/libconfuse/doc/Doxyfile b/release/src/router/libconfuse/doc/Doxyfile deleted file mode 100644 index 5478ea5b4ae..00000000000 --- a/release/src/router/libconfuse/doc/Doxyfile +++ /dev/null @@ -1,2385 +0,0 @@ -# Doxyfile 1.8.9.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = confuse - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 3.2 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = YES - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = NO - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = NO - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = NO - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = ../src/confuse.c \ - ../src/confuse.h - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = ../examples - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = *.c - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = NO - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = ../doc/doxygen-header.html - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = ../doc/doxygen-footer.html - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = doxygen.css - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Confuse - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Confuse - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /