linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix PREQ processing and one small bug
@ 2010-02-23 10:35 Porsch, Marco
  2010-02-23 19:28 ` Luis R. Rodriguez
  2010-02-24  8:53 ` Porsch, Marco
  0 siblings, 2 replies; 4+ messages in thread
From: Porsch, Marco @ 2010-02-23 10:35 UTC (permalink / raw)
  To: linville@tuxdriver.com
  Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net

1st) a PREQ should only be processed, if it has the same SN and better metric (instead of better or equal).
2nd) next_hop[ETH_ALEN] now actually used to buffer mpath->next_hop->sta.addr for use out of lock.

Signed-off-by: Marco Porsch <marco.porsch@siemens.com>
Acked-by: Javier Cardona <javier@cozybit.com>

---
 net/mac80211/mesh_hwmp.c |   4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -upr a/net/mac80211/rx.c b/net/mac80211/rx.c
--- a/net/mac80211/mesh_hwmp.c        2010-02-18 14:44:47.000000000 +0100
+++ b/net/mac80211/mesh_hwmp.c 2010-02-18 14:45:32.000000000 +0100
@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ie
                                 if (SN_GT(mpath->sn, orig_sn) ||
                                     (mpath->sn == orig_sn &&
                                      action == MPATH_PREQ &&
-                                    new_metric > mpath->metric)) {
+                                    new_metric >= mpath->metric)) {
                                         process = false;
                                         fresh_info = false;
                                 }
@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(stru
 
         mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr,
                 cpu_to_le32(orig_sn), 0, target_addr,
-               cpu_to_le32(target_sn), mpath->next_hop->sta.addr, hopcount,
+               cpu_to_le32(target_sn), next_hop, hopcount,
                 ttl, cpu_to_le32(lifetime), cpu_to_le32(metric),
                 0, sdata);
         rcu_read_unlock();

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: fix PREQ processing and one small bug
  2010-02-23 10:35 [PATCH] mac80211: fix PREQ processing and one small bug Porsch, Marco
@ 2010-02-23 19:28 ` Luis R. Rodriguez
  2010-02-24  8:53 ` Porsch, Marco
  1 sibling, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2010-02-23 19:28 UTC (permalink / raw)
  To: Porsch, Marco
  Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	johannes@sipsolutions.net

On Tue, Feb 23, 2010 at 2:35 AM, Porsch, Marco <marco.porsch@siemens.com> wrote:
> 1st) a PREQ should only be processed, if it has the same SN and better metric (instead of better or equal).
> 2nd) next_hop[ETH_ALEN] now actually used to buffer mpath->next_hop->sta.addr for use out of lock.
>
> Signed-off-by: Marco Porsch <marco.porsch@siemens.com>
> Acked-by: Javier Cardona <javier@cozybit.com>

Cc: stable@kernel.org ?

  Luis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] mac80211: fix PREQ processing and one small bug
  2010-02-23 10:35 [PATCH] mac80211: fix PREQ processing and one small bug Porsch, Marco
  2010-02-23 19:28 ` Luis R. Rodriguez
@ 2010-02-24  8:53 ` Porsch, Marco
  2010-02-24  9:09   ` Johannes Berg
  1 sibling, 1 reply; 4+ messages in thread
From: Porsch, Marco @ 2010-02-24  8:53 UTC (permalink / raw)
  To: linville@tuxdriver.com
  Cc: stable@kernel.org, linux-wireless@vger.kernel.org,
	johannes@sipsolutions.net

1st) a PREQ should only be processed, if it has the same SN and better metric (instead of better or equal).
2nd) next_hop[ETH_ALEN] now actually used to buffer mpath->next_hop->sta.addr for use out of lock.

Signed-off-by: Marco Porsch <marco.porsch@siemens.com>
Acked-by: Javier Cardona <javier@cozybit.com>

---
 net/mac80211/mesh_hwmp.c |   4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -upr a/net/mac80211/rx.c b/net/mac80211/rx.c
--- a/net/mac80211/mesh_hwmp.c        2010-02-18 14:44:47.000000000 +0100
+++ b/net/mac80211/mesh_hwmp.c 2010-02-18 14:45:32.000000000 +0100
@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ie
                                 if (SN_GT(mpath->sn, orig_sn) ||
                                     (mpath->sn == orig_sn &&
                                      action == MPATH_PREQ &&
-                                    new_metric > mpath->metric)) {
+                                    new_metric >= mpath->metric)) {
                                         process = false;
                                         fresh_info = false;
                                 }
@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(stru

         mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr,
                 cpu_to_le32(orig_sn), 0, target_addr,
-               cpu_to_le32(target_sn), mpath->next_hop->sta.addr, hopcount,
+               cpu_to_le32(target_sn), next_hop, hopcount,
                 ttl, cpu_to_le32(lifetime), cpu_to_le32(metric),
                 0, sdata);
         rcu_read_unlock();

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: fix PREQ processing and one small bug
  2010-02-24  8:53 ` Porsch, Marco
@ 2010-02-24  9:09   ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2010-02-24  9:09 UTC (permalink / raw)
  To: Porsch, Marco
  Cc: linville@tuxdriver.com, stable@kernel.org,
	linux-wireless@vger.kernel.org

On Wed, 2010-02-24 at 09:53 +0100, Porsch, Marco wrote:
> 1st) a PREQ should only be processed, if it has the same SN and better
> metric (instead of better or equal).
> 2nd) next_hop[ETH_ALEN] now actually used to buffer
> mpath->next_hop->sta.addr for use out of lock.
> 
> Signed-off-by: Marco Porsch <marco.porsch@siemens.com>
> Acked-by: Javier Cardona <javier@cozybit.com>

Cc stable works by putting it here, not into the actual email ...

> ---
>  net/mac80211/mesh_hwmp.c |   4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff -upr a/net/mac80211/rx.c b/net/mac80211/rx.c
> --- a/net/mac80211/mesh_hwmp.c        2010-02-18 14:44:47.000000000
> +0100
> +++ b/net/mac80211/mesh_hwmp.c 2010-02-18 14:45:32.000000000 +0100
> @@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ie
>                                  if (SN_GT(mpath->sn, orig_sn) ||
>                                      (mpath->sn == orig_sn &&
>                                       action == MPATH_PREQ &&
> -                                    new_metric > mpath->metric)) {
> +                                    new_metric >= mpath->metric)) {
>                                          process = false;
>                                          fresh_info = false;
>                                  }
> @@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(stru
> 
>          mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr,
>                  cpu_to_le32(orig_sn), 0, target_addr,
> -               cpu_to_le32(target_sn), mpath->next_hop->sta.addr,
> hopcount,
> +               cpu_to_le32(target_sn), next_hop, hopcount,

Also please use proper indentation, not spaces.

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-24  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 10:35 [PATCH] mac80211: fix PREQ processing and one small bug Porsch, Marco
2010-02-23 19:28 ` Luis R. Rodriguez
2010-02-24  8:53 ` Porsch, Marco
2010-02-24  9:09   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).