#
ab27a819 |
| 02-May-2023 |
Ravi Teja <raviteja28031990@gmail.com> |
Add network static gateway configuration support
This commit enables static gateway configuration on EthernetInterface Implements CreateStaticGateway method which creates a new d-bus object with Sta
Add network static gateway configuration support
This commit enables static gateway configuration on EthernetInterface Implements CreateStaticGateway method which creates a new d-bus object with StaticGateway interface.
Tested By: Run StaticGateway D-bus method and verified D-bus object and configuration. Delete StaticGateway object Add static gateway Delete static gateway
Change-Id: I3fbc6f85ede00b6c1949a0ac85f501037a69c831 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
#
3865db2a |
| 27-Sep-2023 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Replace originIsManuallyAssigned with inline test
The originIsManuallyAssigned function does not need to be present.
When automatic link local addresses are active, the conditional compilation made
Replace originIsManuallyAssigned with inline test
The originIsManuallyAssigned function does not need to be present.
When automatic link local addresses are active, the conditional compilation made sure to only test for addresses of 'static' origin.
When manual link local addresses are active, by definition the address assignment is done using a IPSRC == static action. It is not possible to use IPMI or Redfish to assert a "link local" flag. Thus all link local addresses are merely statically assigned addresses. The systemd-network stack asserts the link local scope based on the IP address assigned.
Tested: Enabled LINK_LOCAL_AUTOCONFIGURATION and used DHCP and static address assignments. When DHCPv4 is turned off, a link local address is assigned to the link. With DHCPv4 turned on, the link local address is disabled.
Explicitly adding a static address inside the 169.254 address space causes systemd to report the address scope to be link local.
Restoring DHCPv4 disables all link local addresses per IETF RFCs.
Manually disabled LINK_LOCAL_AUTOCONFIGURATION, as phosphor-network does provide dynamic control. Disabled DHCPv4 and confirmed there are no link local or DHCPv4 addresses. Assigned a 169.254.x.x address w/o DHCPv4 or LinkLocalAddressing. Confirmed a "scope link" address was reported via 'ip addr'.
Change-Id: I4d7e55dc3014b5b0acdd12bd8ac85ea650c13b9c Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
8e3c1fbd |
| 12-Mar-2024 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Use ActivationPolicy to enable/disable network interfaces
The systemd.network "Unmanaged" control, used to cause a network interface to prevent a NIC from being configured by systemd is too aggressi
Use ActivationPolicy to enable/disable network interfaces
The systemd.network "Unmanaged" control, used to cause a network interface to prevent a NIC from being configured by systemd is too aggressive. The goal is to control the IFF_UP/IFF_DOWN state of the NIC.
The systemd-networkd developers, as part of discussions around "Unmanaged", created an alternate control to perform the required action. The control is called ActivationPolicy.
Switch from using Unmanaged to ActivationPolicy in order to manage IFF_UP/IFF_DOWN conditions.
Tested: The systemd-network.service initial state has no ActivationPolicy entry. The default state is for ActivationPolicy to be enabled.
Issued a Redfish request: PATCH :url/redfish/v1/Managers/bmc/EthernetInterfaces/eth1 { "InterfaceEnabled": false } to assign "ActivationPolicy=down", and causing the link to stay down until another request re-enables it. Confirmed the NIC is IFF_DOWN, and the systemd.network configuration file contains ActivationPolicy=down.
Sending another request to set InterfaceEanbled: "true" causes the entry to be removed from the systemd.network file, and the NIC enters the IFF_UP state.
Change-Id: I8b5bb4d30a1c7282494526169f65e0eda26e04cf Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
ad205028 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I335e0c726360eaae85b9b54c16b5dcbe4a3f182e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
91f60564 |
| 17-Apr-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
IPv4/IPv6 Gateway: Configure GatewayOnLink
Currently when both interfaces configured static ip addresses and one of that static ip address is in private network then while reload network configurati
IPv4/IPv6 Gateway: Configure GatewayOnLink
Currently when both interfaces configured static ip addresses and one of that static ip address is in private network then while reload network configuration further, route order keep changes and interface with private network is not reachable when other gateway route is on the top of routing table.
This commit configures IPv4/IPv6 static gateway using systemd-networkd's Route option and sets GatewayOnLink option and make sure interfaces network reachable irrespective of route order while reloading networkd.
Tested By: configure one interface in static and other interface DHCP. configure both interfaces with static IP and one interface on private network.
Sample IPv4 network route added in systemd-networkd configuration file [Route] GatewayOnLink=true Gateway=9.10.x.1
Change-Id: Id7c9ba74cf7e71e6105536c5affc905754cae908 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
#
945878a4 |
| 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
ethernet_interface: Write an update marker to tmpfs
Currently, many BMC systems use JFFS2 as a filesystem for their RWFS. JFFS2 doesn't support sub-second timestamps, and we sometimes have instances
ethernet_interface: Write an update marker to tmpfs
Currently, many BMC systems use JFFS2 as a filesystem for their RWFS. JFFS2 doesn't support sub-second timestamps, and we sometimes have instances of configuration writes happening within the same second around a networkd reload. The second write is then ignored upon the next networkd reload as the timestamp of the file hasn't changed!
Therefore, we leverage tmpfs which has higher precision timestamps as a mechanism to guarantee networkd sees our updates without making extra changes to networkd or writes to the RWFS.
Tested: Verified that during a gateway set operation (or any other property write) the updated file is set with microsecond granularity. Also verified that subsequent updates change the timestamp and it's set right before networkd reloads for MAC updates.
Change-Id: Ibfd0463166223d0e4a6f7205d780f4de8590a0c1 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
fad525c0 |
| 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
ethernet_interface: Emit DHCP objects after parent
We don't want the DHCP objects to get emitted onto the bus if the parent hasn't been submitted yet, change the ordering to make more sense.
Change
ethernet_interface: Emit DHCP objects after parent
We don't want the DHCP objects to get emitted onto the bus if the parent hasn't been submitted yet, change the ordering to make more sense.
Change-Id: Ib97b2a82586a41eb5bc2cfe421864b2cb729c0e2 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
44937b1a |
| 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
dhcp_configuration: SendHostname is valid for v4 and v6
We should present this option for both DHCP types as systemd supports it for both. It would be surprising to an end user if DHCPv6 just ate th
dhcp_configuration: SendHostname is valid for v4 and v6
We should present this option for both DHCP types as systemd supports it for both. It would be surprising to an end user if DHCPv6 just ate this option without passing it along.
Change-Id: I7ae046c0a92ab199e2026ffe3dfb78b8763223a0 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
f179e70c |
| 17-Apr-2024 |
William A. Kennington III <wak@google.com> |
ethernet_interface: Simplify DHCPConfiguration enumeration
We don't have more than 2 types of DHCP objects, don't use an arbitrary vector and depend on enum values for indices.
Change-Id: I5c519e8b
ethernet_interface: Simplify DHCPConfiguration enumeration
We don't have more than 2 types of DHCP objects, don't use an arbitrary vector and depend on enum values for indices.
Change-Id: I5c519e8b95b273a4684e553f18027f038d025f17 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
b6595b29 |
| 23-Feb-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
DHCP Config: Add DomainEnabled D-bus property
This commit implements DomainEnabled D-bus property for DHCP configuration. When DomainEnabled is set to true then the domain names received from the DH
DHCP Config: Add DomainEnabled D-bus property
This commit implements DomainEnabled D-bus property for DHCP configuration. When DomainEnabled is set to true then the domain names received from the DHCP server
Tested by: Set DomainEnabled D-bus property to true or false Check domain name configured on BMC
Change-Id: Ia3db5f5054d4c758be336851175b05ddc05d2eda Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
#
57dfea94 |
| 05-May-2023 |
Jishnu CM <jishnunambiarcm@duck.com> |
Configure DHCP4 and DHCP6 parameters independently
At present, DHCP parameters like DNSEnabled, NTPEnabled etc. are shared between DHCPv4 and DHCPv6 in the network configuration.
Hence any update o
Configure DHCP4 and DHCP6 parameters independently
At present, DHCP parameters like DNSEnabled, NTPEnabled etc. are shared between DHCPv4 and DHCPv6 in the network configuration.
Hence any update on the ipv4 parameters impacts the ipv6 and get applied to both the interfaces.
This change is to enable the possibility to configure DHCP attributes independently, by having different dbus objects for dhcp4 and dhcp6 and moving the dhcp configuration from network level to ethernet interface.
tested by:
Used the busctl command to set and get the parameter values individually for both DHCPv4 and DHCPv6. Verified the network configuration file is updated accordingly
Tree Structure: busctl tree xyz.openbmc_project.Network `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/network |-/xyz/openbmc_project/network/config |-/xyz/openbmc_project/network/eth0 | |-/xyz/openbmc_project/network/eth0/dhcp4 | `-/xyz/openbmc_project/network/eth0/dhcp6 `-/xyz/openbmc_project/network/eth1 |-/xyz/openbmc_project/network/eth1/dhcp4 `-/xyz/openbmc_project/network/eth1/dhcp6
Change-Id: If7dbbf596bdaf866ea459d631e716153f54302ec Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
show more ...
|
#
581cb0b3 |
| 21-Mar-2023 |
nitinkotania <gitnkotania@gmail.com> |
Avoid writing duplicate DNS entries to config file
Currently, we store the dbus DNS values in a vector without checking duplicate entries. which allows duplicate entries to be saved if the user supp
Avoid writing duplicate DNS entries to config file
Currently, we store the dbus DNS values in a vector without checking duplicate entries. which allows duplicate entries to be saved if the user supplies same DNS server settings multiple times.
With this commit, we will check duplicate entries and remove them to get a unique list of DNS values.
Tested By: PATCH -d '{"StaticNameServers":["10.4.5.60", "10.4.5.60"]}' https://${bmc_ip}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
Change-Id: I0c18eb5fec36c4305f1ded4c5e57bbd046ca4576 Signed-off-by: nitinkotania <gitnkotania@gmail.com>
show more ...
|
#
af38fe9d |
| 12-Oct-2023 |
Yuxiao Zhang <yuxiaozhang@google.com> |
phosphor-networkd: write down the config when GW changes
We saw issues when gateway is set in phosphor networkd but not in the systemd config files. This will ensure that systemd is in sync with pho
phosphor-networkd: write down the config when GW changes
We saw issues when gateway is set in phosphor networkd but not in the systemd config files. This will ensure that systemd is in sync with phosphor networkd when gateway changes.
Change-Id: Iff2ddd8cd4ee7eb5935adb59dcb9ab7a4b170795 Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
show more ...
|
#
40f9b3d8 |
| 06-Oct-2023 |
Ravi Teja <raviteja28031990@gmail.com> |
Remove unrelevant comments
This commit removes unrelevant comments which are nolonger needed This issue is no longer applies for latest networkd code. https://github.com/openbmc/openbmc/issues/1751
Remove unrelevant comments
This commit removes unrelevant comments which are nolonger needed This issue is no longer applies for latest networkd code. https://github.com/openbmc/openbmc/issues/1751
Change-Id: I1ad6952478cce0a1dbbad89577073ccdeb1e6739 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
#
4693807c |
| 26-Sep-2023 |
Yuxiao Zhang <yuxiaozhang@google.com> |
Fix race condition for mac setting
We have observed that if systemd-networkd reload is invoked by some other process after a mac config kick off but before the real phosphor-networkd reload, the int
Fix race condition for mac setting
We have observed that if systemd-networkd reload is invoked by some other process after a mac config kick off but before the real phosphor-networkd reload, the interface will be down and never be brought back up. This CL ensures that the reload happens by touching the config file.
Change-Id: I094b4dd71b37bb3b61837ee49a3b6d244cc8fe86 Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
show more ...
|
#
fabe3956 |
| 08-Sep-2023 |
Johnathan Mantey <johnathanx.mantey@intel.com> |
Revert "ethernet_interface: Fix link local autoconfiguration functio
This reverts commit 721d8f75fb6d8d22cc4afc11b06288a47a1a600d.
Commit 721d8f75 causes undesirable behavior when working with Link
Revert "ethernet_interface: Fix link local autoconfiguration functio
This reverts commit 721d8f75fb6d8d22cc4afc11b06288a47a1a600d.
Commit 721d8f75 causes undesirable behavior when working with Link Local addresses.
Automatic Link Local addressing needs to allow the systemd-network stack to automatically add/remove a link local address. When DHCPv4 addressing is enabled the link local needs to be automatically disabled. When DHCPv4 addressing is disabled the link local address must automatically be activated.
With commit 721d8f75 active this behavior does not occur. What happens instead is when DHCPv4 is disabled, and then re-enabled a STATIC Link Local address is added to the networkd.conf file. Once there the Link Local address is present until actively removed. This causes the Link Local addressing to quit being "automatic".
Automatic Link Local addressing creates an address with the "scope" assigned to LINK_LOCAL_AUTOCONFIGURATION, and a "address origin" equal to IP::AddressOrigin::Static (i.e. IFA_F_PERMANENT is true).
ethernet_interface.cpp addAddr(): adr: 169.254.147.57/16 scp: 000000fd flg: 00000080 ethernet_interface.cpp addAddr(): adr: fe80::207:e9ff:fe34:3c6f/64 scp: 000000fd flg: 00000080
There are also undesirable side effects in the IPMI Get LAN Configuration command when querying IPv6 Dynamic Addresses (Param 59). The Link Local address now gets included in the DHCPv6 assigned addresses despite the IFA_F_PERMANENT flag being asserted.
Tested: Reverted the commit. Disabled and Enabled DHCPv4 and confirmed 169.x.x.x addresses are no longer written to the network.conf file. Confirmed LLv6 addresses are no longer reported via the IPMI Get LAN Config command.
Change-Id: I272653dca61b96b360f03dfdf00d7ca57b7e0b63 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
show more ...
|
#
4f8b9a0b |
| 06-Sep-2023 |
Ravi Teja <raviteja28031990@gmail.com> |
DHCP: Populate nameservers D-bus property from resolv.conf
Currently when DHCP enabled, nameservers D-bus property does not have updated DHCP provided nameservers.
This commit populates nameservers
DHCP: Populate nameservers D-bus property from resolv.conf
Currently when DHCP enabled, nameservers D-bus property does not have updated DHCP provided nameservers.
This commit populates nameservers D-bus property from resolv.conf
Tested By: verify nameservers D-bus property value with DHCP enable/disable
Change DHCP server nameservers configuration & verify name servers D-bus property updated on the interface.
Change-Id: If1a2508927d5f4f0c9c5d8b3f533fdf384d68821 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
#
9caa64de |
| 04-Sep-2023 |
Patrick Rudolph <patrick.rudolph@9elements.com> |
ethernet_interface: Fix configuration
Include config.h to satisfy #ifdefs used in code. Fixes config 'persist-mac' and 'uboot-env' having no effect.
Change-Id: I27a4984dc069871dc757388494fcf145069a
ethernet_interface: Fix configuration
Include config.h to satisfy #ifdefs used in code. Fixes config 'persist-mac' and 'uboot-env' having no effect.
Change-Id: I27a4984dc069871dc757388494fcf145069a6143 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
show more ...
|
#
05cbc5b7 |
| 20-Jul-2023 |
William A. Kennington III <wak@google.com> |
ethernet_interface: IPv6 Gateway is dynamic based on RA
The previous logic is technically incorrect, the gateway does not come from DHCPv6 as the protocol is not intended to communicate the gateway.
ethernet_interface: IPv6 Gateway is dynamic based on RA
The previous logic is technically incorrect, the gateway does not come from DHCPv6 as the protocol is not intended to communicate the gateway. Instead, this value is dynamic based on RA.
Change-Id: I1167204efaed422ef616250f34d181bc29666a75 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
cafc1512 |
| 25-Jul-2023 |
William A. Kennington III <wak@google.com> |
treewide: Convert most fmt::format -> std::format
Change-Id: I3c9ac1eed1c86c6cd9f7fd3a1ba356734e79f937 Signed-off-by: William A. Kennington III <wak@google.com>
|
#
8664252a |
| 24-Jul-2023 |
William A. Kennington III <wak@google.com> |
treewide: Remove uses of FMT_COMPILE
We can use stdplus::strCat which takes even less code space.
Change-Id: I91185afa7f5d9041ca7477eb19d5d53755ed329d Signed-off-by: William A. Kennington III <wak@
treewide: Remove uses of FMT_COMPILE
We can use stdplus::strCat which takes even less code space.
Change-Id: I91185afa7f5d9041ca7477eb19d5d53755ed329d Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
86c4f44d |
| 19-Jul-2023 |
Ravi Teja <raviteja28031990@gmail.com> |
Fix IPv4 DHCP address origin
This commit popluates DHCPv4 address origin.
Tested By: Check origin of LinkLocal IPv4 and IPv6 addresses. Enable DHCPv4 and check origin of DHCP IP Assign static addre
Fix IPv4 DHCP address origin
This commit popluates DHCPv4 address origin.
Tested By: Check origin of LinkLocal IPv4 and IPv6 addresses. Enable DHCPv4 and check origin of DHCP IP Assign static address and check origin of static address Enable DHCv6 and check origin of DHCP addresses Enable DHCPv6 stateless addresses and check origin
Change-Id: I1d35829cf5b0c981621b5d476ac349567d8d9bdd Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
#
c6201207 |
| 28-Mar-2023 |
Ravi Teja <raviteja28031990@gmail.com> |
Populate address origin based on ifa_flags
Currently origin of ip address is populated based on DHCP enabled flag so when DHCP is enabled then all static addresses are marked as DHCP addresses and w
Populate address origin based on ifa_flags
Currently origin of ip address is populated based on DHCP enabled flag so when DHCP is enabled then all static addresses are marked as DHCP addresses and when DHCP is disabled all static addresses marked as Static addresses.
This commit populates address origin based on ifa_flags from rtnetlink message to fix this address origin issue.
Tested by: Check origin of D-bus object for different type of v4/v6 addresses Verified DHCPv4/v6 enable, disable with static addresses configured.
Change-Id: I554e9353107ba62b638654d91b5dfe2c6ee90a03 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
#
721d8f75 |
| 07-Jul-2023 |
Tim Lee <timlee660101@gmail.com> |
ethernet_interface: Fix link local autoconfiguration functionality
When this option "default-link-local-autoconf" be enabled by default, that will enable link local autoconfiguration feature. Howeve
ethernet_interface: Fix link local autoconfiguration functionality
When this option "default-link-local-autoconf" be enabled by default, that will enable link local autoconfiguration feature. However, seems the logical is mismatch in EthernetInterface::originIsManuallyAssigned. Fix the logical to match code with option for correct functionality.
Change-Id: I5a4493d1230caef60031e7b366bc41da7b5e82f4 Signed-off-by: Tim Lee <timlee660101@gmail.com>
show more ...
|
#
30f3ba2c |
| 28-Jun-2023 |
William A. Kennington III <wak@google.com> |
ethernet_interface: Validate IP addresses
We don't want multicast or link local addresses to be assignable as IPs. Right now they won't do what the user expects and it causes undefined problems with
ethernet_interface: Validate IP addresses
We don't want multicast or link local addresses to be assignable as IPs. Right now they won't do what the user expects and it causes undefined problems with the configuration.
Change-Id: Idefac159b7ce8b53988ddb4501a1c9321b2e6588 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|