Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/postfix/src/dns parse T_AAAA responses. patch sent...
details: https://anonhg.NetBSD.org/src/rev/76a67f282ea7
branches: trunk
changeset: 534134:76a67f282ea7
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Jul 17 21:23:04 2002 +0000
description:
parse T_AAAA responses. patch sent to wietse.
diffstat:
gnu/dist/postfix/src/dns/dns_lookup.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diffs (29 lines):
diff -r d0b08d613540 -r 76a67f282ea7 gnu/dist/postfix/src/dns/dns_lookup.c
--- a/gnu/dist/postfix/src/dns/dns_lookup.c Wed Jul 17 21:21:46 2002 +0000
+++ b/gnu/dist/postfix/src/dns/dns_lookup.c Wed Jul 17 21:23:04 2002 +0000
@@ -132,6 +132,7 @@
} DNS_REPLY;
#define INET_ADDR_LEN 4 /* XXX */
+#define INET6_ADDR_LEN 16 /* XXX */
/* dns_query - query name server and pre-parse the reply */
@@ -337,6 +338,17 @@
memcpy(temp, pos, fixed->length);
data_len = fixed->length;
break;
+ case T_AAAA:
+ if (fixed->length != INET6_ADDR_LEN) {
+ msg_warn("extract_answer: bad address length: %d", fixed->length);
+ return (0);
+ }
+ if (fixed->length > sizeof(temp))
+ msg_panic("dns_get_rr: length %d > DNS_NAME_LEN",
+ fixed->length);
+ memcpy(temp, pos, fixed->length);
+ data_len = fixed->length;
+ break;
case T_TXT:
data_len = MIN2(pos[0] + 1, MIN2(fixed->length + 1, sizeof(temp)));
for (src = pos + 1, dst = (unsigned char *) (temp);
Home |
Main Index |
Thread Index |
Old Index