Author: bz
Date: Sat Nov  3 18:03:24 2018
New Revision: 340098
URL: https://svnweb.freebsd.org/changeset/base/340098

Log:
  Update the "flag" for draft-ietf-6man-ipv6only-flag.
  
  Having the flag named "6" can possibly be a problem for configurations
  where parsing strings and numbers can produce ambivalent results.
  Rename the "6" flag to the "S"ix (or Silence-IPv4) flag.

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

Modified: head/usr.sbin/ndp/ndp.c
==============================================================================
--- head/usr.sbin/ndp/ndp.c     Sat Nov  3 03:43:32 2018        (r340097)
+++ head/usr.sbin/ndp/ndp.c     Sat Nov  3 18:03:24 2018        (r340098)
@@ -1097,7 +1097,7 @@ rtrlist()
                    p->flags & ND_RA_FLAG_MANAGED ? "M" : "",
                    p->flags & ND_RA_FLAG_OTHER   ? "O" : "");
 #ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
-               printf("%s", p->flags & ND_RA_FLAG_IPV6_ONLY ? "6" : "");
+               printf("%s", p->flags & ND_RA_FLAG_IPV6_ONLY ? "S" : "");
 #endif
                rtpref = ((p->flags & ND_RA_FLAG_RTPREF_MASK) >> 3) & 0xff;
                printf(", pref=%s", rtpref_str[rtpref]);

Modified: head/usr.sbin/rtadvd/config.c
==============================================================================
--- head/usr.sbin/rtadvd/config.c       Sat Nov  3 03:43:32 2018        
(r340097)
+++ head/usr.sbin/rtadvd/config.c       Sat Nov  3 18:03:24 2018        
(r340098)
@@ -438,7 +438,7 @@ getconfig(struct ifinfo *ifi)
                        val |= ND_RA_FLAG_RTPREF_LOW;
                }
 #ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
-               if (strchr(flagstr, '6'))
+               if (strchr(flagstr, 'S'))
                        val |= ND_RA_FLAG_IPV6_ONLY;
 #endif
        } else

Modified: head/usr.sbin/rtadvd/rtadvd.c
==============================================================================
--- head/usr.sbin/rtadvd/rtadvd.c       Sat Nov  3 03:43:32 2018        
(r340097)
+++ head/usr.sbin/rtadvd/rtadvd.c       Sat Nov  3 18:03:24 2018        
(r340098)
@@ -1161,11 +1161,11 @@ ra_input(int len, struct nd_router_advert *nra,
                inconsistent++;
        }
 #ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG
-       /* 6 flag */
+       /* S "IPv6-Only" (Six, Silence-IPv4) flag */
        if ((nra->nd_ra_flags_reserved & ND_RA_FLAG_IPV6_ONLY) !=
            rai->rai_ipv6onlyflg) {
                syslog(LOG_NOTICE,
-                   "6 flag inconsistent on %s:"
+                   "S flag inconsistent on %s:"
                    " %s from %s, %s from us",
                    ifi->ifi_ifname, on_off[!rai->rai_ipv6onlyflg],
                    inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf,
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to