patchpanel: Update DNS library from Chrome
Update DNS code used by patchpanel's multicast forwarder
from Chrome's "net/dns" with the latest commit hash of
ad67ec1efbf21306b583c4daf34cf2ba4c591237 from M88.
These files are direct copies from Chrome's code with
modifications. Modifications are done by removing code
with unnecessary dependencies (only import the needed
functionalities, listed below).
For example, functions to create DNS queries are not added.
This patch is required for dns-proxy (go/cros-dns-proxy)
to:
- parse DNS query,
- create DNS response from DNS answers.
The code that will be used for dns-proxy:
- DnsQuery::Parse,
- DnsResponse::WriteHeader, WriteAnswer, ...
BUG=b:171157891
TEST=units
TEST=multicast forwarder works
Change-Id: Ib32c0f92ca63b2095a957210d6dbd874eada62b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2505850
Tested-by: Jason Jeremy Iman <jasongustaman@chromium.org>
Commit-Queue: Jason Jeremy Iman <jasongustaman@chromium.org>
Reviewed-by: Garrick Evans <garrick@chromium.org>
diff --git a/patchpanel/dns/io_buffer.h b/patchpanel/dns/io_buffer.h
index 60cc840..529306d 100644
--- a/patchpanel/dns/io_buffer.h
+++ b/patchpanel/dns/io_buffer.h
@@ -15,7 +15,7 @@
#include "base/memory/ref_counted.h"
#include "base/pickle.h"
-namespace net {
+namespace patchpanel {
// IOBuffers are reference counted data buffers used for easier asynchronous
// IO handling.
@@ -253,6 +253,6 @@
~WrappedIOBuffer() override;
};
-} // namespace net
+} // namespace patchpanel
#endif // PATCHPANEL_DNS_IO_BUFFER_H_