mirror of
https://github.com/markqvist/tncattach.git
synced 2025-06-13 20:12:26 -04:00
TAP
- Seed random number generatro based off of current time
This commit is contained in:
parent
5546163742
commit
66815f7f1a
5
TAP.c
5
TAP.c
@ -33,11 +33,14 @@ void localRand(struct in6_addr* ll_a)
|
||||
}
|
||||
}
|
||||
|
||||
#include<time.h>
|
||||
|
||||
// TODO: Allow optional-arg for case where we must also generate the hwaddr
|
||||
// (this would be the case whereby we are running without `--ethernet`)
|
||||
struct in6_addr generateLinkLocal(char* interfaceName)
|
||||
{
|
||||
srand(0); // TODO: FIXME, use time or something
|
||||
time_t t = time(NULL);
|
||||
srand(t); // TODO: FIXME, use time or something
|
||||
|
||||
struct in6_addr ll_a;
|
||||
memset(&ll_a, 0, sizeof(struct in6_addr));
|
||||
|
Loading…
x
Reference in New Issue
Block a user