Currently, any netlink error reported in ifc_act_on_address is
reported as EINVAL, because the receive buffer is too short and
the NLMSG_OK check fails on it.
Make the buffer long enough so the function can return the
correct netlink error to the caller.
Test: new test coverage in other CL in this topic
Change-Id: Ica752db834a0fd614312b800d88721826be08d56
Currently, passing an invalid IP address to interfaceAddAddress
and friends results in an invalid error message:
12-02 13:00:42.675 interfaceAddAddress("testtap2355", "2001:db8::1/64", 64) -> ServiceSpecificException(-8, "InterfaceController error: Unknown error -8") <1.63ms>
This is due to confusion between getaddrinfo error codes and
errno values.
Test: new unit test added to IpClientIntegrationTest
Change-Id: Ifdaa4281a9bcf3998e3216472c5c1df0f5285214
Should use android/log.h instead of cutils/log.h as a good example
to all others. Adjust header order to comply with Android Coding
standards.
Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
Add a check for socket() errors and make sure to preserve errno over the
subsequent close() calls.
Change-Id: If52d76cd3cb45044eaaf7fea9bfd4471dc66a078
Take and release mutex between ifc_init() and ifc_close()
calls to prevent global ifc_ctl_sock override.
Bug: 22307208
Change-Id: Iacffd329ce2a51defa550c7e33277332045a7b9b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
http://ag/507249 removed a bunch of supposedly dead (unused) code. It turns out
at least ifc_disable() is being used in some protected partner branches. Put
back that as well as ifc_enable() to keep it symmetric.
Bug: 15413389
Change-Id: Ibec83a66e5d9079876ccf36d250b95b7c0294c03
Code using ifc_reset_connections api needs to have access to
predefined masks for reset_mask parameter
Change-Id: I90bc5e1b62ae4a88501c8ad4e353c0d93d319579
- Provide a function to add and delete IPv4/IPv6 addresses
using netlink.
- Provide a function that clears all IP addresses on an
interface that can be used by netd.
Also, a couple of cleanups:
- Update the header file to match reality, and include the
header file in the implementation. Also fix a caller that
has an incorrect method signature.
- Fix whitespace in Android.mk.
Change-Id: Ifba9d60cdfffb0b7e5c3b9c6ab328f5f77d259c4
The reset_mask allows either IPv4 and or IPv6 connections
of an interface to be reset.
Bug: 4981919
Change-Id: Id2d9ab90e30091d3d0764c66d4b01b73c0edbfcc
ifc_set_mask() function was removed in a previous change. This function
is called by the Crespo RIL, so we can't remove it yet.
Bug: 4268537
Change-Id: I634580ee8d2a1aff069178837cc121c89c5e73f9
- adds ifc_set_hwaddr
- adds hwaddr command to netcfg
- code reuse: dhcp_configure calls ifc_configure; inet_ntoa is used for printing
- consistency: use net.XXX.dnsX properties in favor of dhcp.XXX.dnsX properties
(see related change to WifiStateTracker)
- updated system/core/nexus to use new headers, although not sure if
anybody still uses nexus
Change-Id: Idd70c0ac6e89b38e86816578c33eff805d30cac4