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 mrp: introduce active flags to prevent UAF when applicant uninit 2023-01-18 09:26:32 +01:00
8021q
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: hci_sync: cancel cmd_timer if hci_open failed 2023-02-06 07:46:30 +01:00
bpf
bridge
caif caif: fix memory leak in cfctrl_linkup_request() 2023-01-18 09:26:41 +01:00
can
ceph
core net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats 2023-01-24 07:05:18 +01:00
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 net/ulp: prevent ULP without clone op from entering the LISTEN status 2023-01-18 09:26:42 +01:00
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 net: nfc: Fix use-after-free in local_cleanup() 2023-02-06 07:46:28 +01:00
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 net: sched: disallow noqueue for qdisc classes 2023-01-18 09:26:42 +01:00
sctp sctp: do not check hb_timer.expires when resetting hb_timer 2023-02-22 12:46:01 +01:00
smc
strparser
sunrpc SUNRPC: ensure the matching upcall is in-flight upon downcall 2023-01-18 09:26:40 +01:00
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