Commit 35946a57 authored by Javier Cardona's avatar Javier Cardona Committed by John W. Linville

mac80211: use correct address for mesh Path Error

For forwarded frames, we save the precursor address in addr1 in case it
needs to be used to send a Path Error.  mesh_path_discard_frame,
however, was using addr2 instead of addr1 to send Path Error frames, so
correct that and also make the comment regarding this more clear.
Signed-off-by: default avatarAndrey Yurovsky <andrey@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e603d9d8
...@@ -494,8 +494,10 @@ void mesh_path_tx_pending(struct mesh_path *mpath) ...@@ -494,8 +494,10 @@ void mesh_path_tx_pending(struct mesh_path *mpath)
* @skb: frame to discard * @skb: frame to discard
* @sdata: network subif the frame was to be sent through * @sdata: network subif the frame was to be sent through
* *
* If the frame was beign forwarded from another MP, a PERR frame will be sent * If the frame was being forwarded from another MP, a PERR frame will be sent
* to the precursor. * to the precursor. The precursor's address (i.e. the previous hop) was saved
* in addr1 of the frame-to-be-forwarded, and would only be overwritten once
* the destination is successfully resolved.
* *
* Locking: the function must me called within a rcu_read_lock region * Locking: the function must me called within a rcu_read_lock region
*/ */
...@@ -510,7 +512,7 @@ void mesh_path_discard_frame(struct sk_buff *skb, ...@@ -510,7 +512,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
u8 *ra, *da; u8 *ra, *da;
da = hdr->addr3; da = hdr->addr3;
ra = hdr->addr2; ra = hdr->addr1;
mpath = mesh_path_lookup(da, sdata); mpath = mesh_path_lookup(da, sdata);
if (mpath) if (mpath)
dsn = ++mpath->dsn; dsn = ++mpath->dsn;
......
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