mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: akpm@linux-foundation.org, linux@rasmusvillemoes.dk,
	andriy.shevchenko@linux.intel.com, linux-kernel@vger.kernel.org,
	dborkman@redhat.com
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH] vsprintf: flowinfo in IPv6 is optional too
Date: Wed,  3 Feb 2016 13:13:21 +0100	[thread overview]
Message-ID: <1454501601-28480-1-git-send-email-Jason@zx2c4.com> (raw)
In-Reply-To: <1454496118-26370-1-git-send-email-Jason@zx2c4.com>

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

  reply	other threads:[~2016-02-03 12:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 10:41 [PATCH] vsprintf: do not append unset Scope ID to IPv6 Jason A. Donenfeld
2016-02-03 12:13 ` Jason A. Donenfeld [this message]
2016-02-03 17:56   ` IRe: [PATCH] vsprintf: flowinfo in IPv6 is optional too Joe Perches
2016-02-03 21:09     ` Jason A. Donenfeld
2016-02-03 21:13       ` Andy Shevchenko
2016-02-03 21:13     ` IRe: " Daniel Borkmann
2016-02-03 21:15       ` Jason A. Donenfeld
2016-02-03 21:07 ` [PATCH] vsprintf: do not append unset Scope ID to IPv6 Daniel Borkmann
2016-02-03 21:14   ` Jason A. Donenfeld
2016-02-03 21:47     ` Joe Perches
2016-02-03 22:09       ` Daniel Borkmann
2016-02-03 22:42       ` Jason A. Donenfeld
2016-02-03 22:53       ` [PATCH] vsprintf: automatic parameters for %pIS via 'a' Jason A. Donenfeld
2016-02-03 23:05         ` Joe Perches
2016-02-03 23:25           ` Jason A. Donenfeld
2016-02-03 23:29           ` [PATCH v2] " Jason A. Donenfeld
2016-02-03 23:37             ` Joe Perches
2016-02-04  0:59               ` [PATCH v3] " Jason A. Donenfeld
2016-02-05  0:06             ` [PATCH v2] " Rasmus Villemoes
2016-02-05 13:06               ` Jason A. Donenfeld
2016-02-05 13:37               ` [PATCH] " Jason A. Donenfeld
2016-02-05 13:39               ` [PATCH v4] " Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454501601-28480-1-git-send-email-Jason@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dborkman@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome