Module Name:    src
Committed By:   plunky
Date:           Sun Jan  3 16:38:15 UTC 2010

Modified Files:
        src/sys/netbt: rfcomm_session.c

Log Message:
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.15 -r1.16 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.15 src/sys/netbt/rfcomm_session.c:1.16
--- src/sys/netbt/rfcomm_session.c:1.15	Sun Sep 13 18:45:11 2009
+++ src/sys/netbt/rfcomm_session.c	Sun Jan  3 16:38:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rfcomm_session.c,v 1.15 2009/09/13 18:45:11 pooka Exp $	*/
+/*	$NetBSD: rfcomm_session.c,v 1.16 2010/01/03 16:38:15 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.15 2009/09/13 18:45:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.16 2010/01/03 16:38:15 plunky Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -1372,7 +1372,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