Re: [2.6 patch] /net/ax25/: some cleanups

From: Alan Cox
Date: Tue Dec 28 2004 - 18:01:56 EST


On Maw, 2004-12-28 at 18:05, David S. Miller wrote:
> Send a patch to netdev and CC: me to fix this as is standard
> procedure for getting changes into the networking. :-)

Attached - revert to 2.6.9 behaviour.

I suspect given that someone made the change for a reason that there
should probably be a sysctl to switch between AX.25 (as 2.6.9) and "kind
of routed AX.25-ish" (as 2.6.10).

--- ../linux.vanilla-2.6.10/net/ax25/af_ax25.c 2004-12-25 21:15:46.000000000 +0000
+++ net/ax25/af_ax25.c 2004-12-26 22:07:44.000000000 +0000
@@ -207,8 +207,16 @@
continue;
if (s->ax25_dev == NULL)
continue;
- if (ax25cmp(&s->source_addr, src_addr) == 0 &&
- ax25cmp(&s->dest_addr, dest_addr) == 0) {
+ if (ax25cmp(&s->source_addr, src_addr) == 0 && ax25cmp(&s->dest_addr, dest_addr) == 0 && s->ax25_dev->dev == dev) {
+ if (digi != NULL && digi->ndigi != 0) {
+ if (s->digipeat == NULL)
+ continue;
+ if (ax25digicmp(s->digipeat, digi) != 0)
+ continue;
+ } else {
+ if (s->digipeat != NULL && s->digipeat->ndigi != 0)
+ continue;
+ }
ax25_cb_hold(s);
spin_unlock_bh(&ax25_list_lock);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/