trace(1): print sin6_scope_id when relevant

Site-local addresses are out, as they are RFC-deprecated and not
supported on MINIX 3 at all.  Interface-local and link-local multicast
addresses are in, because they are relevant in the context of a
particular zone ID only.

Change-Id: I64a9ecb472946f717f27a72c4073d78aa1120508
This commit is contained in:
David van Moolenbroek 2017-02-13 13:41:19 +00:00
parent 44fdeb7a62
commit 40dec70c39

View File

@ -1626,7 +1626,8 @@ put_struct_sockaddr(struct trace_proc * proc, const char * name, int flags,
sin6.sin6_flowinfo); sin6.sin6_flowinfo);
put_in6_addr(proc, "sin6_addr", &sin6.sin6_addr); put_in6_addr(proc, "sin6_addr", &sin6.sin6_addr);
if (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || if (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) ||
IN6_IS_ADDR_SITELOCAL(&sin6.sin6_addr) || IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr) ||
IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) ||
verbose > 0) verbose > 0)
put_value(proc, "sin6_scope_id", "%"PRIu32, put_value(proc, "sin6_scope_id", "%"PRIu32,
sin6.sin6_scope_id); sin6.sin6_scope_id);