drop packets that exceed the negotiated MTU

This commit is contained in:
plunky 2008-08-05 13:02:10 +00:00
parent 945315ec99
commit 516804fedf
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: l2cap_lower.c,v 1.7 2007/11/10 23:12:23 plunky Exp $ */
/* $NetBSD: l2cap_lower.c,v 1.8 2008/08/05 13:02:10 plunky Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: l2cap_lower.c,v 1.7 2007/11/10 23:12:23 plunky Exp $");
__KERNEL_RCSID(0, "$NetBSD: l2cap_lower.c,v 1.8 2008/08/05 13:02:10 plunky Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -136,6 +136,7 @@ l2cap_recv_frame(struct mbuf *m, struct hci_link *link)
chan = l2cap_cid_lookup(hdr.dcid);
if (chan != NULL && chan->lc_link == link
&& chan->lc_imtu >= hdr.length
&& chan->lc_state == L2CAP_OPEN) {
(*chan->lc_proto->input)(chan->lc_upper, m);
return;