patchpanel: ndproxy: assign public v6 addr to guest-facing ifs

Currently there is no public IPv6 address assigned on the
guest-facing interfaces (arc bridges and taps) when device is on
IPv6 network. This is causing Linux choosing a wrong src address
on packets directly originated from host to guest and drop the
returning traffic.

This patch generates an EUI-64 address based on virtual interface
MAC address upon receiving an RA, and add it to the interface.

BUG=chromium:1069985
TEST=unit;fuzz
TEST=manual(deploy on octopus and verify pinging penguin from host)

Change-Id: Id3ae953df6b3c84411461294bbc8dbd236cef901
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2428652
Tested-by: Taoyu Li <taoyl@chromium.org>
Reviewed-by: Garrick Evans <garrick@chromium.org>
Reviewed-by: Hugo Benichi <hugobenichi@google.com>
Commit-Queue: Taoyu Li <taoyl@chromium.org>
diff --git a/patchpanel/message_dispatcher.h b/patchpanel/message_dispatcher.h
index 9f79bf3..c3e29f7 100644
--- a/patchpanel/message_dispatcher.h
+++ b/patchpanel/message_dispatcher.h
@@ -26,6 +26,9 @@
 
   void RegisterFailureHandler(const base::Callback<void()>& handler);
 
+  void RegisterNDProxyMessageHandler(
+      const base::Callback<void(const NDProxyMessage&)>& handler);
+
   void RegisterGuestMessageHandler(
       const base::Callback<void(const GuestMessage&)>& handler);
 
@@ -41,6 +44,7 @@
   base::ScopedFD fd_;
   std::unique_ptr<base::FileDescriptorWatcher::Controller> watcher_;
   base::Callback<void()> failure_handler_;
+  base::Callback<void(const NDProxyMessage&)> ndproxy_handler_;
   base::Callback<void(const GuestMessage&)> guest_handler_;
   base::Callback<void(const DeviceMessage&)> device_handler_;