4aa13789 | 06-Mar-2018 |
Andrew Jeffery <andrew@aj.id.au> |
test_rtnetlink: Force bus object to outlive TestRtNetlink lifetime
We were hitting a SEGFAULT by nullptr dereference in the WithSingleInterface test when calling sd_bus_ref() via the timer callback
test_rtnetlink: Force bus object to outlive TestRtNetlink lifetime
We were hitting a SEGFAULT by nullptr dereference in the WithSingleInterface test when calling sd_bus_ref() via the timer callback with code generated at -O2 from Ubuntu Artful's gcc-7.2.0:
Running main() from gtest_main.cc Note: Google Test filter = TestRtNetlink.WithSingleInterface [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from TestRtNetlink [ RUN ] TestRtNetlink.WithSingleInterface ASAN:DEADLYSIGNAL ================================================================= ==19427==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f8a944922ca bp 0x0fffd7e37fc2 sp 0x7ffebf1bfda8 T0) ==19427==The signal is caused by a READ memory access. ==19427==Hint: address points to the zero page. #0 0x7f8a944922c9 in sd_bus_ref (/lib/x86_64-linux-gnu/libsystemd.so.0+0x2e2c9) #1 0x7f8a93a5c616 in sdbusplus::bus::bus::bus(sd_bus*) /usr/local/include/sdbusplus/bus.hpp:340 #2 0x7f8a93a5c616 in sdbusplus::server::interface::interface::interface(sdbusplus::bus::bus&, char const*, char const*, sd_bus_vtable const*, void*) /usr/local/include/sdbusplus/server/interface.hpp:61 ... #16 0x559d611755e7 in phosphor::network::Manager::createInterfaces() ../network_manager.cpp:151 #17 0x559d61178e12 in phosphor::network::Manager::createChildObjects() ../network_manager.cpp:166 #18 0x559d611ed59b in std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706 #19 0x559d611ed59b in phosphor::network::Timer::timeoutHandler(sd_event_source*, unsigned long, void*) ../timer.cpp:72 #20 0x7f8a9448e80d (/lib/x86_64-linux-gnu/libsystemd.so.0+0x2a80d) #21 0x7f8a944903e9 in sd_event_dispatch (/lib/x86_64-linux-gnu/libsystemd.so.0+0x2c3e9) #22 0x7f8a94490566 in sd_event_run (/lib/x86_64-linux-gnu/libsystemd.so.0+0x2c566) #23 0x559d610e122e in phosphor::network::TestRtNetlink_WithSingleInterface_Test::TestBody() /tmp/openbmc-build-scripts.wUcrvx/phosphor-networkd/test/test_rtnetlink.cpp:135 ...
AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libsystemd.so.0+0x2e2c9) in sd_bus_ref ==19427==ABORTING
Move the bus storage to namespace scope alongside the Manager to avoid it getting cleaned up before the callback fires.
Change-Id: I3126d0b7b92fb6e66d82f9e32b43a52e44356884 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
c27170ab | 22-Nov-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Reduce journal logs
Presently the code was creating the elog during reading of the values from the config parser which creates the journal log internally("Internal error Occured")
Apart from creati
Reduce journal logs
Presently the code was creating the elog during reading of the values from the config parser which creates the journal log internally("Internal error Occured")
Apart from creating elog,Code also logs into the journal more descriptive message saying which section and key was not found.
The code which catches the exception that also logs into the journal.
In the changed approach instead of throwing exception we are returning the return code as not finding a section or key in the network config file is not an error.
Change-Id: Ib89a3af6541fdf93fb5fa9a8e583d6c6ed88da79 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
067ca2d3 | 17-Jan-2018 |
Nagaraju Goruganti <ngorugan@in.ibm.com> |
Added new unit testcases
1. Added testcases to validate IP/PrefixLengnth/MACAddress. 2. Added test to rtnetlink.
Resolves openbmc/openbmc#2546
Change-Id: I61efbf69682a50f7479b68e32d9714e9c81a32d7
Added new unit testcases
1. Added testcases to validate IP/PrefixLengnth/MACAddress. 2. Added test to rtnetlink.
Resolves openbmc/openbmc#2546
Change-Id: I61efbf69682a50f7479b68e32d9714e9c81a32d7 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
show more ...
|
09f6157b | 23-Aug-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Test: Add test cases for static DNS processing
Fixes openbmc/openbmc#2107
Change-Id: Id6810be3527e4861430077364a5af4dc00e52f3b Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
18891c68 | 17-Oct-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Integrate inotify watcher into network daemon
This commit integrates watching for DNS entries and updating /etc/resolv.conf functionality into network manager daemon as opposed to having another dae
Integrate inotify watcher into network daemon
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>
show more ...
|
ca4ce1b4 | 16-Oct-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Add inotify watch support
Added code to register for inotify events on the needed path and the user callback on events
Change-Id: I90529f8e96fcbecfe0a1b943c3c435dab79222c3 Signed-off-by: Vishwanath
Add inotify watch support
Added code to register for inotify events on the needed path and the user callback on events
Change-Id: I90529f8e96fcbecfe0a1b943c3c435dab79222c3 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
f00182e9 | 16-Oct-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Add function to write DNS entries
Added function to write DNS entries to specified file Also, added test case
Change-Id: I64250c7ee3cf7db3e7f8b5cf1669c7b4a7738637 Signed-off-by: Vishwanatha Subbann
Add function to write DNS entries
Added function to write DNS entries to specified file Also, added test case
Change-Id: I64250c7ee3cf7db3e7f8b5cf1669c7b4a7738637 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
66b974d2 | 03-Oct-2017 |
Nagaraju Goruganti <ngorugan@in.ibm.com> |
IP Address use case validation
-validates IPAddress/gateway using inet_pton api. -validates prefix length for ipv4/ipv6. -if dhcp is enabled, it won't allow to set ip/gateway.
Resolves openbmc/open
IP Address use case validation
-validates IPAddress/gateway using inet_pton api. -validates prefix length for ipv4/ipv6. -if dhcp is enabled, it won't allow to set ip/gateway.
Resolves openbmc/openbmc#1671
Change-Id: I76c1d9d11dfb59002eb1310d87e94ee622714a4a Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
show more ...
|
c9645fe5 | 23-Aug-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Test: Add test cases for NTP
Resolves openbmc/openbmc#2106
Change-Id: I93bbbb1178dc47fa94f98719185630020e00edda Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
16f12886 | 22-Sep-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Reduce the number of restarts of systemd-networkd
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.
Li
Reduce the number of restarts of systemd-networkd
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>
show more ...
|
e05083ad | 15-Sep-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Restart the network through networkManager
Extend the refresh timer once we get the Dbus request which requires network restart.
Detaching the network restart from the writeConfiguration func. Writ
Restart the network through networkManager
Extend the refresh timer once we get the Dbus request which requires network restart.
Detaching the network restart from the writeConfiguration func. Write the configuration file for the vlan interface in writeConfiguration func.
During creation of vlan,vlan interface should come up with dhcp as false.
Change-Id: Iadc7b44554aca412d211d13e9569cc601ad04074 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
2aca45c0 | 25-Jul-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Add test cases for VlanInterface
Change-Id: Ifd2507b12f39c44857af8bcf6ea57f7d1daa7ac3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
2b106532 | 25-Jul-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Move the implementation for writing conf to interface class
implementation of writing interface conf to the ethernet interface class.
Change-Id: I279afff45a82ca92c4e50810664f7a7c69a66a61 Signed-off
Move the implementation for writing conf to interface class
implementation of writing interface conf to the ethernet interface class.
Change-Id: I279afff45a82ca92c4e50810664f7a7c69a66a61 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
5978dd11 | 25-Jul-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Create the VLAN Interface Object
Change-Id: I118fc4bbcad2a478a8aad976e0619537780c1227 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
255d514e | 09-Aug-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Pass the network conf dir to network manager constructor
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
Pass the network conf dir to network manager constructor
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>
show more ...
|
3d3e4fcb | 25-Jul-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement the Vlan Interface
Change-Id: I6085868ba4e30bb9e1c6f6d9895a40ebff82804f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
eaefe587 | 03-Aug-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Convert the .cpp to .o in test makefile ldadd
As compiler was not able to pick the override function definition. Make works fine but make check was having problem.
Change-Id: I030b89065c2929019e36f
Convert the .cpp to .o in test makefile ldadd
As compiler was not able to pick the override function definition. Make works fine but make check was having problem.
Change-Id: I030b89065c2929019e36f8d30f6103289cd07344 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
935bc335 | 11-Jul-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement the DHCP configuration interface
This commit implements the below dhcp options 1) DNS 2) NTP 3) HostName
Change-Id: Ifb66fbc86ce38abc79454ecbbf6fb3c65f892c19 Signed-off-by: Ratan Gupta <r
Implement the DHCP configuration interface
This commit implements the below dhcp options 1) DNS 2) NTP 3) HostName
Change-Id: Ifb66fbc86ce38abc79454ecbbf6fb3c65f892c19 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
ed123a3a | 14-Jun-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement the INI config parser
Parse the systemd.network file to get the configuration parameter.
Change-Id: Ic9c15a46158d2f1c0948e6eca729663e87051491 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.c
Implement the INI config parser
Parse the systemd.network file to get the configuration parameter.
Change-Id: Ic9c15a46158d2f1c0948e6eca729663e87051491 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
show more ...
|
ef85eb9c | 14-Jun-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Create the system conf Dbus Object
Also put extra checks while writing the gateway and the destination to the conf file.
Change-Id: I8f24b3f293e6f978b655f061a198a32690dd44f3 Signed-off-by: Ratan Gu
Create the system conf Dbus Object
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>
show more ...
|
fc2c7242 | 28-May-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Implement the ipaddress origin and gateway property
Resolves openbmc/openbmc#1590
Change-Id: I76328e596336f8b8f1394b1927d48ce52f819a66 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
11cef800 | 28-May-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
Fetch the network portion of the IP address
eg 192.168.2.24/24 ==> 192.168.2.0
Change-Id: I5e46ce7b371360c90ef74fac175c8379c6f31d4c Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
47722dcf | 26-May-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
test: add test cases for ethernet interface
Change-Id: Ibf3a2b3513c784a56540488fa7de5a638a83a833 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
8ab17923 | 25-May-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
test: Add test cases for network manager
Resolves openbmc/openbmc#1462
Change-Id: Ib4cb6fc52dca05c9af38fe5197d9d7dff2031af7 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |
594123dd | 16-May-2017 |
Ratan Gupta <ratagupt@in.ibm.com> |
test: Add unit test cases for util
Change-Id: I75cc1c1642bd4160191853d6ebfa5427e7f534c3 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com> |