FreeBSD Bugzilla – Attachment 245577 Details for
Bug 274092
if_smsc.c needs to use ether_gen_addr instead of read_random for more stable MAC address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
git diff with more debug output
if_ethersubr.c.diff (text/plain), 1.31 KB, created by
Ronald Klop
on 2023-10-12 11:29:20 UTC
(
hide
)
Description:
git diff with more debug output
Filename:
MIME Type:
Creator:
Ronald Klop
Created:
2023-10-12 11:29:20 UTC
Size:
1.31 KB
patch
obsolete
>diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c >index 2cbe0ea98f..da285f79e6 100644 >--- a/sys/net/if_ethersubr.c >+++ b/sys/net/if_ethersubr.c >@@ -1499,6 +1499,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) > char digest[SHA1_RESULTLEN]; > char jailname[MAXHOSTNAMELEN]; > >+if_printf(ifp, "getcredhostuuid %s\n", __FILE__); > getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); > if (strncmp(uuid, DEFAULT_HOSTUUID, sizeof(uuid)) == 0) { > /* Fall back to a random mac address. */ >@@ -1507,6 +1508,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) > > /* If each (vnet) jail would also have a unique hostuuid this would not > * be necessary. */ >+if_printf(ifp, "getjailname %s\n", __FILE__); > getjailname(curthread->td_ucred, jailname, sizeof(jailname)); > sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), > jailname); >@@ -1515,6 +1517,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) > goto rando; > } > >+if_printf(ifp, "SHA1 %s\n", __FILE__); > SHA1Init(&ctx); > SHA1Update(&ctx, buf, sz); > SHA1Final(digest, &ctx); >@@ -1530,6 +1533,7 @@ ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) > > return; > rando: >+if_printf(ifp, "arc4rand %s\n", __FILE__); > arc4rand(hwaddr, sizeof(*hwaddr), 0); > /* Unicast */ > hwaddr->octet[0] &= 0xFE;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 274092
:
245237
|
245239
|
245577
|
245603
|
245616
|
246108
|
246128
|
246231