l2test: Fix calling getsockopt(BT_PHY)
Luiz Augusto von Dentz
maintainerPATCH 1/1 l2test: Fix calling getsockopt(BT_PHY)
From: Luiz Augusto von Dentz <[email protected]>
getsockopt(BT_PHY) expectes a 32 bits argument not a sizeof(struct sockaddr_l2).
--- tools/l2test.c | 2 ++ 1 file changed, 2 insertions(+)
tools/l2test.c +2 -0
@@ -414,6 +414,8 @@ static int print_info(int sk, struct l2cap_options *opts) conn.dev_class[0], prio, rcvbuf); + optlen =sizeof (phy); +if (!getsockopt (sk,SOL_BLUETOOTH ,BT_PHY , &phy, &optlen)) {syslog (LOG_INFO ,"Supported PHY: 0x%08x" , phy);print_bitfield (2 , phy, phy_table);
Signature · 1 line
2.54.0