svn commit: r196866 - head/usr.sbin/ndp

Bjoern A. Zeeb bz at FreeBSD.org
Sat Sep 5 16:51:51 UTC 2009


Author: bz
Date: Sat Sep  5 16:51:51 2009
New Revision: 196866
URL: http://svn.freebsd.org/changeset/base/196866

Log:
  In the NEXTADDR macro use SA_SIZE() rather than directly using
  sizeof(), as introduced in r186119, for advancing the current
  position into the buffer.
  See comment in net/route.h for a description of the difference.
  This makes ndp -s work again.
  
  Reviewed by:	qingli
  X-MFC after:	now

Modified:
  head/usr.sbin/ndp/ndp.c

Modified: head/usr.sbin/ndp/ndp.c
==============================================================================
--- head/usr.sbin/ndp/ndp.c	Sat Sep  5 16:50:55 2009	(r196865)
+++ head/usr.sbin/ndp/ndp.c	Sat Sep  5 16:51:51 2009	(r196866)
@@ -116,7 +116,7 @@
 
 #define NEXTADDR(w, s) \
 	if (rtm->rtm_addrs & (w)) { \
-		bcopy((char *)&s, cp, sizeof(s)); cp += sizeof(s);}
+		bcopy((char *)&s, cp, sizeof(s)); cp += SA_SIZE(&s);}
 
 
 static pid_t pid;


More information about the svn-src-all mailing list