@@ -3627,7 +3627,8 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
if (hint)
break;
result = L2CAP_CONF_UNKNOWN;
- *((u8 *) ptr++) = type;
+ l2cap_add_conf_opt(&ptr, type, olen, val,
+ endptr - ptr);
break;
}
}
@@ -3658,7 +3659,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data
}
done:
- if (chan->mode != rfc.mode) {
+ if (chan->mode != rfc.mode && result != L2CAP_CONF_UNKNOWN) {
result = L2CAP_CONF_UNACCEPT;
rfc.mode = chan->mode;