diff options
author | Oskar Senft <osk@google.com> | 2018-07-26 16:32:23 -0400 |
---|---|---|
committer | osk <osk@google.com> | 2018-08-13 14:23:32 +0000 |
commit | ad21fc2a868122aee973ed5d4f1c652ec2749533 (patch) | |
tree | 7c90b1b9d3b775c31eef771bd5257ef6a6045393 /ethernet_interface.cpp | |
parent | d8bad197fb6d7a18c52d19f472676ecae8ec900d (diff) | |
download | phosphor-networkd-ad21fc2a868122aee973ed5d4f1c652ec2749533.tar.gz phosphor-networkd-ad21fc2a868122aee973ed5d4f1c652ec2749533.zip |
Add configure option to disable link-local IP address autoconfiguration.
Change-Id: I845ec44a305e91a4880dc1266a3d212db0b4737c
Signed-off-by: Oskar Senft <osk@google.com>
Diffstat (limited to 'ethernet_interface.cpp')
-rw-r--r-- | ethernet_interface.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp index d887bf5..b70db40 100644 --- a/ethernet_interface.cpp +++ b/ethernet_interface.cpp @@ -555,7 +555,11 @@ void EthernetInterface::writeConfigurationFile() // write the network section stream << "[" << "Network" << "]\n"; +#ifdef LINK_LOCAL_AUTOCONFIGURATION stream << "LinkLocalAddressing=yes\n"; +#else + stream << "LinkLocalAddressing=no\n"; +#endif stream << "IPv6AcceptRA=false\n"; // Add the VLAN entry @@ -587,7 +591,11 @@ void EthernetInterface::writeConfigurationFile() // Static for (const auto& addr : addrs) { - if (addr.second->origin() == AddressOrigin::Static) + if (addr.second->origin() == AddressOrigin::Static +#ifndef LINK_LOCAL_AUTOCONFIGURATION + || addr.second->origin() == AddressOrigin::LinkLocal +#endif + ) { std::string address = addr.second->address() + "/" + std::to_string(addr.second->prefixLength()); |