Module Name: src Committed By: jdc Date: Sun Jan 3 17:12:50 UTC 2010
Modified Files: src/sys/netbt [netbsd-4-0]: rfcomm_session.c Log Message: Pull up revision 1.16 (requested by plunky in ticket #1372). when receiving a MCC PN response, the max frame size that the remote party requests must be less than the one we asked for which will not be greater than the max acceptable value so no need to test for that but make sure that it is not smaller than minimum acceptable value. To generate a diff of this commit: cvs rdiff -u -r1.4.2.1 -r1.4.2.1.4.1 src/sys/netbt/rfcomm_session.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netbt/rfcomm_session.c diff -u src/sys/netbt/rfcomm_session.c:1.4.2.1 src/sys/netbt/rfcomm_session.c:1.4.2.1.4.1 --- src/sys/netbt/rfcomm_session.c:1.4.2.1 Thu Jul 19 16:04:18 2007 +++ src/sys/netbt/rfcomm_session.c Sun Jan 3 17:12:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_session.c,v 1.4.2.1 2007/07/19 16:04:18 liamjfoy Exp $ */ +/* $NetBSD: rfcomm_session.c,v 1.4.2.1.4.1 2010/01/03 17:12:50 jdc Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.4.2.1 2007/07/19 16:04:18 liamjfoy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.4.2.1.4.1 2010/01/03 17:12:50 jdc Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -1356,7 +1356,8 @@ callout_stop(&dlc->rd_timeout); - if (pn.mtu > RFCOMM_MTU_MAX || pn.mtu > dlc->rd_mtu) { + /* reject invalid or unacceptable MTU */ + if (pn.mtu < RFCOMM_MTU_MIN || pn.mtu > dlc->rd_mtu) { dlc->rd_state = RFCOMM_DLC_WAIT_DISCONNECT; err = rfcomm_session_send_frame(rs, RFCOMM_FRAME_DISC, pn.dlci);