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; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"