Skip to content

Commit b5ab5a6

Browse files
author
Guillaume Nault
committed
geneve: do not use RT_TOS for IPv6 flowlabel
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2161351 Upstream Status: linux.git commit ca2bb69 Author: Matthias May <matthias.may@westermo.com> Date: Fri Aug 5 21:19:03 2022 +0200 geneve: do not use RT_TOS for IPv6 flowlabel According to Guillaume Nault RT_TOS should never be used for IPv6. Quote: RT_TOS() is an old macro used to interprete IPv4 TOS as described in the obsolete RFC 1349. It's conceptually wrong to use it even in IPv4 code, although, given the current state of the code, most of the existing calls have no consequence. But using RT_TOS() in IPv6 code is always a bug: IPv6 never had a "TOS" field to be interpreted the RFC 1349 way. There's no historical compatibility to worry about. Fixes: 3a56f86 ("geneve: handle ipv6 priority like ipv4 tos") Acked-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Matthias May <matthias.may@westermo.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Guillaume Nault <gnault@redhat.com>
1 parent fcfb55f commit b5ab5a6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/geneve.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,7 @@ static struct dst_entry *geneve_get_v6_dst(struct sk_buff *skb,
857857
use_cache = false;
858858
}
859859

860-
fl6->flowlabel = ip6_make_flowinfo(RT_TOS(prio),
861-
info->key.label);
860+
fl6->flowlabel = ip6_make_flowinfo(prio, info->key.label);
862861
dst_cache = (struct dst_cache *)&info->dst_cache;
863862
if (use_cache) {
864863
dst = dst_cache_get_ip6(dst_cache, &fl6->saddr);

0 commit comments

Comments
 (0)