You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/11/23 01:41:04 UTC
[1/2] incubator-mynewt-core git commit: mn_socket - Allow for itfs
with null address flds.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/1_0_0_b1_dev 94ac3d6b1 -> c6a8f88f6
mn_socket - Allow for itfs with null address flds.
On my home machine, my "ppp0" pp2p interface triggered this bug. From
`man getifaddrs`:
The ifa_addr field points to a structure containing the
interface address. [...] This field may contain a null pointer.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/eab4949b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/eab4949b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/eab4949b
Branch: refs/heads/1_0_0_b1_dev
Commit: eab4949b208821419b00cdd5cf6e7b0bc8aae05b
Parents: 94ac3d6
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 22 17:33:44 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 22 17:33:44 2016 -0800
----------------------------------------------------------------------
net/ip/native_sockets/src/native_itf.c | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/eab4949b/net/ip/native_sockets/src/native_itf.c
----------------------------------------------------------------------
diff --git a/net/ip/native_sockets/src/native_itf.c b/net/ip/native_sockets/src/native_itf.c
index eb60154..6c186ca 100644
--- a/net/ip/native_sockets/src/native_itf.c
+++ b/net/ip/native_sockets/src/native_itf.c
@@ -166,6 +166,9 @@ native_sock_itf_addr_getnext(struct mn_itf *mi, struct mn_itf_addr *mia)
if (if_nametoindex(ifa->ifa_name) != mi->mif_idx) {
continue;
}
+ if (ifa->ifa_addr == NULL) {
+ continue;
+ }
if (ifa->ifa_addr->sa_family == AF_INET) {
sin = (struct sockaddr_in *)ifa->ifa_addr;
if (addrcmp(MN_AF_INET, &sin->sin_addr,
[2/2] incubator-mynewt-core git commit: BLE Host - Fix warning
reported by gcc 6.
Posted by cc...@apache.org.
BLE Host - Fix warning reported by gcc 6.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c6a8f88f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c6a8f88f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c6a8f88f
Branch: refs/heads/1_0_0_b1_dev
Commit: c6a8f88f6b8dc7c8eee6dc75a34c9b6ea295b05d
Parents: eab4949
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Nov 22 17:42:42 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Nov 22 17:42:42 2016 -0800
----------------------------------------------------------------------
net/nimble/host/test/src/ble_hs_test_util.c | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c6a8f88f/net/nimble/host/test/src/ble_hs_test_util.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/test/src/ble_hs_test_util.c b/net/nimble/host/test/src/ble_hs_test_util.c
index 58e3345..0bc848f 100644
--- a/net/nimble/host/test/src/ble_hs_test_util.c
+++ b/net/nimble/host/test/src/ble_hs_test_util.c
@@ -34,9 +34,6 @@ uint8_t g_dev_addr[BLE_DEV_ADDR_LEN];
#define BLE_HS_TEST_UTIL_PUB_ADDR_VAL { 0x0a, 0x54, 0xab, 0x49, 0x7f, 0x06 }
-static const uint8_t ble_hs_test_util_pub_addr[BLE_DEV_ADDR_LEN] =
- BLE_HS_TEST_UTIL_PUB_ADDR_VAL;
-
#define BLE_HS_TEST_UTIL_LE_OPCODE(ocf) \
ble_hs_hci_util_opcode_join(BLE_HCI_OGF_LE, (ocf))