diff options
author | William A. Kennington III <wak@google.com> | 2019-02-01 21:12:02 -0800 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2019-02-21 12:34:29 -0800 |
commit | d3c249ce77b4973d5809a0e1dc0ec3fffb3da222 (patch) | |
tree | 0da5ee55f937e643c8c2a42ac305cf6136f57984 /ethernet_interface.cpp | |
parent | 00506d82189984ad4dc01c7c6b096a1c6281699d (diff) | |
download | phosphor-networkd-d3c249ce77b4973d5809a0e1dc0ec3fffb3da222.tar.gz phosphor-networkd-d3c249ce77b4973d5809a0e1dc0ec3fffb3da222.zip |
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>
Diffstat (limited to 'ethernet_interface.cpp')
-rw-r--r-- | ethernet_interface.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp index 4825e5b..5416f74 100644 --- a/ethernet_interface.cpp +++ b/ethernet_interface.cpp @@ -573,6 +573,11 @@ void EthernetInterface::writeConfigurationFile() { stream << "Gateway=" << gateway << "\n"; } + const auto& gateway6 = manager.getSystemConf()->defaultGateway6(); + if (!gateway6.empty()) + { + stream << "Gateway=" << gateway6 << "\n"; + } } // write the route section |