On Tue, 2017-11-14 at 14:20 +0000, Peng Xu wrote: > > > > > + if (tmp_old[0] == WLAN_EID_VENDOR_SPECIFIC) { > > > + if (!memcmp(tmp_old + 2, tmp + 2, 5)) { > > > + /* same vendor ie, copy from new ie > > > > */ > > > + memcpy(pos, tmp, tmp[1] + 2); > > > + pos += tmp[1] + 2; > > > + } else { > > > + memcpy(pos, tmp_old, tmp_old[1] + > > > > 2); > > > + pos += tmp_old[1] + 2; > > > > This seems really strange. What's 5? Should it be 4, so you have > > OUI+subelement ID? > > > > It is OUI + type + subTye. Ah, right, type/subtype. Still, this is problematic, because there's nothing that says that the vendor IE must have OUI + type + subtype, the spec only says OUI + vendor specific data. This may be right for the WFA/Microsoft OUI, but not necessary anything else? johannes