Lines 722-727
epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
Link Here
|
722 |
ifp = scb->ifp; |
722 |
ifp = scb->ifp; |
723 |
/* Assign a hopefully unique, locally administered etheraddr. */ |
723 |
/* Assign a hopefully unique, locally administered etheraddr. */ |
724 |
eaddr[0] = 0x02; |
724 |
eaddr[0] = 0x02; |
|
|
725 |
eaddr[1] = (uint8_t)(arc4random() % 0xff); |
726 |
eaddr[2] = (uint8_t)(arc4random() % 0xff); |
725 |
eaddr[3] = (ifp->if_index >> 8) & 0xff; |
727 |
eaddr[3] = (ifp->if_index >> 8) & 0xff; |
726 |
eaddr[4] = ifp->if_index & 0xff; |
728 |
eaddr[4] = ifp->if_index & 0xff; |
727 |
eaddr[5] = 0x0b; |
729 |
eaddr[5] = 0x0b; |
Lines 817-822
epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
Link Here
|
817 |
ifp->if_snd.ifq_maxlen = ifqmaxlen; |
819 |
ifp->if_snd.ifq_maxlen = ifqmaxlen; |
818 |
/* Assign a hopefully unique, locally administered etheraddr. */ |
820 |
/* Assign a hopefully unique, locally administered etheraddr. */ |
819 |
eaddr[0] = 0x02; |
821 |
eaddr[0] = 0x02; |
|
|
822 |
eaddr[1] = (uint8_t)(arc4random() % 0xff); |
823 |
eaddr[2] = (uint8_t)(arc4random() % 0xff); |
820 |
eaddr[3] = (ifp->if_index >> 8) & 0xff; |
824 |
eaddr[3] = (ifp->if_index >> 8) & 0xff; |
821 |
eaddr[4] = ifp->if_index & 0xff; |
825 |
eaddr[4] = ifp->if_index & 0xff; |
822 |
eaddr[5] = 0x0a; |
826 |
eaddr[5] = 0x0a; |