mint0x33/net
Guillaume Nault 7fd4ff4c3d ipv6: Fix tcp socket connection with DSCP.
commit 8230680f36fd1525303d1117768c8852314c488c upstream.

Take into account the IPV6_TCLASS socket option (DSCP) in
tcp_v6_connect(). Otherwise fib6_rule_match() can't properly
match the DSCP value, resulting in invalid route lookup.

For example:

  ip route add unreachable table main 2001:db8::10/124

  ip route add table 100 2001:db8::10/124 dev eth0
  ip -6 rule add dsfield 0x04 table 100

  echo test | socat - TCP6:[2001:db8::11]:54321,ipv6-tclass=0x04

Without this patch, socat fails at connect() time ("No route to host")
because the fib-rule doesn't jump to table 100 and the lookup ends up
being done in the main table.

Fixes: 2cc67cc731 ("[IPV6] ROUTE: Routing by Traffic Class.")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:46:06 +01:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth
bpf
bridge
caif
can
ceph
core
dcb
dccp dccp/tcp: Avoid negative sk_forward_alloc by ipv6_pinfo.pktoptions. 2023-02-22 12:46:06 +01:00
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ife
ipv4
ipv6 ipv6: Fix tcp socket connection with DSCP. 2023-02-22 12:46:06 +01:00
ipx
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mpls net: mpls: fix stale pointer if allocation fails during device rename 2023-02-22 12:46:06 +01:00
ncsi
netfilter netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE 2023-02-06 07:46:31 +01:00
netlabel
netlink netlink: annotate data races around sk_state 2023-02-06 07:46:31 +01:00
netrom netrom: Fix use-after-free caused by accept on already connected socket 2023-02-22 12:46:01 +01:00
nfc
nsh
openvswitch net: openvswitch: fix flow memory leak in ovs_flow_cmd_new 2023-02-22 12:46:01 +01:00
packet
phonet
psample
qrtr
rds
rfkill
rose net/rose: Fix to not accept on connected socket 2023-02-22 12:46:05 +01:00
rxrpc
sched
sctp sctp: do not check hb_timer.expires when resetting hb_timer 2023-02-22 12:46:01 +01:00
smc
strparser
sunrpc
switchdev
tipc
tls
unix
vmw_vsock
wimax
wireless
x25 net/x25: Fix to not accept on connected socket 2023-02-22 12:46:02 +01:00
xfrm
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c