summaryrefslogtreecommitdiffstats
path: root/routing_table.cpp
Commit message (Collapse)AuthorAgeFilesLines
* IPv6 gateway supportWilliam A. Kennington III2019-02-211-0/+4
| | | | | | | | | | | | | | 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>
* routing_table: Parse v6 routesWilliam A. Kennington III2019-02-191-14/+25
| | | | | | | | | | | | | 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>
* minor cleanup, std namespacing, dropping headersPatrick Venture2018-11-211-3/+0
| | | | | | | | 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>
* clang-format: Update to match docs repoGunnar Mills2018-09-151-25/+23
| | | | | | | | | 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-10/+10
| | | | | | | | | | | | | | | | | | 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>
* Don't update the route entry for the existing networkRatan Gupta2018-05-041-1/+9
| | | | | | | | As per the linux routing policy it always takes the first matched route for the given network. Change-Id: I1d9722fd773f3ba4619225f9d06d1db7da9b69c5 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Correct the logic for determining the default gatewayRatan Gupta2017-11-141-1/+1
| | | | | | | | Default gateway would be whose destination is 0 but gateway entry should be nonzero. Change-Id: I14b318998741e69db33ce603b2f131b49545b5de Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Spelling fixesGunnar Mills2017-10-261-2/+2
| | | | | Change-Id: I953614024660287b94d835e30b117cc4023e749b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Fetch the kernel routing tableRatan Gupta2017-06-091-0/+228
It would be used to get the gateway for a specific network. It would also be used to get the default gateway for the system. Change-Id: I1f7f81e1d6ea6c3f4385f454ad229d4074341c44 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
OpenPOWER on IntegriCloud