mausezahn: improve random mac address generation
commitc7c176394ad2b87f56b0aed2731eb9dde29750f0
authorMatteo Croce <mcroce@redhat.com>
Tue, 21 Aug 2018 14:38:09 +0000 (21 16:38 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Wed, 22 Aug 2018 08:21:37 +0000 (22 10:21 +0200)
tree1c423f98bc7ac52feb134044efeed38ccc6d0507
parent01f339a7bb170310f9dd6a389d9c89b6c62032d0
mausezahn: improve random mac address generation

Modify -b option to generate all random MAC addresses.

Improve the random generation algorithm, use nrand48() which fills the
ethernet address in two calls instead of six calls to rand() and six
floating point calculations.

Set the locally administered bit of generated MAC addresses.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
mausezahn.8
staging/mausezahn.c
staging/modifications.c
staging/mz.h
staging/send_eth.c
staging/tools.c