Module Name:    src
Committed By:   tsutsui
Date:           Sat Sep 12 20:43:18 UTC 2009

Modified Files:
        src/sys/netatalk: aarp.c

Log Message:
Make sure to set length in AARP-response packets. PR kern/41124


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/netatalk/aarp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netatalk/aarp.c
diff -u src/sys/netatalk/aarp.c:1.33 src/sys/netatalk/aarp.c:1.34
--- src/sys/netatalk/aarp.c:1.33	Sat Apr 18 14:58:05 2009
+++ src/sys/netatalk/aarp.c	Sat Sep 12 20:43:18 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: aarp.c,v 1.33 2009/04/18 14:58:05 tsutsui Exp $	*/
+/*	$NetBSD: aarp.c,v 1.34 2009/09/12 20:43:18 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aarp.c,v 1.33 2009/04/18 14:58:05 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aarp.c,v 1.34 2009/09/12 20:43:18 tsutsui Exp $");
 
 #include "opt_mbuftrace.h"
 
@@ -443,6 +443,12 @@
 		m_freem(m);
 		return;
 	}
+
+	/*
+	 * Prepare and send AARP-response.
+	 */
+	m->m_len = sizeof(*ea);
+	m->m_pkthdr.len = sizeof(*ea);
 	memcpy(ea->aarp_tha, ea->aarp_sha, sizeof(ea->aarp_sha));
 	memcpy(ea->aarp_sha, CLLADDR(ifp->if_sadl), sizeof(ea->aarp_sha));
 

Reply via email to