Support root requests with EDNS0 OPT records
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 16 Jun 2010 14:01:01 +0000 (16:01 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 16 Jun 2010 14:06:01 +0000 (16:06 +0200)
commit127639e998a56ae30f3cbea9359748ab807ed2a1
treebfef3c93592050a9b4ecdd544e54b72795154a91
parent11281de04f7707ebcaf4050ae6ad5d48907b956a
Support root requests with EDNS0 OPT records

A DNS request with a 0 length QNAME and an additional record (e.g. an
EDNS0 one) is a valid one. A root nameservers request sent by a client
requesting for EDNS0 is one of those.
So label_count can potentially be left at 0 with the EDNS0 record still
to be parsed. In that case label_ptr should just be moved one byte forward,
instead of staying at NULL. The latter will cause segmentation fault when
trying to dereference it from the EDNS0 record parsing code.
plugins/dnsproxy.c