From 78585c170875e78fe58fd80ea74916dd41e25bb9 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 20 Feb 2019 11:35:14 +0000 Subject: Adapt to skalibs/posixishard.h --- src/clients/s6-dnsname-filter.c | 4 +++- src/libs6dns/s6dns_analyze_packet.c | 4 +++- src/libs6dns/s6dns_analyze_record_a.c | 4 +++- src/libs6dns/s6dns_analyze_record_aaaa.c | 4 +++- src/libs6dns/s6dns_analyze_record_caa.c | 4 +++- src/libs6dns/s6dns_analyze_record_domain.c | 4 +++- src/libs6dns/s6dns_analyze_record_hinfo.c | 4 +++- src/libs6dns/s6dns_analyze_record_mx.c | 4 +++- src/libs6dns/s6dns_analyze_record_soa.c | 4 +++- src/libs6dns/s6dns_analyze_record_srv.c | 4 +++- src/libs6dns/s6dns_analyze_record_strings.c | 4 +++- src/libs6dns/s6dns_constants_error.c | 4 +++- src/libs6dns/s6dns_domain_decode.c | 4 +++- src/libs6dns/s6dns_engine.c | 14 +++----------- src/libs6dns/s6dns_message_get_caa.c | 4 +++- src/libs6dns/s6dns_message_get_domain_internal.c | 4 +++- src/libs6dns/s6dns_message_get_mx.c | 4 +++- src/libs6dns/s6dns_message_get_soa.c | 4 +++- src/libs6dns/s6dns_message_get_srv.c | 4 +++- src/libs6dns/s6dns_message_get_string_internal.c | 4 +++- src/libs6dns/s6dns_message_parse_answer_domain.c | 4 +++- src/libs6dns/s6dns_message_parse_answer_hinfo.c | 4 +++- src/libs6dns/s6dns_message_parse_answer_mx.c | 4 +++- src/libs6dns/s6dns_message_parse_answer_soa.c | 4 +++- src/libs6dns/s6dns_message_parse_answer_srv.c | 4 +++- src/libs6dns/s6dns_message_parse_answer_strings.c | 4 +++- src/libs6dns/s6dns_message_parse_getrr.c | 4 +++- src/libs6dns/s6dns_message_parse_init.c | 4 +++- src/skadns/skadns_update.c | 8 ++++---- 29 files changed, 88 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/clients/s6-dnsname-filter.c b/src/clients/s6-dnsname-filter.c index 95869be..9ee7ee2 100644 --- a/src/clients/s6-dnsname-filter.c +++ b/src/clients/s6-dnsname-filter.c @@ -2,10 +2,12 @@ #include #include -#include + +#include #include #include #include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_packet.c b/src/libs6dns/s6dns_analyze_packet.c index facd498..24c2326 100644 --- a/src/libs6dns/s6dns_analyze_packet.c +++ b/src/libs6dns/s6dns_analyze_packet.c @@ -3,8 +3,10 @@ #include #include #include -#include + +#include #include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_record_a.c b/src/libs6dns/s6dns_analyze_record_a.c index 214c348..41ceee7 100644 --- a/src/libs6dns/s6dns_analyze_record_a.c +++ b/src/libs6dns/s6dns_analyze_record_a.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include int s6dns_analyze_record_a (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos) diff --git a/src/libs6dns/s6dns_analyze_record_aaaa.c b/src/libs6dns/s6dns_analyze_record_aaaa.c index e28e8bc..e60e279 100644 --- a/src/libs6dns/s6dns_analyze_record_aaaa.c +++ b/src/libs6dns/s6dns_analyze_record_aaaa.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include int s6dns_analyze_record_aaaa (genwrite_t *gp, s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos) diff --git a/src/libs6dns/s6dns_analyze_record_caa.c b/src/libs6dns/s6dns_analyze_record_caa.c index fa8ab91..076f04b 100644 --- a/src/libs6dns/s6dns_analyze_record_caa.c +++ b/src/libs6dns/s6dns_analyze_record_caa.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_record_domain.c b/src/libs6dns/s6dns_analyze_record_domain.c index ca77f1f..a14dd98 100644 --- a/src/libs6dns/s6dns_analyze_record_domain.c +++ b/src/libs6dns/s6dns_analyze_record_domain.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_record_hinfo.c b/src/libs6dns/s6dns_analyze_record_hinfo.c index d38c657..d8e36b2 100644 --- a/src/libs6dns/s6dns_analyze_record_hinfo.c +++ b/src/libs6dns/s6dns_analyze_record_hinfo.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_record_mx.c b/src/libs6dns/s6dns_analyze_record_mx.c index 7aeca5d..ab09c1a 100644 --- a/src/libs6dns/s6dns_analyze_record_mx.c +++ b/src/libs6dns/s6dns_analyze_record_mx.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_record_soa.c b/src/libs6dns/s6dns_analyze_record_soa.c index ed04ca8..7f9d4f6 100644 --- a/src/libs6dns/s6dns_analyze_record_soa.c +++ b/src/libs6dns/s6dns_analyze_record_soa.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_record_srv.c b/src/libs6dns/s6dns_analyze_record_srv.c index 024825b..9af1b49 100644 --- a/src/libs6dns/s6dns_analyze_record_srv.c +++ b/src/libs6dns/s6dns_analyze_record_srv.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include #include #include diff --git a/src/libs6dns/s6dns_analyze_record_strings.c b/src/libs6dns/s6dns_analyze_record_strings.c index 9baa42a..f6f4c85 100644 --- a/src/libs6dns/s6dns_analyze_record_strings.c +++ b/src/libs6dns/s6dns_analyze_record_strings.c @@ -1,9 +1,11 @@ /* ISC license. */ #include -#include + +#include #include #include + #include #include diff --git a/src/libs6dns/s6dns_constants_error.c b/src/libs6dns/s6dns_constants_error.c index 68a8b4d..6b58ffc 100644 --- a/src/libs6dns/s6dns_constants_error.c +++ b/src/libs6dns/s6dns_constants_error.c @@ -1,7 +1,9 @@ /* ISC license. */ #include -#include + +#include + #include static s6dns_constants_error_message_t const array[] = diff --git a/src/libs6dns/s6dns_domain_decode.c b/src/libs6dns/s6dns_domain_decode.c index 440f672..6fea0d6 100644 --- a/src/libs6dns/s6dns_domain_decode.c +++ b/src/libs6dns/s6dns_domain_decode.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include static inline unsigned int s6dns_domain_label_decode (char *s, unsigned int max) diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c index 0057b14..a07b1dc 100644 --- a/src/libs6dns/s6dns_engine.c +++ b/src/libs6dns/s6dns_engine.c @@ -5,6 +5,8 @@ #include #include #include + +#include #include #include #include @@ -14,7 +16,7 @@ #include #include #include -#include + #include #include #include @@ -33,32 +35,22 @@ static int relevant (char const *q, unsigned int qlen, char const *ans, unsigned { s6dns_message_header_t h ; uint16_t id ; - LOLDEBUG("entering relevant()") ; s6dns_message_header_unpack(ans, &h) ; - LOLDEBUG(" answer qr = %u, opcode = %u, z = %u, qd = %u", h.qr, h.opcode, h.z, h.counts.qd) ; if (!h.qr || h.opcode || h.z || (h.counts.qd != 1)) return 0 ; - LOLDEBUG(" testing answer rd") ; if (h.rd != (q[2] & 1)) return 0 ; - LOLDEBUG(" if strict(%d), testing h.aa and query rd", strict) ; if (strict && !h.aa && !(q[2] & 1)) return 0 ; uint16_unpack_big(q, &id) ; - LOLDEBUG(" testing answer id") ; if (id != h.id) return 0 ; } { char buf[255] ; unsigned int pos = 12 ; unsigned int n = s6dns_message_get_domain_internal(buf, 255, ans, anslen, &pos) ; - LOLDEBUG(" testing return from s6dns_message_get_domain_internal()") ; if (!n) return -1 ; - LOLDEBUG(" testing that pos+4 <= anslen") ; if (pos + 4 > anslen) return (errno = EPROTO, -1) ; - LOLDEBUG(" testing answer domain against query") ; if (qdomain_diff(buf, n, q + 12, qlen - 16)) return 0 ; - LOLDEBUG(" testing answer qclass and qtype against query" ) ; if (memcmp(q + qlen - 4, ans + pos, 4)) return 0 ; } - LOLDEBUG("relevant() returns 1") ; return 1 ; } diff --git a/src/libs6dns/s6dns_message_get_caa.c b/src/libs6dns/s6dns_message_get_caa.c index a97b8c0..649c217 100644 --- a/src/libs6dns/s6dns_message_get_caa.c +++ b/src/libs6dns/s6dns_message_get_caa.c @@ -3,7 +3,9 @@ #include #include #include -#include + +#include + #include int s6dns_message_get_caa (s6dns_message_rr_caa_t *caa, char const *packet, unsigned int packetlen, unsigned int *pos, uint16_t rdlength) diff --git a/src/libs6dns/s6dns_message_get_domain_internal.c b/src/libs6dns/s6dns_message_get_domain_internal.c index fd36e18..154c42c 100644 --- a/src/libs6dns/s6dns_message_get_domain_internal.c +++ b/src/libs6dns/s6dns_message_get_domain_internal.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include "s6dns-message-internal.h" size_t s6dns_message_get_domain_internal (char *out, size_t outmax, char const *s, unsigned int len, unsigned int *pos) diff --git a/src/libs6dns/s6dns_message_get_mx.c b/src/libs6dns/s6dns_message_get_mx.c index 8fb8abb..5b9f0d6 100644 --- a/src/libs6dns/s6dns_message_get_mx.c +++ b/src/libs6dns/s6dns_message_get_mx.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include int s6dns_message_get_mx (s6dns_message_rr_mx_t *mx, char const *packet, unsigned int packetlen, unsigned int *pos) diff --git a/src/libs6dns/s6dns_message_get_soa.c b/src/libs6dns/s6dns_message_get_soa.c index c766231..2bec565 100644 --- a/src/libs6dns/s6dns_message_get_soa.c +++ b/src/libs6dns/s6dns_message_get_soa.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include int s6dns_message_get_soa (s6dns_message_rr_soa_t *soa, char const *packet, unsigned int packetlen, unsigned int *pos) diff --git a/src/libs6dns/s6dns_message_get_srv.c b/src/libs6dns/s6dns_message_get_srv.c index 13ecf13..ad983ae 100644 --- a/src/libs6dns/s6dns_message_get_srv.c +++ b/src/libs6dns/s6dns_message_get_srv.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include int s6dns_message_get_srv (s6dns_message_rr_srv_t *srv, char const *packet, unsigned int packetlen, unsigned int *pos) diff --git a/src/libs6dns/s6dns_message_get_string_internal.c b/src/libs6dns/s6dns_message_get_string_internal.c index 9597c36..fe81f52 100644 --- a/src/libs6dns/s6dns_message_get_string_internal.c +++ b/src/libs6dns/s6dns_message_get_string_internal.c @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include "s6dns-message-internal.h" int s6dns_message_get_string_internal (char *s, size_t max, char const *packet, unsigned int packetlen, unsigned int *pos) diff --git a/src/libs6dns/s6dns_message_parse_answer_domain.c b/src/libs6dns/s6dns_message_parse_answer_domain.c index cb67178..25f47df 100644 --- a/src/libs6dns/s6dns_message_parse_answer_domain.c +++ b/src/libs6dns/s6dns_message_parse_answer_domain.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include int s6dns_message_parse_answer_domain (s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos, unsigned int section, void *stuff) diff --git a/src/libs6dns/s6dns_message_parse_answer_hinfo.c b/src/libs6dns/s6dns_message_parse_answer_hinfo.c index 9ee84f7..c9f70c1 100644 --- a/src/libs6dns/s6dns_message_parse_answer_hinfo.c +++ b/src/libs6dns/s6dns_message_parse_answer_hinfo.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include #include diff --git a/src/libs6dns/s6dns_message_parse_answer_mx.c b/src/libs6dns/s6dns_message_parse_answer_mx.c index f9f6df8..53596bc 100644 --- a/src/libs6dns/s6dns_message_parse_answer_mx.c +++ b/src/libs6dns/s6dns_message_parse_answer_mx.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include #include diff --git a/src/libs6dns/s6dns_message_parse_answer_soa.c b/src/libs6dns/s6dns_message_parse_answer_soa.c index d78b0b2..860972f 100644 --- a/src/libs6dns/s6dns_message_parse_answer_soa.c +++ b/src/libs6dns/s6dns_message_parse_answer_soa.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include #include diff --git a/src/libs6dns/s6dns_message_parse_answer_srv.c b/src/libs6dns/s6dns_message_parse_answer_srv.c index 526d18c..c1b469a 100644 --- a/src/libs6dns/s6dns_message_parse_answer_srv.c +++ b/src/libs6dns/s6dns_message_parse_answer_srv.c @@ -1,8 +1,10 @@ /* ISC license. */ #include -#include + +#include #include + #include #include diff --git a/src/libs6dns/s6dns_message_parse_answer_strings.c b/src/libs6dns/s6dns_message_parse_answer_strings.c index 66ed36b..72c8f7e 100644 --- a/src/libs6dns/s6dns_message_parse_answer_strings.c +++ b/src/libs6dns/s6dns_message_parse_answer_strings.c @@ -2,9 +2,11 @@ #include #include -#include + +#include #include #include + #include int s6dns_message_parse_answer_strings (s6dns_message_rr_t const *rr, char const *packet, unsigned int packetlen, unsigned int pos, unsigned int section, void *stuff) diff --git a/src/libs6dns/s6dns_message_parse_getrr.c b/src/libs6dns/s6dns_message_parse_getrr.c index 8db0c5d..fdfb6dd 100644 --- a/src/libs6dns/s6dns_message_parse_getrr.c +++ b/src/libs6dns/s6dns_message_parse_getrr.c @@ -1,9 +1,11 @@ /* ISC license. */ #include -#include + +#include #include #include + #include int s6dns_message_parse_getrr (s6dns_message_rr_t_ref rr, char const *packet, unsigned int packetlen, unsigned int *pos) diff --git a/src/libs6dns/s6dns_message_parse_init.c b/src/libs6dns/s6dns_message_parse_init.c index fe38e68..cca8150 100644 --- a/src/libs6dns/s6dns_message_parse_init.c +++ b/src/libs6dns/s6dns_message_parse_init.c @@ -1,7 +1,9 @@ /* ISC license. */ #include -#include + +#include + #include int s6dns_message_parse_init (s6dns_message_header_t *h, s6dns_message_counts_t *counts, char const *packet, unsigned int packetlen, unsigned int *pos) diff --git a/src/skadns/skadns_update.c b/src/skadns/skadns_update.c index e26ead0..b6dcca0 100644 --- a/src/skadns/skadns_update.c +++ b/src/skadns/skadns_update.c @@ -1,20 +1,20 @@ /* ISC license. */ -/* Hey, OpenBSD, are you aware ECANCELED is POSIX? */ -#ifndef _BSD_SOURCE -#define _BSD_SOURCE -#endif +#include #include #include #include #include + +#include #include #include #include #include #include #include + #include static int msghandler (struct iovec const *v, void *context) -- cgit v1.2.3