Module Name: src Committed By: plunky Date: Sat May 2 20:13:44 UTC 2009
Modified Files: src/usr.sbin/btpand: bnep.c Log Message: add a noisy debug message for overlong packets (I do get them from my phone) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/btpand/bnep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/btpand/bnep.c diff -u src/usr.sbin/btpand/bnep.c:1.4 src/usr.sbin/btpand/bnep.c:1.5 --- src/usr.sbin/btpand/bnep.c:1.4 Sat May 2 20:07:51 2009 +++ src/usr.sbin/btpand/bnep.c Sat May 2 20:13:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bnep.c,v 1.4 2009/05/02 20:07:51 plunky Exp $ */ +/* $NetBSD: bnep.c,v 1.5 2009/05/02 20:13:44 plunky Exp $ */ /*- * Copyright (c) 2008 Iain Hibbert @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: bnep.c,v 1.4 2009/05/02 20:07:51 plunky Exp $"); +__RCSID("$NetBSD: bnep.c,v 1.5 2009/05/02 20:13:44 plunky Exp $"); #include <bluetooth.h> #include <sdp.h> @@ -168,6 +168,11 @@ || pkt->chan->state != CHANNEL_OPEN) return false; /* no forwarding */ + if (pkt->len > ETHER_MAX_LEN) + log_debug("received long packet " + "(type=0x%2.2x, proto=0x%4.4x, len=%d)", + type, be16dec(pkt->type), pkt->len); + return true; }