Skip to content

Commit 0fa08bf

Browse files
author
Guillaume Nault
committed
vxlan: do not use RT_TOS for IPv6 flowlabel
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2161351 Upstream Status: linux.git commit e488d4f Author: Matthias May <matthias.may@westermo.com> Date: Fri Aug 5 21:19:04 2022 +0200 vxlan: 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: 1400615 ("vxlan: allow setting ipv6 traffic class") 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 b5ab5a6 commit 0fa08bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/vxlan/vxlan_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2279,7 +2279,7 @@ static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan,
22792279
fl6.flowi6_oif = oif;
22802280
fl6.daddr = *daddr;
22812281
fl6.saddr = *saddr;
2282-
fl6.flowlabel = ip6_make_flowinfo(RT_TOS(tos), label);
2282+
fl6.flowlabel = ip6_make_flowinfo(tos, label);
22832283
fl6.flowi6_mark = skb->mark;
22842284
fl6.flowi6_proto = IPPROTO_UDP;
22852285
fl6.fl6_dport = dport;

0 commit comments

Comments
 (0)