Module Name:    src
Committed By:   jdc
Date:           Sun Jan  3 17:52:17 UTC 2010

Modified Files:
        src/sys/netbt [netbsd-5-0]: rfcomm_session.c

Log Message:
Pull up revision 1.16 (requested by plunky in ticket #1221).

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.14 -r1.14.10.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.14 src/sys/netbt/rfcomm_session.c:1.14.10.1
--- src/sys/netbt/rfcomm_session.c:1.14	Wed Aug  6 15:01:24 2008
+++ src/sys/netbt/rfcomm_session.c	Sun Jan  3 17:52:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rfcomm_session.c,v 1.14 2008/08/06 15:01:24 plunky Exp $	*/
+/*	$NetBSD: rfcomm_session.c,v 1.14.10.1 2010/01/03 17:52:17 jdc Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.14 2008/08/06 15:01:24 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.14.10.1 2010/01/03 17:52:17 jdc Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -1365,7 +1365,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);

Reply via email to