Take and release mutex between ifc_init() and ifc_close()
calls to prevent global ifc_ctl_sock override.
Bug: 22307208
(cherry-pick of cebcd450c6ca3de5106ef3d817d5b760f5d57fbe.)
Change-Id: Iacffd329ce2a51defa550c7e33277332045a7b9b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
init is not accepting parameters, therefore adding them
will cause to serivce failure. This is a temporary solution.
Change-Id: I0faa482f76b5af5f91723b0d4ef348aafd5694df
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Add a check for socket() errors and make sure to preserve errno over the
subsequent close() calls.
Change-Id: If52d76cd3cb45044eaaf7fea9bfd4471dc66a078
Separate out fetching DHCP results from starting the daemon
(for either discover or renew).
Renamed dhcp_do_request() to dhcp_start().
Renamed dhcp_do_request_renew() to dhcp_start_renew().
Added new dhcp_get_results().
Callers of the prior versions of dhcp_do_request* now separately
call dhcp_get_results().
Bug: 19422416
Change-Id: I05447853d444015e6014661dda1bb177b58fe463
Framework always spends 600msec for getting IP address.
DhcpStateMachine.runDhcp calls NetworkUtils.stopDhcp.
After that, it calls NetworkUtils.runDhcp.
In this case, wait_for_property of dhcp_utils.c calls three times.
At least three times, usleep is called.
So move usleep statement after property_get statement.
Change-Id: I77ffb9a5a64875b47bb528b494bb60b68c1acb5a
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
Per http://tools.ietf.org/html/rfc768:
If the computed checksum is zero, it is transmitted as all ones (the
equivalent in one's complement arithmetic). An all zero transmitted
checksum value means that the transmitter generated no checksum (for
debugging or for higher level protocols that don't care).
Bug: 10642341
Change-Id: Ib6296dcf3f420f87227047a645c99d9f7ea0d437
1. bad return status make it return uninitialized prefixLength with a magic
number in android_net_utils_runDhcpCommon()
2. it will make DhcpInfoInternal.makeLinkAddress() to throw
IllegalArgumentException when try to connect a Wifi AP
3. the exception will make system reboot, of cource it random.
Change-Id: Iabc0cd5b69c1316f4eeae0aa1b8a91444dca4562
Signed-off-by: Michael Wu <michaelstay@gmail.com>
Commit 62d6f74 swapped p2p_interface and DHCP_CONFIG_PATH
erroneously. This reverts them to their correct ordering and makes dhcpcd
startup work again.
Change-Id: Iea033a7e0dad98bb2a63fb39755330675cfbb0ab
Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com>
libnetutils had a single warning. Fixed it to make it clean.
Change-Id: I9297e556657a38dbdd7d1d0ac4bc3574801d5ac9
Author: Edwin Vane <edwin.vane@intel.com>
Reviewed-by: Kevin P Schoedel <kevin.p.schoedel@intel.com>