Make netd listen for and notify RDNSS options.

Bug: 9180552
Change-Id: Id2485b35c2299cfc455dd2b3b725136e5eb2a7e4
diff --git a/NetlinkHandler.cpp b/NetlinkHandler.cpp
index 51720f8..534f386 100644
--- a/NetlinkHandler.cpp
+++ b/NetlinkHandler.cpp
@@ -76,6 +76,12 @@
             if (iface && flags && scope) {
                 notifyAddressChanged(action, address, iface, flags, scope);
             }
+        } else if (action == evt->NlActionRdnss) {
+            const char *lifetime = evt->findParam("LIFETIME");
+            const char *servers = evt->findParam("SERVERS");
+            if (lifetime && servers) {
+                notifyInterfaceDnsServers(iface, lifetime, servers);
+            }
         }
 
     } else if (!strcmp(subsys, "qlog")) {
@@ -151,3 +157,10 @@
            (action == NetlinkEvent::NlActionAddressUpdated) ?
            "updated" : "removed", addr, iface, flags, scope);
 }
+
+void NetlinkHandler::notifyInterfaceDnsServers(const char *iface,
+                                               const char *lifetime,
+                                               const char *servers) {
+    notify(ResponseCode::InterfaceDnsInfo, "DnsInfo servers %s %s %s",
+           iface, lifetime, servers);
+}