lkml.org 
[lkml]   [2016]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] vsprintf: flowinfo in IPv6 is optional too
Date
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
lib/vsprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 1b1b1c8..85e6645 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1189,7 +1189,7 @@ char *ip6_addr_string_sa(char *buf, char *end, const struct sockaddr_in6 *sa,
*p++ = ':';
p = number(p, pend, ntohs(sa->sin6_port), spec);
}
- if (have_f) {
+ if (have_f && (sa->sin6_flowinfo & IPV6_FLOWINFO_MASK)) {
*p++ = '/';
p = number(p, pend, ntohl(sa->sin6_flowinfo &
IPV6_FLOWINFO_MASK), spec);
--
2.7.0
\
 
 \ /
  Last update: 2016-02-03 13:41    [W:0.117 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site