IPv6 gateway support
This implements the dbus interface plumbing needed to properly get and
set the defaultGateway6 property.
Tested:
Made sure manual changes to the default route were discovered.
Changed the route via the dbus interface and saw it write the
correct entry to the .network file. Ensured that restarting the
daemon and the BMC preserved the defaultGateway6 field.
Change-Id: Ida6a168e0df0a42b4e0d3f6d569ec2fe1f9adaab
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/routing_table.hpp b/routing_table.hpp
index 10198d8..4943a4a 100644
--- a/routing_table.hpp
+++ b/routing_table.hpp
@@ -60,9 +60,9 @@
Map getRoutes();
/**
- * @brief gets the default gateway.
+ * @brief gets the default v4 gateway.
*
- * @returns the default gateway.
+ * @returns the default v4 gateway.
*/
std::string getDefaultGateway() const
{
@@ -70,6 +70,16 @@
};
/**
+ * @brief gets the default v6 gateway.
+ *
+ * @returns the default v6 gateway.
+ */
+ std::string getDefaultGateway6() const
+ {
+ return defaultGateway6;
+ };
+
+ /**
* @brief get the gateway for the network.
* @param[in] addressFamily - ip address family(AF_INET/AF_INET6)
* @param[in] ipaddress - ip address.
@@ -94,8 +104,9 @@
*/
void parseRoutes(const struct nlmsghdr* nlHdr);
- std::string defaultGateway; // default gateway
- Map routeList; // List of routes
+ std::string defaultGateway; // default gateway
+ std::string defaultGateway6; // default gateway
+ Map routeList; // List of routes
};
} // namespace route