diff options
author | sam <sam@FreeBSD.org> | 2005-07-27 04:41:25 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-07-27 04:41:25 +0000 |
commit | eb5cee9b5609ae1b8055775b193740312ae8655b (patch) | |
tree | b50d8e554ec682585e7b7199a6cb21489a4e0708 /sys | |
parent | 63e3a582cc3be070218e00f0593588904151caf3 (diff) | |
download | FreeBSD-src-eb5cee9b5609ae1b8055775b193740312ae8655b.zip FreeBSD-src-eb5cee9b5609ae1b8055775b193740312ae8655b.tar.gz |
when bridging internally bypass the bss node as traffic to it
must follow the normal input path
Submitted by: Michal Mertl
MFC after: 5 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index ac25b76..38e3db2 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -679,18 +679,28 @@ ieee80211_deliver_data(struct ieee80211com *ic, else m1->m_flags |= M_MCAST; } else { - /* XXX this dups work done in ieee80211_encap */ - /* check if destination is associated */ - struct ieee80211_node *ni1 = - ieee80211_find_node(&ic->ic_sta, - eh->ether_dhost); - if (ni1 != NULL) { - if (ieee80211_node_is_authorized(ni1)) { - m1 = m; - m = NULL; + /* + * Check if the destination is known; if so + * and the port is authorized dispatch directly. + */ + struct ieee80211_node *sta = + ieee80211_find_node(&ic->ic_sta, eh->ether_dhost); + if (sta != NULL) { + if (ieee80211_node_is_authorized(sta)) { + /* + * Beware of sending to ourself; this + * needs to happen via the normal + * input path. + */ + if (sta != ic->ic_bss) { + m1 = m; + m = NULL; + } + } else { + ic->ic_stats.is_rx_unauth++; + IEEE80211_NODE_STAT(sta, rx_unauth); } - /* XXX statistic? */ - ieee80211_free_node(ni1); + ieee80211_free_node(sta); } } if (m1 != NULL) |