diff options
author | sephe <sephe@FreeBSD.org> | 2007-08-26 11:34:51 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2007-08-26 11:34:51 +0000 |
commit | ed4dab73791ab7bc7147bdc8a84c4a2d297f5102 (patch) | |
tree | f279604035287fe35b4bbbc8300595c9212de7e5 /sys/net80211/ieee80211_regdomain.c | |
parent | f0d941b5ddb0ebae925064780a4dc2c342a8e929 (diff) | |
download | FreeBSD-src-ed4dab73791ab7bc7147bdc8a84c4a2d297f5102.zip FreeBSD-src-ed4dab73791ab7bc7147bdc8a84c4a2d297f5102.tar.gz |
Off-by-one bug in country ie construction, which will make HOSTAP send out
malformatted beacons.
Reviewed by: sam
Approved by: re (bmah), sam (mentor)
Diffstat (limited to 'sys/net80211/ieee80211_regdomain.c')
-rw-r--r-- | sys/net80211/ieee80211_regdomain.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_regdomain.c b/sys/net80211/ieee80211_regdomain.c index 257884f..25368b0 100644 --- a/sys/net80211/ieee80211_regdomain.c +++ b/sys/net80211/ieee80211_regdomain.c @@ -182,8 +182,10 @@ ieee80211_add_countryie(uint8_t *frm, struct ieee80211com *ic, } } ie->len = frm - ie->cc; - if (ie->len & 1) /* pad to multiple of 2 */ + if (ie->len & 1) { /* Zero pad to multiple of 2 */ ie->len++; + *frm++ = 0; + } return frm; #undef CHAN_UNINTERESTING } |