Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Sep 2009 17:29:08 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r196867 - stable/8/usr.sbin/ndp
Message-ID:  <200909051729.n85HT8lc059714@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Sep  5 17:29:08 2009
New Revision: 196867
URL: http://svn.freebsd.org/changeset/base/196867

Log:
  MFC r196866:
    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
  
  Approved by:	re (kib)

Modified:
  stable/8/usr.sbin/ndp/   (props changed)
  stable/8/usr.sbin/ndp/ndp.c

Modified: stable/8/usr.sbin/ndp/ndp.c
==============================================================================
--- stable/8/usr.sbin/ndp/ndp.c	Sat Sep  5 16:51:51 2009	(r196866)
+++ stable/8/usr.sbin/ndp/ndp.c	Sat Sep  5 17:29:08 2009	(r196867)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909051729.n85HT8lc059714>