Fixed BSSID step 1: Disallow to set multicast BSSID
PATCH 1/1 Fixed BSSID step 1: Disallow to set multicast BSSID
Okay, here is the first of the five patches. After applying all of them you should be able to build/join huge city mesh networks (e.g. with the OLSR protocol) with the most of the mac80211 wireless drivers by setting a fixed BSSID in the ad hoc mode. (If you found no other bug/problem.) This was not specified in the original standard, but is a widely used de facto standard.
The first patch now completely disallow to set multicast MAC addresses as BSSID. The behavior before was really strange.
net/mac80211/mlme.c +7 -2
@@ -2576,11 +2576,16 @@ {struct ieee80211_if_sta *ifsta;int res; +bool valid; ifsta = &sdata->u.sta; + valid =is_valid_ether_addr (bssid);if (memcmp (ifsta->bssid, bssid,ETH_ALEN ) !=0 ) { -memcpy (ifsta->bssid, bssid,ETH_ALEN ); +if (valid) +memcpy (ifsta->bssid, bssid,ETH_ALEN ); +else +memset (ifsta->bssid,0 ,ETH_ALEN ); res =0 ;/* * Hack! See also ieee80211_sta_set_ssid.
@@ -2594,7 +2599,7 @@ } } -if (is_valid_ether_addr (bssid)) +if (valid) ifsta->flags |=IEEE80211_STA_BSSID_SET ;else ifsta->flags &= ~IEEE80211_STA_BSSID_SET ;
Signature · 1 line
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
net/mac80211/mlme.c +7 -2
@@ -2576,11 +2576,16 @@ {struct ieee80211_if_sta *ifsta;int res; +bool valid; ifsta = &sdata->u.sta; + valid =is_valid_ether_addr (bssid);if (memcmp (ifsta->bssid, bssid,ETH_ALEN ) !=0 ) { -memcpy (ifsta->bssid, bssid,ETH_ALEN ); +if (valid) +memcpy (ifsta->bssid, bssid,ETH_ALEN ); +else +memset (ifsta->bssid,0 ,ETH_ALEN ); res =0 ;/* * Hack! See also ieee80211_sta_set_ssid.
@@ -2594,7 +2599,7 @@ } } -if (is_valid_ether_addr (bssid)) +if (valid) ifsta->flags |=IEEE80211_STA_BSSID_SET ;else ifsta->flags &= ~IEEE80211_STA_BSSID_SET ;
Johannes Berg
maintainerQuoted 5 lines · Alina Friedrichsen
Okay, here is the first of the five patches. After applying all of them you should be able to build/join huge city mesh networks (e.g. with the OLSR protocol) with the most of the mac80211 wireless drivers by setting a fixed BSSID in the ad hoc mode. (If you found no other bug/problem.) This was not specified in the original standard, but is a widely used de facto standard.
The first patch now completely disallow to set multicast MAC addresses as BSSID. The behavior before was really strange.
Signed-off-by Alina Friedrichsen <[email protected]>
These look ok to me, with proper changelogs. Thanks. You should have made the subjects
[PATCH 1/5] mac80211: Disallow ...
etc. and also line-wrapped the changelogs, since these are fed directly into git normally.
Quoted 31 lines
diff -urN
compat-wireless-2009-01-05.orig/net/mac80211/mlme.ccompat-wireless-2009-01-05.work/net/mac80211/mlme.cnet/mac80211/mlme.c +7
-2@@ -2576,11 +2576,16 @@ {struct ieee80211_if_sta *ifsta;int res; +bool valid; ifsta = &sdata->u.sta; + valid =is_valid_ether_addr (bssid);if (memcmp (ifsta->bssid, bssid,ETH_ALEN ) !=0 ) { -memcpy (ifsta->bssid, bssid,ETH_ALEN ); +if (valid) +memcpy (ifsta->bssid, bssid,ETH_ALEN ); +else +memset (ifsta->bssid,0 ,ETH_ALEN ); res =0 ;/* * Hack! See also ieee80211_sta_set_ssid. @@ -2594,7 +2599,7 @@ } } -if (is_valid_ether_addr (bssid)) +if (valid) ifsta->flags |=IEEE80211_STA_BSSID_SET ;else ifsta->flags &= ~IEEE80211_STA_BSSID_SET ;
Hello Johannes!
Quoted 6 lines
These look ok to me, with proper changelogs. Thanks. You should have made the subjects
=20
[PATCH 1/5] mac80211: Disallow ...
=20
etc. and also line-wrapped the changelogs, since these are fed direct=
ly
Quoted 1 line
into git normally.
Okay, but can I do this with the next patches and not repost all this a= gain?
Is there somewhere a git repository, with all the new patches merged? S=
o that I have link where other people can download easily the newest ve= rsion and test it, to maybe look for other problem in the ad hoc mode, = before it is in compat-wireless.
Regards
Alina
--=20
Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all=
en: http://www.gmx.net/de/go/multimessenger
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Johannes Berg
maintainerQuoted 11 lines · Alina Friedrichsen
Hello Johannes!
Quoted 7 lines
These look ok to me, with proper changelogs. Thanks. You should have made the subjects
[PATCH 1/5] mac80211: Disallow ...
etc. and also line-wrapped the changelogs, since these are fed directly into git normally.
Okay, but can I do this with the next patches and not repost all this again?
I'll leave that to John to answer, he gets to do the work if you don't repost.
Quoted 4 lines
Is there somewhere a git repository, with all the new patches merged? So that I have link where other people can download easily the newest version and test it, to maybe look for other problem in the ad hoc mode, before it is in compat-wireless.
well, wireless-testing, but compat-wireless is updated nightly, iirc.
johannes
Quoted 8 lines · Johannes Berg
Quoted 4 lines · Alina Friedrichsen
Is there somewhere a git repository, with all the new patches merged? So that I have link where other people can download easily the newest version and test it, to maybe look for other problem in the ad hoc mode, before it is in compat-wireless.
well, wireless-testing, but compat-wireless is updated nightly, iirc.
Affirmative.
Alina, check this guide out, it may help you to post your patches:
http://wireless.kernel.org/en/developers/Documentation/git-guide
Luis
Hello Johannes!
Quoted 2 lines
I'll leave that to John to answer, he gets to do the work if you don't repost.
Okay, if John want it, I will do this, sorry...
Quoted 1 line
well, wireless-testing, but compat-wireless is updated nightly, iirc.
Okay, thanks.
cu
Alina
Hi Luis!
Quoted 3 lines
Alina, check this guide out, it may help you to post your patches:
=20
http://wireless.kernel.org/en/developers/Documentation/git-guide
Okay, thanks!
Regards
Alina
--=20
Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all=
en: http://www.gmx.net/de/go/multimessenger
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines
Is there somewhere a git repository, with all the new patches merged? So that I have link where other people can download easily the newest version and test it, to maybe look for other problem in the ad hoc mode, before it is in compat-wireless.
If your patch get's accepted, it will first end in
http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git