Commit 3595e7c3 authored by Ralf Bächle's avatar Ralf Bächle Committed by David S. Miller

[AX25]: Fix cb lookup

Ax AX.25 connection is identified only by it's source and destination,
not by the device it's routed through, so fix the connection block
lookup to ignore the device of a connection.  This fixes dying connections
in case of an AX.25 routing flap.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7ad988a2
......@@ -207,16 +207,8 @@ ax25_cb *ax25_find_cb(ax25_address *src_addr, ax25_address *dest_addr,
continue;
if (s->ax25_dev == NULL)
continue;
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;
}
if (ax25cmp(&s->source_addr, src_addr) == 0 &&
ax25cmp(&s->dest_addr, dest_addr) == 0) {
ax25_cb_hold(s);
spin_unlock_bh(&ax25_list_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment