Message ID | 20101004223513.GB3234@vigoh |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
From: "Gustavo F. Padovan" <padovan@profusion.mobi> Date: Mon, 4 Oct 2010 19:35:13 -0300 > Follow the output of git show for that change, if we agree on the change I > can append it to the bluetooth pull request. That makes sense to me, thanks for doing this audit. Append that commit and send a new pull request. Thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 44a8fb0..0b54b7d 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -1950,6 +1950,11 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, char __us switch (optname) { case L2CAP_OPTIONS: + if (sk->sk_state == BT_CONNECTED) { + err = -EINVAL; + break; + } + opts.imtu = l2cap_pi(sk)->imtu; opts.omtu = l2cap_pi(sk)->omtu; opts.flush_to = l2cap_pi(sk)->flush_to;