FreeBSD Bugzilla – Attachment 127868 Details for
Bug 171744
[PATCH] Fix wake(8) command not sending proper WOL packet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 919 bytes, created by
Stephen Workman
on 2012-09-18 14:30:10 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Stephen Workman
Created:
2012-09-18 14:30:10 UTC
Size:
919 bytes
patch
obsolete
>--- /usr/src/usr.sbin/wake/wake.c 2012-01-02 22:25:54.000000000 -0500 >+++ wake.c 2012-09-18 08:23:32.000000000 -0400 >@@ -160,8 +160,18 @@ > ssize_t len; > int i; > >- (void)memset(pkt.hdr.ether_dhost, 0xff, sizeof(pkt.hdr.ether_dhost)); >- pkt.hdr.ether_type = htons(0); >+ /* Be useful */ >+ printf("Sending magic packet to "); >+ for(i = 0; i < ETHER_ADDR_LEN - 1; i++) >+ printf("%.2X:", addr->octet[i]); >+ printf("%.2X\n", addr->octet[ETHER_ADDR_LEN-1]); >+ >+ /* The packet MUST be sent to the target MAC address */ >+ memcpy(pkt.hdr.ether_dhost, addr, ETHER_ADDR_LEN); >+ >+ /* EtherType 0x0842 is at least semi-recognizable for WOL */ >+ pkt.hdr.ether_type = htons(0x0842); >+ > (void)memset(pkt.data, 0xff, SYNC_LEN); > for (p = pkt.data + SYNC_LEN, i = 0; i < DESTADDR_COUNT; > p += ETHER_ADDR_LEN, i++)
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 171744
:
127868
|
158062
|
158065
|
191146