patch-2.1.112 linux/net/x25/x25_facilities.c

Next file: linux/net/x25/x25_in.c
Previous file: linux/net/x25/x25_dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.111/linux/net/x25/x25_facilities.c linux/net/x25/x25_facilities.c
@@ -200,4 +200,26 @@
 	return len;
 }
 
+/*
+ *	Limit values of certain facilities according to the capability of the 
+ *      currently attached x25 link.
+ */
+void x25_limit_facilities(struct x25_facilities *facilities,
+			  struct x25_neigh *neighbour)
+{
+
+	if( ! neighbour->extended ){
+		if( facilities->winsize_in  > 7 ){
+			printk(KERN_DEBUG "X.25: incoming winsize limited to 7\n");
+			facilities->winsize_in = 7;
+		}
+		if( facilities->winsize_out > 7 ){
+			facilities->winsize_out = 7;
+			printk( KERN_DEBUG "X.25: outgoing winsize limited to 7\n");
+		}
+	}
+}
+
 #endif
+
+

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]