
'NSA addition to ifconfig' - protomyth
http://marc.info/?l=openbsd-misc&m=146391388912602&w=2
======
brynet
That is just some diff someone sent to a mailing list, one real nifty feature
of OpenBSD's ifconfig(8) is 'lladdr random', which will randomly assign a new
MAC address to an interface.

Apparently well received by developers in airport lounges.

~~~
brynet
BTW -- it's also really easy to configure wireless on OpenBSD compared to
other systems:

    
    
        # ifconfig iwm0 scan
    

...

    
    
        # ifconfig iwm0 nwid "AP" [wpakey pass] [nwkey pass] up
        # dhclient iwm0
    

[http://man.openbsd.org/OpenBSD-
current/man8/ifconfig.8#IEEE_...](http://man.openbsd.org/OpenBSD-
current/man8/ifconfig.8#IEEE_802.11_\(WIRELESS_DEVICES\))

[http://man.openbsd.org/OpenBSD-
current/man5/hostname.if.5](http://man.openbsd.org/OpenBSD-
current/man5/hostname.if.5)

~~~
zxcvcxz
That's if wireless works at all.

------
trothamel
The joke being, of course, that 00:20:91 is the OUI (3-byte MAC address
prefix) assigned to the NSA.

~~~
int0x80
NSA has a MAC address prefix??

~~~
Sanddancer
The NSA is one of the largest hardware purchasers and designers on the planet,
and has a ton of custom hardware, etc. It only makes sense or them to have
their own oid.

~~~
jhayward
They used to be. I dunno if they are in the age of Google, Facebook, and
Amazon datacenters.

It seems like I recall in the past that NSA would rather do business under
some Department of Agriculture pseudonym, or as some dummy corporation.

I remember talking to one of the engineers from DEC who worked on the original
ethernet spec. He said they had a visit from some very smart guys carrying
dept. of Agriculture business cards, to talk about what the spec would look
like.

~~~
Keyframe
I don't know. Bumblehive seems rather big and modern compared to the usual
suspect's datacenters: [https://nsa.gov1.info/utah-data-
center/](https://nsa.gov1.info/utah-data-center/) You can find numerous
articles about that particular one around. One can only wonder what kind of
technological wonders are in there. That's the public one too. Now, imagine
the rest.

------
nickpsecurity
That's funny. I like screwing with them, too. My last, temporary keypair was
labeled "keith.alexander@nsa.gov." Smart people got a nice laugh out of it.
Then, there was another category of persons that had sudden concerns about my
true identity. They also had encrypted, authenticated mockery in their inbox
upon voicing them.

~~~
bitwize
_Smart people got a nice laugh out of it._

And smart FBI agents think it's very funny identity fraud.

~~~
hbosch
In no way could a phony e-mail address (or any other string, for that matter)
tied to a disposable keypair be construed as identity fraud. That would be
like claiming "identity fraud" for telling the barista at Starbucks your name
is Abraham Lincoln.

~~~
matt-attack
I actually think it's courteous to baristas to use a made up very short, easy
to spell name, e.g., Al, Ed, etc.

~~~
Bromskloss
OK. Everybody use "Al" from now on.

~~~
matt-attack
It's quite like placing a phone call, flushing the toilet, or drifting into
the neighboring lane of traffic: Everyone does it, but it won't work if
everyone does it together.

------
poizan42
Completely offtopic, but am I the only one who don't like the usage of ! in
the strcmp checks? To me conceptually !cond is checking for falsity, but the
return value from strcmp is not logically a boolean

~~~
bpineau
It's just a shorthand for '== 0' (since !0 is true, and !<non-zero> is false).
strcmp(3) returns 0 when the two strings are identical. So "if (!strcmp(a,
b))" means "if the strings a and b are the same.

~~~
anyfoo
He understands that, but he does not like to use this shorthand for strcmp,
because it conveys a conflicting meaning. I'm much the same, and I prefer
explicitly writing "== 0" in those situations.

~~~
protomyth
I'm not sure I see it as conflicting meaning versus how C treats boolean
expressions. Logical, I want to know if the strings are not equal and that
uses boolean syntax to tell me that as opposed to comparing to zero which
doesn't convey the meaning of the statement as fast.

~~~
lfowles
It's an artifact of implementation. In some zany world, strcmp could return
EQUAL_ENUM. What you are ideally expressing is that you want to know that both
strings are equal as determined by strcmp, not that the strcmp return value is
nonzero. Now it just so happens that EQUAL_ENUM=0 in this world, so a side
effect is that !strcmp(...) will still work. And we also have plenty of
examples using this shorthand that it doesn't seem unnatural to a lot of devs.
(Doesn't make it any less boots-on-head strange... when in Rome, do as the
Romans do...)

~~~
protomyth
I'm not saying its not screwed up, and I'm sure some enums would be
interesting, but they are using it in a logical context so I feel like the !
makes a fair amount of sense.

I do wonder what would have happened if truth had been defined like it is in
Forth[1]? That would make me go with the enums.

1) False is 0 (all bits set to 0), and True is -1 (all bits set to 1 giving a
twos-complement -1).

