Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/wakeonlan Even though the kernel will fill the sour...



details:   https://anonhg.NetBSD.org/src/rev/3807e0f919cc
branches:  trunk
changeset: 783336:3807e0f919cc
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Dec 15 04:40:33 2012 +0000

description:
Even though the kernel will fill the source address in, it looks weird in
trace output to see a not-obviously-bogus uninitialized source address go
into the kernel.

diffstat:

 usr.sbin/wakeonlan/wakeonlan.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 1d064ac7e3e3 -r 3807e0f919cc usr.sbin/wakeonlan/wakeonlan.c
--- a/usr.sbin/wakeonlan/wakeonlan.c    Sat Dec 15 04:34:36 2012 +0000
+++ b/usr.sbin/wakeonlan/wakeonlan.c    Sat Dec 15 04:40:33 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wakeonlan.c,v 1.1 2012/05/26 01:58:21 uebayasi Exp $ */
+/* $NetBSD: wakeonlan.c,v 1.2 2012/12/15 04:40:33 jakllsch Exp $ */
 
 /*
  * Copyright (C) 2006, 2007, 2008, 2009, 2010 Marc Balmer <marc%msys.ch@localhost>
@@ -167,6 +167,7 @@
        ssize_t bw, len;
 
        memset(pkt.hdr.ether_dhost, 0xff, sizeof(pkt.hdr.ether_dhost));
+       memset(pkt.hdr.ether_shost, 0x00, sizeof(pkt.hdr.ether_shost));
        pkt.hdr.ether_type = htons(0);
        memset(pkt.data, 0xff, SYNC_LEN);
        for (p = pkt.data + SYNC_LEN, i = 0; i < DESTADDR_COUNT;



Home | Main Index | Thread Index | Old Index