On 2011-06-06 05:06, Hiroki Sato wrote:
Author: hrs
Date: Mon Jun  6 03:06:43 2011
New Revision: 222732
URL: http://svn.freebsd.org/changeset/base/222732

Log:
   - Implement RDNSS and DNSSL options (RFC 6106, IPv6 Router Advertisement
     Options for DNS Configuration) into rtadvd(8) and rtsold(8).  DNS
     information received by rtsold(8) will go to resolv.conf(5) by
     resolvconf(8) script.  This is based on work by J.R. Oldroyd (kern/156259)
     but revised extensively[1].

   - rtadvd(8) now supports "noifprefix" to disable gathering on-link prefixes
     from interfaces when no "addr" is specified[2].  An entry in rtadvd.conf
     with "noifprefix" + no "addr" generates an RA message with no prefix
     information option.

   - rtadvd(8) now supports RTM_IFANNOUNCE message to fix crashes when an
     interface is added or removed.

   - Correct bogus ND_OPT_ROUTE_INFO value to one in RFC 4191.
...
Modified: head/usr.sbin/rtadvd/Makefile
==============================================================================
--- head/usr.sbin/rtadvd/Makefile       Mon Jun  6 02:46:22 2011        
(r222731)
+++ head/usr.sbin/rtadvd/Makefile       Mon Jun  6 03:06:43 2011        
(r222732)
@@ -23,6 +23,6 @@ LDADD=        -lutil

  CFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_POLL_H -DROUTEINFO

-WARNS?=        1
+WARNS?=        6

Hi,

This code is not yet WARNS=6 clean, at least not on amd64:

cc1: warnings being treated as errors
/usr/src/usr.sbin/rtadvd/rtadvd.c: In function 'rtadvd_input':
/usr/src/usr.sbin/rtadvd/rtadvd.c:793: warning: format '%d' expects type 'int', 
but argument 4 has type 'ssize_t'
/usr/src/usr.sbin/rtadvd/rtadvd.c:834: warning: format '%d' expects type 'int', 
but argument 6 has type 'ssize_t'
/usr/src/usr.sbin/rtadvd/rtadvd.c:880: warning: format '%d' expects type 'int', 
but argument 6 has type 'ssize_t'
*** Error code 1 (continuing)
cc1: warnings being treated as errors
/usr/src/usr.sbin/rtadvd/config.c: In function 'dname_labelenc':
/usr/src/usr.sbin/rtadvd/config.c:112: warning: format '%d' expects type 'int', 
but argument 4 has type 'long int'
*** Error code 1 (continuing)
`all' not remade because of errors.
1 error

Please apply the attached patch, which fixes the warnings.
Index: usr.sbin/rtadvd/config.c
===================================================================
--- usr.sbin/rtadvd/config.c    (revision 222737)
+++ usr.sbin/rtadvd/config.c    (working copy)
@@ -109,7 +109,7 @@ dname_labelenc(char *dst, const char *src)
        /* Always need a 0-length label at the tail. */
        *dst++ = '\0';
 
-       syslog(LOG_DEBUG, "<%s> labellen = %d", __func__, dst - dst_origin);
+       syslog(LOG_DEBUG, "<%s> labellen = %td", __func__, dst - dst_origin);
        return (dst - dst_origin);
 }
 
Index: usr.sbin/rtadvd/dump.c
===================================================================
--- usr.sbin/rtadvd/dump.c      (revision 222737)
+++ usr.sbin/rtadvd/dump.c      (working copy)
@@ -310,7 +310,7 @@ dname_labeldec(char *dst, size_t dlen, const char
            (src + len) <= src_last) {
                if (dst != dst_origin)
                        *dst++ = '.';
-               syslog(LOG_DEBUG, "<%s> labellen = %d", __func__, len);
+               syslog(LOG_DEBUG, "<%s> labellen = %zd", __func__, len);
                memcpy(dst, src, len);
                src += len;
                dst += len;
Index: usr.sbin/rtadvd/rtadvd.c
===================================================================
--- usr.sbin/rtadvd/rtadvd.c    (revision 222737)
+++ usr.sbin/rtadvd/rtadvd.c    (working copy)
@@ -789,7 +789,7 @@ rtadvd_input(void)
 #else
        if ((size_t)i < sizeof(struct icmp6_hdr)) {
                syslog(LOG_ERR,
-                   "<%s> packet size(%d) is too short",
+                   "<%s> packet size(%zd) is too short",
                    __func__, i);
                return;
        }
@@ -827,7 +827,7 @@ rtadvd_input(void)
                if ((size_t)i < sizeof(struct nd_router_solicit)) {
                        syslog(LOG_NOTICE,
                            "<%s> RS from %s on %s does not have enough "
-                           "length (len = %d)",
+                           "length (len = %zd)",
                            __func__,
                            inet_ntop(AF_INET6, &rcvfrom.sin6_addr, ntopbuf,
                            sizeof(ntopbuf)),
@@ -873,7 +873,7 @@ rtadvd_input(void)
                if ((size_t)i < sizeof(struct nd_router_advert)) {
                        syslog(LOG_NOTICE,
                            "<%s> RA from %s on %s does not have enough "
-                           "length (len = %d)",
+                           "length (len = %zd)",
                            __func__,
                            inet_ntop(AF_INET6, &rcvfrom.sin6_addr, ntopbuf,
                            sizeof(ntopbuf)),
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to