Write Separate Route section for different Routes
Each route should be its own Route Section.
Change-Id: I697d9d7e1cf2b1656cea7c31f9c342067a486fd2
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index e388fa8..51eaf85 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -603,7 +603,6 @@
}
// write the route section
- stream << "[" << "Route" << "]\n";
for (const auto& addr : addrs)
{
if (addr.second->origin() == AddressOrigin::Static)
@@ -621,6 +620,7 @@
destination != "0.0.0.0" &&
destination != "")
{
+ stream << "[" << "Route" << "]\n";
stream << "Gateway=" << addr.second->gateway() << "\n";
stream << "Destination=" << destination << "\n";
}