| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to be able to configure interfaces which are not running. Just
because we don't have a cable plugged into the machine doesn't mean we
don't want to have the option to configure it from the host
Tested:
Built an image and made sure the interface was now present and
configurable even if it had no link present.
Change-Id: Ib93ddddc8ca015fe024209fa9cbeb5fc24421728
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
This will be nice to have for ipmid so that it can easily figure out the
path of the new vlan object when it creates one.
Change-Id: I6b93c5e64499c0cb9e36e8354eda6089bfd6d6c9
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
This should be slightly faster and is more standard for interop with
other programs using the same conversion functions.
Change-Id: I4d7a2cb4df2173afda421c5b41ee5e98e722d6c6
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We shouldn't be hardcoding paths and link stages against libnl since it
provides the needed package config files to do that for us.
Tested:
Builds and passes unit tests in our unit test container environment.
Change-Id: I46277fff25720119c90b827b4a3d7333bbe8766b
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
Currently, the create interface doesn't return the Object identifier,
this commit is to modify Create Inferface to return the object identifier.
Change-Id: Icbd30481a1173a0c2b8dbe32ba913504555a119a
Signed-off-by: raviteja-b <raviteja28031990@gmail.com>
|
|
|
|
|
|
|
|
|
| |
gcc does not guarantee support for -isystem=<directory> syntax. It
typically expects the flag to be in the form of 2 arguments `-isystem
<directory>`. Update this so it works with all versions of gcc.
Change-Id: I324446b414bc327961641c39dd36a3131c3bc5e1
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
Nothing but our code references these variable so lets just define them
where they are needed instead of having the configure script populate
them.
Change-Id: Ibd08d0698488febf5ea1cc8d6c14379ea6a50051
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are realistically not configurable by the end user and could be
provided as a runtime configuration if needed so that custom networkd
binaries are not needed for each different busname.
Configure variable substitution was kept to ensure the value is
consistent between all of the source files.
Change-Id: Ic6d50a80b48e2cfc07e48067089236010894e71b
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
They are not actually variable and defined statically in systemd. This
will make porting to other build systems easier so that we don't have to
duplicate this functionality.
Change-Id: I7752cf4caf12d4424e21cd04276e0f87ecddc335
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
Use the new interface query method provided by manager to know if the
interface was added instead of inspecting the manager itself.
Change-Id: I94600199fd60a014d6b376155555449f7af617f5
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use mocked sdbus interface for sdbusplus such that it doesn't require
talking to the real dbus interfaces.
The warnings for the unexpected calls on the sdbus interface can be
ignored in the cases for this test as returning 0 is the desired
behavior. The warnings can be trivially handled by expecting the calls,
or setting up "ON_CALL" statements.
Change-Id: I8c72eaec957fb6a68eeaac982c1f45998487c35f
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
We should either define a variable or not based on the truth value of
the configure flag. This change removes the AC_ARG_VAR that is
duplicating the functionality of the AC_ARG_ENABLE.
Change-Id: Ia77a1a7b5535418a268a3dd2d08ed488b8c6ae18
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
We want the directory path to be based on the sysconfdir as defined
during the make process. This way anyone overriding sysconfdir during
install won't have to also override the dbus directory.
Change-Id: Icfb8f381e29630592949abb411769ac1829002ae
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
When provided with no action, PKG_CHECK_MODULES errors out with a
similar message to what we are providing directly. Rely on that
mechanism instead of our own errors.
Change-Id: I2344b510baf47469f424e1cf3f4e92398b743d1a
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want to make sure we update the DefaultGateway if it changes.
Otherwise when someone changes our gateway we don't update the state of
the phosphor-network daemon.
Tested:
Editted the default route manually through netlink and saw the
update get picked up in the dbus interface.
Change-Id: Ib4f5bafbdb7615e235f47bc8fa372396491e69e6
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we ultimately handle all of the routes as strings it is safe to
include v6 routes into the table so that we can later support using
those. This has no effect on observed behavior.
Tested:
Used a future change to validate that this was parsing the default
gateway for ipv6 and that old ipv4 parsing still works as expected.
Change-Id: I0fec5788ab31f7b1c4f7f0d7a34023ccdb15d9ba
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
| |
Use system-first search for inclusion of dbus interface headers.
Change-Id: I9953ca047c09c1003c86b1ffaf929698c157139c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Use expect_throw to catch expected exceptions in tests.
Change-Id: I410655a43328d44c5b9f95dff509c132499bcd07
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Use the real manager object for testing the manager object instead of a
derived object.
Change-Id: I3b4a401d43457bffb22de8fac5e29b2e2887c6c6
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't affect the total system behavior but it cleans up error
output from systemd-networkd which doesn't like empty Gateway= lines
when we don't have a set gateway.
Tested:
Set the system to a static configuration with no gateway configured
and saw that the line was no longer written. Configured a gateway
and the line is written as expected.
Change-Id: I1ff9c4f564fab54d0c54e3f87fcd50b623f0fbda
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
No functional change but this will make it cleaner when adding more
types of message to refresh on.
Change-Id: I29ad0d6037fad85efb48394af0517580a3f2216f
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
The concept of an interface having a link local IP is orthogonal to DHCP
vs static addressing and we should never be receiving a link local IP
over DHCP.
Change-Id: I80040054f8c9acad3d3d0afa12c5738b43957a4a
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This one is pretty trivial since there is only one size of mac
address, but we want to be sure we validate the buffer.
Tested:
Built and runs through unit tests. Works when integrated into
neighbor parsing code.
Change-Id: Iaf58fc398b51a3bcbbf70968cbe353beeb7b9f54
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We commonly want to be able to turn netlink network order address data
into the corresponding InAddrAny when parsing netlink data. This makes
it trivial given the address family and data buffer.
Tested:
Ran throgh unit tests and builds fine in a BMC image.
Change-Id: I4ebe1dbd284f150ea03ee091cddda5a06806c01f
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
| |
We need this for future work which turns netlink data into IP addresses.
Tested:
Run through unit tests.
Change-Id: If078b28246509ca2ebd3bf7bab652b84258df0bd
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We need to be able to convert a mac addresses from byte form into our
typical human readable string form.
Tested:
Unit tests pass.
Change-Id: I6e68cfefd4d5962e1125c1b5229e61fce475729a
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
This will be used by future code, mainly for storing data retrieved over
netlink in a typesafe way.
Change-Id: I663e7cdf5876397426338f6a733aa6a7dd8fca95
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
| |
Drop duplicate LT_INIT line from configure_ac.
Change-Id: I7e3c55c944d1e65c56740d6f24c8dea14c301952
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the service file for phosphor-networkd from the bitbake recipe to
the source repository.
Move the dbus configuration file for phosphor-network from a generated
file to the source repository.
Tested: Verified dbus conf and service file were installed where
expected.
Change-Id: Idd1a1872aeb020f6b0e2eb9dba7c2e96198be2af
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleans up the loop and makes sure the interface parsing code
updates the local variables for each iteration of the loop.
Tested:
Built and verified that objects were still being created as
expected.
Change-Id: I5ba442538f6d2b5a4dc6a8a1261777c0303818d1
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we don't reset the failed counter in systemd for a specific service
like systemd-networkd, restarts won't always be issued as expected. If
the service fails due to a bad configuration, future changes that would
normally put it in a valid state will be unable to restart it since it
hit the reset threshold for the given time window.
Tested:
Built and ran on a zaius for testing. Issuing bad network
configuration changes over ipmi no longer prevents future changes
from fixing systemd-networkd.
Change-Id: I646309001a257b12e2df006d8c420c93c5c0bca8
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need to check if the timer is expired and enabled because the
timer will never be expired if it is enabled.
Tested:
Built and networkd still receives link state transitions and
populates the discovered ip addresses correctly.
Change-Id: I066842af9046190541f868d25319016f34012de3
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
For the phosphor-dbus-interfaces check, use PKG_CHECK_MODULES.
The CI wasn't checking for this macro to know to pull phosphor-dbus-interfaces
Also, for consistency. There is not an advantage to using this instead of the
regular package script.
Change-Id: I3c7f2dc4830d461078a1fd35b7ecd72c7260b3b2
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unit test were broken after sd bus calls started throwing exception,
In this repo we start the systemd-networkd with the use of sd bus
calls, which throws exception and it was not handled in the test case.
This commit fixes the problem by mocking the network manager which
mock the functionality of function which makes the sdbus call.
Change-Id: I5b60a2117a661cffa36200415ca611b85dd2fda1
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
If unable to fetch the networkID from the IP address string
This is kind of internal failure where reporting is not needed
and no service action is associated with it.
Change-Id: Ia54226f2dd77a69fd23433730c424ee0e3c6ac57
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
| |
Change-Id: I647741fc3976ca82c39998a518b1de7be5365e80
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new implementation of the timer (the commit 3a70fa24fc016a06b0dc2ecdc3c7275d1f25425c),
we catch the bug in the logic of the rt-link events handler:
If the timer is not started yet, it will never expire.
This commit adds the additional check for the timer activity.
Resolves openbmc/openbmc#3437
Change-Id: I0f8c165c626cc649af8d6550407d2a640f691fce
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
|
|
|
|
|
|
|
|
| |
This cleans up the use of mapbox only .get() variant apis in favor of
the std::get() interface which both implementations provide.
Change-Id: I9ba8301801d68b391fa5195de37b2b0ecec26edf
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
routing_table.hpp: Add const reference to string parameters in
constructor.
Change-Id: I29a4a7db17706eb48cffcd7e6b0c2d72191e27f8
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Added std namespace to places where there is a cpp version, and dropped
unused c headers where found.
Change-Id: Ife538ad73042b020ee2987b70e1f021b9926b2bf
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This looks like it got copied from somewhere. Don't negate the errno,
just return it as-is.
Tested:
Compiled as expected.
Change-Id: I6b28030bf211d12bacab6b69191406e612a6e45f
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This makes them accessible throughout the file and disambiguates what
can propagate from the phosphor::logging namespace.
Tested:
Compiles as expected.
Change-Id: I36a6407e4313c8c2436e7cd3efd8c99ca385882e
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change pulls in sdeventplus and uses the timer implementation as
a drop in for the currently included timer.
Tested:
Unit tests still build but are not currently running. Manually
tested this change on a zaius machine and made sure timers went off.
Change-Id: I2808196581fc766843931403b83fead16926b0ae
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed to start using c++17 libraries and the code should
already be trivially compatible. We can't move away from
std::experimental::filesystem yet as that requires gcc8+.
Tested:
Project still builds in the unit test environment although no tests
are actually run.
Change-Id: I4db0bfe3d42be58d5296eddf5dea5383b7847374
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
Some of the formatting issues which brought by the
earlier commit(clang-formatting) is fixed with this
commit.
Signed-off-by: Ratan K Gupta <ratagupt@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Update the .clang-format file and run clang-format-6.0.
This .clang-format matches the example one in
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting
Change-Id: Ia331c9a5b040e1a3c45a0ebf1b8d776d93b05ae5
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Throw an InternalFailure if unable to get the MAC
Address from Inventory.
Change-Id: I35f089bcb53ad1796a257a083a9b7ab67b0af496
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
| |
Added tabs to match. Noticed in a review.
Change-Id: I86a93a3323e09beeba07e08424374157aeb7b2d3
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Per openbmc/openbmc#3364, adding -flto to CXX flags
in order to reduce overall library and binary sizes.
Ref: https://gcc.gnu.org/wiki/LinkTimeOptimization
Change-Id: I435596a2e0b134f5220bc9521568354fe9338a79
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|