Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2015 09:55:40 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289750 - head/usr.sbin/rtadvd
Message-ID:  <201510220955.t9M9teSs034215@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Thu Oct 22 09:55:40 2015
New Revision: 289750
URL: https://svnweb.freebsd.org/changeset/base/289750

Log:
  - Fix a bug which prevented dnssl[0-9] and rdnss[0-9] parameters from
    working.
  
  - Fix a pointer calculation for padding when multiple dnssl[0-9]
    parameters are specified [*].
  
  Reported by:	http://bugs.dragonflybsd.org/issues/2847 [*]

Modified:
  head/usr.sbin/rtadvd/config.c

Modified: head/usr.sbin/rtadvd/config.c
==============================================================================
--- head/usr.sbin/rtadvd/config.c	Thu Oct 22 09:50:45 2015	(r289749)
+++ head/usr.sbin/rtadvd/config.c	Thu Oct 22 09:55:40 2015	(r289750)
@@ -808,7 +808,7 @@ getconfig_free_rti:
 		makeentry(entbuf, sizeof(entbuf), i, "rdnss");
 		addr = (char *)agetstr(entbuf, &bp);
 		if (addr == NULL)
-			break;
+			continue;
 		ELM_MALLOC(rdn, exit(1));
 
 		TAILQ_INIT(&rdn->rd_list);
@@ -859,7 +859,7 @@ getconfig_free_rdn:
 		makeentry(entbuf, sizeof(entbuf), i, "dnssl");
 		addr = (char *)agetstr(entbuf, &bp);
 		if (addr == NULL)
-			break;
+			continue;
 
 		ELM_MALLOC(dns, exit(1));
 
@@ -1528,6 +1528,7 @@ make_packet(struct rainfo *rai)
 		/* Padding to next 8 octets boundary */
 		len = buf - (char *)ndopt_dnssl;
 		len += (len % 8) ? 8 - len % 8 : 0;
+		buf = (char *)ndopt_dnssl + len;
 
 		/* Length field must be in 8 octets */
 		ndopt_dnssl->nd_opt_dnssl_len = len / 8;



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