Fix rfcomm_sppd regression I could reproduced.
To reproduce it, Two machine running FreeBSD and run rfcomm_sppd -c 3 -S rfcomm_sppd -a ${PEER} -c 3 on each side.
This commit is contained in:
parent
9129dd59be
commit
99043514c6
sys/netgraph/bluetooth
@ -398,7 +398,7 @@ ng_l2cap_l2ca_con_ind(ng_l2cap_chan_p ch)
|
||||
ip->lcid = ch->scid;
|
||||
ip->psm = ch->psm;
|
||||
ip->ident = ch->ident;
|
||||
|
||||
ip->linktype = ch->con->linktype;
|
||||
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->l2c, 0);
|
||||
}
|
||||
|
||||
|
@ -1339,6 +1339,8 @@ ng_btsocket_rfcomm_session_create(ng_btsocket_rfcomm_session_p *sp,
|
||||
l2sa.l2cap_family = AF_BLUETOOTH;
|
||||
l2sa.l2cap_psm = (dst == NULL)? htole16(NG_L2CAP_PSM_RFCOMM) : 0;
|
||||
bcopy(src, &l2sa.l2cap_bdaddr, sizeof(l2sa.l2cap_bdaddr));
|
||||
l2sa.l2cap_cid = 0;
|
||||
l2sa.l2cap_bdaddr_type = BDADDR_BREDR;
|
||||
|
||||
error = sobind(s->l2so, (struct sockaddr *) &l2sa, td);
|
||||
if (error != 0)
|
||||
@ -1360,6 +1362,8 @@ ng_btsocket_rfcomm_session_create(ng_btsocket_rfcomm_session_p *sp,
|
||||
l2sa.l2cap_family = AF_BLUETOOTH;
|
||||
l2sa.l2cap_psm = htole16(NG_L2CAP_PSM_RFCOMM);
|
||||
bcopy(dst, &l2sa.l2cap_bdaddr, sizeof(l2sa.l2cap_bdaddr));
|
||||
l2sa.l2cap_cid = 0;
|
||||
l2sa.l2cap_bdaddr_type = BDADDR_BREDR;
|
||||
|
||||
error = soconnect(s->l2so, (struct sockaddr *) &l2sa, td);
|
||||
if (error != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user