android_kernel_motorola_sm6225/net
Guillaume Nault b0f76723a0 ipv6: Fix datagram socket connection with DSCP.
commit e010ae08c71fda8be3d6bda256837795a0b3ea41 upstream.

Take into account the IPV6_TCLASS socket option (DSCP) in
ip6_datagram_flow_key_init(). 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 - UDP6:[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:47:21 +01:00
..
6lowpan
9p 9p/xen: check logical size for buffer size 2022-12-14 11:28:26 +01:00
802 mrp: introduce active flags to prevent UAF when applicant uninit 2023-01-18 11:30:36 +01:00
8021q
appletalk
atm net/atm: fix proc_mpc_write incorrect return value 2022-11-03 23:52:26 +09:00
ax25 ax25: Fix UAF bugs in ax25 timers 2022-04-27 13:39:46 +02:00
batman-adv batman-adv: Don't skb_split skbuffs with frag_list 2022-05-18 09:42:47 +02:00
bluetooth Bluetooth: hci_sync: cancel cmd_timer if hci_open failed 2023-02-06 07:49:41 +01:00
bpf bpf, test_run: Fix alignment problem in bpf_prog_test_run_skb() 2022-11-25 17:40:29 +01:00
bpfilter
bridge netfilter: ebtables: fix memory leak when blob is malformed 2022-09-28 11:02:56 +02:00
caif caif: fix memory leak in cfctrl_linkup_request() 2023-01-18 11:30:50 +01:00
can can: bcm: check the result of can_send() in bcm_can_tx() 2022-10-26 13:19:37 +02:00
ceph
core bpf: Always return target ifindex in bpf_fib_lookup 2023-02-22 12:47:19 +01:00
dcb net: dcb: disable softirqs in dcbnl_flush_dev() 2022-03-08 19:04:10 +01:00
dccp dccp/tcp: Avoid negative sk_forward_alloc by ipv6_pinfo.pktoptions. 2023-02-22 12:47:21 +01:00
decnet net: decnet: Fix sleeping inside in af_decnet 2021-07-28 11:13:48 +02:00
dns_resolver
dsa net: dsa: Add missing of_node_put() in dsa_port_parse_of 2022-03-23 09:10:44 +01:00
ethernet
hsr net: hsr: Fix potential use-after-free 2022-12-08 11:18:33 +01:00
ieee802154 net: ieee802154: fix error return code in dgram_bind() 2022-11-03 23:52:30 +09:00
ife
ipv4 ipv4: prevent potential spectre v1 gadget in ip_metrics_convert() 2023-02-06 07:49:43 +01:00
ipv6 ipv6: Fix datagram socket connection with DSCP. 2023-02-22 12:47:21 +01:00
iucv
kcm kcm: close race conditions on sk_receive_queue 2022-11-25 17:40:29 +01:00
key af_key: Fix send_acquire race with pfkey_register 2022-12-08 11:18:29 +01:00
l2tp ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg 2022-06-25 11:49:15 +02:00
l3mdev
lapb
llc llc: only change llc->dev when bind() succeeds 2022-03-28 08:41:44 +02:00
mac80211 wifi: mac80211: Fix ack frame idr leak when mesh has no route 2022-12-08 11:18:28 +01:00
mac802154 mac802154: fix missing INIT_LIST_HEAD in ieee802154_if_add() 2022-12-14 11:28:28 +01:00
mpls net: mpls: fix stale pointer if allocation fails during device rename 2023-02-22 12:47:21 +01:00
ncsi
netfilter netfilter: nft_tproxy: restrict to prerouting hook 2023-02-22 12:47:19 +01:00
netlabel net: fix NULL pointer reference in cipso_v4_doi_free 2021-09-22 11:48:09 +02:00
netlink netlink: annotate data races around sk_state 2023-02-06 07:49:43 +01:00
netrom netrom: Fix use-after-free caused by accept on already connected socket 2023-02-22 12:47:12 +01:00
nfc net: nfc: Fix use-after-free in local_cleanup() 2023-02-06 07:49:38 +01:00
nsh
openvswitch net: openvswitch: fix flow memory leak in ovs_flow_cmd_new 2023-02-22 12:47:12 +01:00
packet packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE 2022-12-08 11:18:33 +01:00
phonet phonet: refcount leak in pep_sock_accep 2022-01-11 13:58:50 +01:00
psample
qrtr net: qrtr: fix another OOB Read in qrtr_endpoint_post 2021-09-03 09:58:00 +02:00
rds rds: rds_rm_zerocopy_callback() use list_first_entry() 2023-02-22 12:47:17 +01:00
rfkill
rose net/rose: Fix to not accept on connected socket 2023-02-22 12:47:19 +01:00
rxrpc rxrpc: Fix missing unlock in rxrpc_do_sendmsg() 2023-01-18 11:30:33 +01:00
sched net: sched: disallow noqueue for qdisc classes 2023-01-18 11:30:51 +01:00
sctp sctp: fail if no bound addresses can be used for a given scope 2023-02-06 07:49:43 +01:00
smc net/smc: Remove redundant refcount increase 2022-09-15 12:17:03 +02:00
strparser
sunrpc SUNRPC: ensure the matching upcall is in-flight upon downcall 2023-01-18 11:30:49 +01:00
switchdev
tipc tipc: Fix potential OOB in tipc_link_proto_rcv() 2022-12-14 11:28:30 +01:00
tls net/tls: Fix race in TLS device down flow 2022-07-29 17:10:32 +02:00
unix af_unix: Fix a data-race in unix_dgram_peer_wake_me(). 2022-06-14 16:59:35 +02:00
vmw_vsock net: vmw_vsock: vmci: Check memcpy_from_msg() 2023-01-18 11:30:18 +01:00
wimax
wireless wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails 2023-01-18 11:30:14 +01:00
x25 net/x25: Fix to not accept on connected socket 2023-02-22 12:47:12 +01:00
xdp xsk: Simplify detection of empty and full rings 2021-05-22 10:59:48 +02:00
xfrm xfrm: Update ipcomp_scratches with NULL when freed 2022-10-26 13:19:37 +02:00
compat.c net: Return the correct errno code 2021-06-30 08:48:13 -04:00
Kconfig
Makefile net: split out functions related to registering inflight socket files 2021-07-31 08:22:37 +02:00
socket.c net: Fix a data-race around sysctl_somaxconn. 2022-09-05 10:26:31 +02:00
sysctl_net.c