Skip to contentSkip to conversation

1/2 DECnet fix SDF_WILD

PATCH Applied Patrick Caulfield 3 participants 4 messages Jan 26, 2004 – Feb 1, 2004 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 1/2 DECnet fix SDF_WILD

This patch fixes the operation of SDF_WILD sockets on Linux 2.6.0/1 (they don't currently work at all).

decnet/af_decnet.c 2003-12-08 11:28:34.000000000 +0000 renamed from decnet/af_decnet.c.orig 2003-12-08 11:27:59.000000000 +0000 +1 -1
@@ -163,7 +163,7 @@
        struct dn_scp *scp = DN_SK(sk);
 
        if (scp->addr.sdn_flags & SDF_WILD)
-               return hlist_empty(&dn_wild_sk) ? NULL : &dn_wild_sk;
+               return hlist_empty(&dn_wild_sk) ? &dn_wild_sk : NULL;
 
        return &dn_sk_hash[scp->addrloc & DN_SK_HASH_MASK];
 }

patrick

#1 lore raw
Quoted 2 lines · On Mon, 26 Jan 2004 11:31:06 +0000 Patrick Caulfield <[email protected]>…

This patch fixes the operation of SDF_WILD sockets on Linux 2.6.0/1 (they don't currently work at all).

Please resubmit your patches as attachments or somehow otherwise teach your email client not to turn tabs into spaces as this corrupts your patches.

Thanks.

#2 lore raw
Quoted 9 lines · David S. Miller
Quoted 2 lines · On Mon, 26 Jan 2004 11:31:06 +0000 Patrick Caulfield <[email protected]>…

This patch fixes the operation of SDF_WILD sockets on Linux 2.6.0/1 (they don't currently work at all).

Please resubmit your patches as attachments or somehow otherwise teach your email client not to turn tabs into spaces as this corrupts your patches.

Sorry about that. Here are both patches attached (and in -p1 format this time too)

patrick

net/decnet/af_decnet.c +1 -1
diff -u linux-2.6.1.orig/net/decnet/af_decnet.c linux-2.6.1/net/decnet/af_decnet.c
@@ -163,7 +163,7 @@
 	struct dn_scp *scp = DN_SK(sk);
 
 	if (scp->addr.sdn_flags & SDF_WILD)
-		return hlist_empty(&dn_wild_sk) ? NULL : &dn_wild_sk;
+		return hlist_empty(&dn_wild_sk) ? &dn_wild_sk : NULL;
 
 	return &dn_sk_hash[scp->addrloc & DN_SK_HASH_MASK];
 }
net/decnet/dn_route.c +2 -1
diff -u linux-2.6.1.orig/net/decnet/dn_route.c linux-2.6.1/net/decnet/dn_route.c
@@ -1720,7 +1720,8 @@
 
 static void dn_rt_cache_seq_stop(struct seq_file *seq, void *v)
 {
-	rcu_read_unlock();
+	if (v)
+		rcu_read_unlock();
 }
 
 static int dn_rt_cache_seq_show(struct seq_file *seq, void *v)
#3 lore raw
Quoted 2 lines · On Sat, 31 Jan 2004 11:41:01 +0000 Patrick Caulfield <[email protected]>…

Sorry about that. Here are both patches attached (and in -p1 format this time too)

Applied, thanks Patrick.