diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-05-25 19:56:10 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-05-25 19:57:39 -0700 |
commit | d4031ec844bc52fe7f2f844e9c476727fd6b8240 (patch) | |
tree | b350f90348c94ccd6e6d5dcd31ad371e3486e177 /net/ipv4/raw.c | |
parent | 657d42cf5df64d9f32caab73ba2d2284879a37b0 (diff) | |
parent | ad42a35bdfc6d3c0fc4cb4027d7b2757ce665665 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
Conflicts:
net/ipv4/raw.c
3632679d9e4f ("ipv{4,6}/raw: fix output xfrm lookup wrt protocol")
c85be08fc4fa ("raw: Stop using RTO_ONLINK.")
https://lore.kernel.org/all/20230525110037.2b532b83@canb.auug.org.au/
Adjacent changes:
drivers/net/ethernet/freescale/fec_main.c
9025944fddfe ("net: fec: add dma_wmb to ensure correct descriptor values")
144470c88c5d ("net: fec: using the standard return codes when xdp xmit errors")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 8b7b5c842bdd..9aacce9db7b9 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -532,6 +532,9 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) } ipcm_init_sk(&ipc, inet); + /* Keep backward compat */ + if (hdrincl) + ipc.protocol = IPPROTO_RAW; if (msg->msg_controllen) { err = ip_cmsg_send(sk, msg, &ipc, false); @@ -597,7 +600,7 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) } flowi4_init_output(&fl4, ipc.oif, ipc.sockc.mark, tos, scope, - hdrincl ? IPPROTO_RAW : sk->sk_protocol, + hdrincl ? ipc.protocol : sk->sk_protocol, inet_sk_flowi_flags(sk) | (hdrincl ? FLOWI_FLAG_KNOWN_NH : 0), daddr, saddr, 0, 0, sk->sk_uid); |