diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-10-08 23:02:37 +0000 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2010-10-08 23:02:37 +0000 |
commit | b1d5cf7348105cb8205b0fe7c54494b1fefd80cf (patch) | |
tree | 2340c3e903bee18c13cf3eee80101b460ec0a1fc /ext/standard/dns.c | |
parent | dd5d1b2b66d3ad949609e76127913d46bf7cf573 (diff) | |
download | php-git-b1d5cf7348105cb8205b0fe7c54494b1fefd80cf.tar.gz |
- Added numeric record type and raw data for unknown DNS
record types.
Diffstat (limited to 'ext/standard/dns.c')
-rw-r--r-- | ext/standard/dns.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 103d6904f8..22c44525e4 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -679,7 +679,15 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int add_assoc_string(*subarray, "replacement", name, 1); break; default: - cp += dlen; + { + char buf[10]; /* max length of short + sizeof(id #) */ + snprintf(buf, 10, "id #%hu", type); + buf[10-1] = '\0'; + add_assoc_string(*subarray, "type", buf, 1); + add_assoc_stringl(*subarray, "data", (char*) cp, (uint) dlen, 1); + cp += dlen; + break; + } } add_assoc_string(*subarray, "class", "IN", 1); |