From: Yulia Kartseva <hex@fb.com>
To: <stephen@networkplumber.org>
Cc: <netdev@vger.kernel.org>, <yulia.kartseva@gmail.com>, <hex@fb.com>
Subject: [PATCH v2 iproute2] tc: fix ipv6 filter selector attribute for some prefix lengths
Date: Sat, 30 Sep 2017 20:18:40 -0700 [thread overview]
Message-ID: <20171001031840.1252538-1-hex@fb.com> (raw)
In-Reply-To: <20170927092634.0870468d@shemminger-XPS-13-9360>
Wrong TCA_U32_SEL attribute packing if prefixLen AND 0x1f equals 0x1f.
These are /31, /63, /95 and /127 prefix lengths.
Example:
ip6 dst face:b00f::/31
filter parent b: protocol ipv6 pref 2307 u32
filter parent b: protocol ipv6 pref 2307 u32 fh 800: ht divisor 1
filter parent b: protocol ipv6 pref 2307 u32 fh 800::800 order 2048
key ht 800 bkt 0
match faceb00f/ffffffff at 24
v2: previous patch was made with a wrong repo
Signed-off-by: Yulia Kartseva <hex@fb.com>
---
tc/f_u32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tc/f_u32.c b/tc/f_u32.c
index 5815be9..14b9588 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -385,8 +385,7 @@ static int parse_ip6_addr(int *argc_p, char ***argv_p,
plen = addr.bitlen;
for (i = 0; i < plen; i += 32) {
- /* if (((i + 31) & ~0x1F) <= plen) { */
- if (i + 31 <= plen) {
+ if (i + 31 < plen) {
res = pack_key(sel, addr.data[i / 32],
0xFFFFFFFF, off + 4 * (i / 32), offmask);
if (res < 0)
--
2.9.5
next prev parent reply other threads:[~2017-10-01 3:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 18:12 [PATCH iproute2] tc: fix ipv6 filter selector attribute for some prefix lengths Yulia Kartseva
2017-09-27 8:26 ` Stephen Hemminger
2017-09-28 3:47 ` Yulia Kartseva
2017-10-01 3:18 ` Yulia Kartseva [this message]
2017-10-01 20:42 ` [PATCH v2 " Stephen Hemminger
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=20171001031840.1252538-1-hex@fb.com \
--to=hex@fb.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=yulia.kartseva@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.