fbdffcc34b757c267c736f5fde9c631ae4815247 |
|
02-Mar-2016 |
Elliott Hughes <enh@google.com> |
Fix getifaddrs' handling of point-to-point interfaces. Also remove an if that implied that IFA_BROADCAST is a possibility for AF_INET6. The existing tests fail if you have a point-to-point interface configured, so no new test necessary. Bug: http://b/27442503 (cherry picked from commit ef925e50d38fe6f5499c1d0d24cca98bf88e5256) Change-Id: I19c19d83a86d0a8004a6b45dea7febe9d6fb6a2e
|
31e4472dc7779f4de13975090fc88b1e5dfb52b2 |
|
17-Feb-2016 |
Elliott Hughes <enh@google.com> |
Fix scope ids for link-local IPv6 addresses from getifaddrs(3). Bug: http://b/27219454 (cherry picked from commit 7dac8b8aabadbf2dcff20d3646e701728ba3777d) Change-Id: I006ae68b928b5836d064c020a6db43dcc05add9e
|
ed57b98758176f0cccdec16cbed524e444039fe7 |
|
16-Jan-2016 |
Elliott Hughes <enh@google.com> |
Implement if_nameindex(3)/if_freenameindex(3). This is just a subset of the recently-implemented getifaddrs(3), though if we want to handle interfaces (such as "rmnet_*") that don't have an address, we need to either expose ifaddrs_storage and keep track of which interfaces we've already seen (which is pretty messy), or refactor the netlink code so we can reuse it and just extract the information we need for if_nameindex(3). This patch goes the latter route. Also clean up if_nametoindex(3) and if_indextoname(3). Change-Id: I5ffc5df0bab62286cdda2e7af06f032c767119a8
|
fdb2963e0a65ececa89837eff64ffd8aca8027d2 |
|
22-Dec-2015 |
Yi Kong <yikong@google.com> |
Handle AF_PACKET in getifaddr(3). Also fix a bug where we were mutating the address/broadcast address of an existing entry rather than the new entry, and use 'const' to ensure we don't make that mistake again. Change-Id: I31c127a5d21879b52c85cd0f7ed2e66554a21e39
|
9cddb482b498abd134f7ccfc9933747e8bcb9cc7 |
|
04-Jan-2016 |
Elliott Hughes <enh@google.com> |
Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3)."" This reverts commit 76814a8250fd5e1502909ef5e10e4d166cc96c0e. This differs from the original in fixing the GCC -Werror build: bionic/libc/bionic/ifaddrs.cpp: In function 'void __handle_netlink_response(ifaddrs**, nlmsghdr*)': bionic/libc/bionic/ifaddrs.cpp:113:62: error: use of old-style cast [-Werror=old-style-cast] ifinfomsg* ifi = reinterpret_cast<ifinfomsg*>(NLMSG_DATA(hdr)); This appears to be a GCC bug; the GCC command-line correctly uses -isystem, and manually adding #pragma GCC system_header doesn't help. So just turn the warning off for GCC for now. We won't need to worry about building with GCC soon anyway. Bug: http://b/26238832 Change-Id: I01615bd335edf11baf487b1c83a9157cd780f4a1
|
76814a8250fd5e1502909ef5e10e4d166cc96c0e |
|
22-Dec-2015 |
Yi Kong <yikong@google.com> |
Revert "Implement getifaddrs(3)/freeifaddrs(3)." Werror build broken. Revert while working on a fix. This reverts commit 0945ed5cc5921243724fed4465d20881f4891a8d. Change-Id: I67edab7a7a3b9aa673ce9d14aa95380f947838a1
|
0945ed5cc5921243724fed4465d20881f4891a8d |
|
19-Dec-2015 |
Elliott Hughes <enh@google.com> |
Implement getifaddrs(3)/freeifaddrs(3). Time to dust off the old libcore implementation from gingerbread and add it to bionic. Unlike the original, this actually looks at both RTM_NEWLINK and RTM_NEWADDR. Bug: http://b/26238832 Change-Id: I7bb4b432deb766065b66b9c9ff36ed68249aba82
|