patch-2.1.96 linux/net/netrom/nr_subr.c

Next file: linux/net/netsyms.c
Previous file: linux/net/netrom/nr_route.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.95/linux/net/netrom/nr_subr.c linux/net/netrom/nr_subr.c
@@ -229,7 +229,7 @@
  * This routine is called when a Connect Acknowledge with the Choke Flag
  * set is needed to refuse a connection.
  */
-void nr_transmit_dm(struct sk_buff *skb)
+void nr_transmit_refusal(struct sk_buff *skb, int mine)
 {
 	struct sk_buff *skbn;
 	unsigned char *dptr;
@@ -258,10 +258,18 @@
 
 	*dptr++ = sysctl_netrom_network_ttl_initialiser;
 
-	*dptr++ = skb->data[15];
-	*dptr++ = skb->data[16];
-	*dptr++ = 0;
-	*dptr++ = 0;
+	if (mine) {
+		*dptr++ = 0;
+		*dptr++ = 0;
+		*dptr++ = skb->data[15];
+		*dptr++ = skb->data[16];
+	} else {
+		*dptr++ = skb->data[15];
+		*dptr++ = skb->data[16];
+		*dptr++ = 0;
+		*dptr++ = 0;
+	}
+
 	*dptr++ = NR_CONNACK | NR_CHOKE_FLAG;
 	*dptr++ = 0;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov