svn commit: r228514 - head/sys/net80211

Adrian Chadd adrian at freebsd.org
Thu Dec 15 09:35:04 UTC 2011


On 15 December 2011 00:02, Bernhard Schmidt <bschmidt at freebsd.org> wrote:

> Why didn't you remove the mac argument? It is assign from wh->i_addr2
> anyways, seems rather too redundant to me.

Because the semantics for that right now are "check that MAC", so it's
the callers responsibility to determine which MAC in the header is the
relevant one to check against.

They're all addr2 though, and I haven't yet thought of a reason it
could be addr1 or addr3 (or addr4, for that matter); I just decided to
leave it this way so the semantics of "the caller dictates which MAC
in the frame is the relevant one to check against" as-is.

If you think that's me being a bit overly anal about it, then sure,
please go ahead and turf it. :)

Personally, I'd like to add an enum field (and then remove the MAC) -
the enum field would indicate to acl_check() _which_ ACL is being
checked - ie, probe request, association request, and any other frame
check request. That way it's precisely clear what the ACL check is
for. But again, that's just me being overly picky. :)

So in short: if you're happy removing it, remove it. :)


Adrian


More information about the svn-src-head mailing list