From 516804fedfaff950003e9971cd6bce7b1505eef6 Mon Sep 17 00:00:00 2001 From: plunky Date: Tue, 5 Aug 2008 13:02:10 +0000 Subject: [PATCH] drop packets that exceed the negotiated MTU --- sys/netbt/l2cap_lower.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netbt/l2cap_lower.c b/sys/netbt/l2cap_lower.c index faa6101af41e..ee6057fc4c9f 100644 --- a/sys/netbt/l2cap_lower.c +++ b/sys/netbt/l2cap_lower.c @@ -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 -__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 #include @@ -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;