summaryrefslogtreecommitdiffstats
path: root/network_manager_main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* configure: Cleanup dbus variablesWilliam A. Kennington III2019-03-121-3/+5
| | | | | | | | | | | | 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>
* configure: Don't allow configurable systemd directoriesWilliam A. Kennington III2019-03-121-2/+5
| | | | | | | | | 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>
* Move the restart systemdunit function to network managerRatan Gupta2018-11-301-1/+4
| | | | | Change-Id: I647741fc3976ca82c39998a518b1de7be5365e80 Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
* network_manager_main: errno is not negativeWilliam A. Kennington III2018-09-271-2/+1
| | | | | | | | | | | 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>
* network_manager_main: Use logging classes up frontWilliam A. Kennington III2018-09-271-6/+6
| | | | | | | | | | | 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>
* Migrate to a common timer classWilliam A. Kennington III2018-09-271-18/+13
| | | | | | | | | | | | 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>
* clang-format: Update to match docs repoGunnar Mills2018-09-151-19/+16
| | | | | | | | | 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>
* reorder headersPatrick Venture2018-08-271-1/+1
| | | | | | | | | | | | | | | | | | Reordering all the headers to the following structure: header file: local c cpp (including openbmc libraries) source file: source.hpp (if applicable) local c cpp Change-Id: Ia74a5c761a3029819366159de3cfd40c5e4c4a2c Signed-off-by: Patrick Venture <venture@google.com>
* NetworkManager: Remove the create Dbus objects functionRatan Gupta2018-02-201-3/+2
| | | | | | | | | | | | | | | | | | | | | When the network manager comes up it creates the network Dbus objects,With the recent change we start writing the network configuration file,which doesn't create the network objects immediately rather it waits for a time window, when the timer gets expired,It creates the objects. so it introduces a window where other application which is waiting for a D-Bus object,gets the notification that object exist but during accessing of object that object doesn't exist due to network timer got expired and it is recreating the network objects. It is kind of race condition. Resolves openbmc/openbmc#2897 Change-Id: I4d557d21940ec3f149426a26cf6363010c422dd7 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Don't handle the ipv6 routing advertisement messageRatan Gupta2018-01-241-0/+6
| | | | | | | | | | | | | In ipv6 network where ipv6 router is there which keeps advertising the router prefix, as part of handling this message BMC keeps adding the new IP address on the interface which is leading to refresh the network objects periodically. This fix stops accepting the router advertisement messaage. Resolves openbmc/openbmc#2739 Change-Id: I0a4068b5419133a25a2ea3f769f730e73860da50 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Increase the waiting time for refreshing objectsRatan Gupta2017-11-161-0/+3
| | | | | | | | | | Increase the waiting time for refreshing the objects as event for link local object comes late by sec or two. Resolves openbmc/openbmc#2644 Change-Id: I5c767877f437c8538e9af7efde8f04ad088458ab Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create netlink socket outside from rtnetlink serverRatan Gupta2017-11-161-3/+28
| | | | | | | | | | | | | As socket lifetime goes out of scope before starting the sd event loop,so now create the socket outside and pass it to rtnetlink server. Resolves openbmc/openbmc#2562 Resolves openbmc/openbmc#2575 Resolves openbmc/openbmc#2632 Change-Id: If80a9cc3556c201a8864836e738d23fcef80b9e7 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Integrate inotify watcher into network daemonVishwanatha Subbanna2017-10-241-3/+19
| | | | | | | | | This commit integrates watching for DNS entries and updating /etc/resolv.conf functionality into network manager daemon as opposed to having another daemon doing just that. Change-Id: Id858815675ed4a23ee8c6a31ba3ae6e5ee0054fd Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Reduce the number of restarts of systemd-networkdRatan Gupta2017-10-111-8/+30
| | | | | | | | | | | | | Start the timer once we get the dbus request and wait for timeout if we get the dbus request in meanwhile, reset the timer and wait for timeout. Listen for ipv6 rtnetlink address also. Resolves openbmc/openbmc#2227 Change-Id: I3f448e84107826defafb9ada523c1ab08ec1b971 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create the default network file during startup of network managerRatan Gupta2017-10-031-0/+12
| | | | | | | | | | if network file is not on the system then create the default network file with dhcp enabled. Resolves openbmc/openbmc#2332 Change-Id: I9e523c76f684dcb2951a0a730f94b11f326b5489 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Recreate the network objects once the timer expiresRatan Gupta2017-09-131-1/+15
| | | | | | | | | | As we get multiple network change events once systemd- networkd starts,This commit starts the timer once it gets the network change event and refresh the network objects once the timer expires. Change-Id: I86d1547763d03f527a8bdb04e2b2780f6cd6fdc2 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement network monitorRatan Gupta2017-09-131-10/+40
| | | | | | | | | This commit listens for the ipaddress add event and prints the message once it gets the NEWADDR signal. Change-Id: I5cdebc023dc8848fc736eca8d785c33387d401df Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* vlan:Remove the multiple implementation of sdbusplus objectRatan Gupta2017-08-221-1/+1
| | | | | | | | | | | | | | | This commit removes the multiple implementation of sdbus server object from vlan_interface class,Due to this mapper doesn't recieve the interface remove signal which leads to showing the dbus object which is not there. This commit also fixes the order of claiming the bus name. Resolves openbmc/openbmc#2150 Resolves openbmc/openbmc#2152 Resolves openbmc/openbmc#2185 Change-Id: I00b0e9d70abbe1073d20fb0d0e2d8a9ef0300c31 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Pass the network conf dir to network manager constructorRatan Gupta2017-08-131-1/+1
| | | | | | | | | when the network manager comes up,it should have its conf dir path which caller wants,instead of calling one more function to set the desired conf dir. Change-Id: I282c1d5e1c6edb2b6e77d16518d2204a6ac41a45 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Create the system conf Dbus ObjectRatan Gupta2017-06-211-1/+1
| | | | | | | | Also put extra checks while writing the gateway and the destination to the conf file. Change-Id: I8f24b3f293e6f978b655f061a198a32690dd44f3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Restructure the code so that it is unit testableRatan Gupta2017-06-081-0/+2
| | | | | Change-Id: I2af7a26d054522beae82f58769f8c2420a22eca2 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Implement main functionRatan Gupta2017-04-271-0/+19
| | | | | | | Resolves openbmc/openbmc#1293 Change-Id: I1ba38b0c273538f55dd9d4305541989e72deb839 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Define interfaces of the EthernetInterfaceRatan Gupta2017-04-271-0/+5
Change-Id: Ibc6030934cdb04eaf603ce730d88d0bedc0a29b3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
OpenPOWER on IntegriCloud