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.
This commit is contained in:
Bjoern A. Zeeb 2018-11-03 18:03:24 +00:00
parent 10f42d244b
commit a613be5677
3 changed files with 4 additions and 4 deletions

View File

@ -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]);

View File

@ -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

View File

@ -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,