]> granicus.if.org Git - strace/commit
sockaddr: properly decode sockaddr_hci addresses without hci_channel
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 29 Aug 2019 17:03:51 +0000 (19:03 +0200)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 29 Aug 2019 17:20:57 +0000 (19:20 +0200)
commitc108f0b48b4888e2f400dbdc8cf4a3e482eb3a80
tree41a001b408cfdf3f53100ff2c5f9ea8ca9e25822
parentc5af54a0c42aefb1f1774fcf5f6b81ce9662e1df
sockaddr: properly decode sockaddr_hci addresses without hci_channel

Before Linux commit v2.6.38-rc1~476^2~14^2~3^2~43^2~9,
struct sockaddr_hci did not contain hci_channel field.

* configure.ac (AC_CHECK_HEADERS([bluetooth/bluetooth.h])): Add check
for struct sockaddr_hci.hci_channel.
* sockaddr.c (print_sockaddr_data_bt): Decode struct sockaddr_hci
without hci_channel field.
* tests/net-sockaddr.c (check_hci): Add check for struct sockaddr_hci
decoding without hci_channel field; guard hci_channel with #ifdef
HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL.
(check_raw): Remove "len++", as 4-byte AF_BLUETOOTH socket addresses are
interpreted as struct sockaddr_hci without hci_channel field.
configure.ac
sockaddr.c
tests/net-sockaddr.c