linux-next: manual merge of the bpf-next tree with the net tree

Mark Brown <[email protected]> Tue, 21 Jul 2026 14:46:11 +0100
Newsgroups org.kernel.vger.linux-next,org.kernel.vger.bpf,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

  net/core/filter.c

between commit:

  3f4920d165b29 ("bpf: Reject redirect helpers without a bpf_net_context")

from the net tree and commit:

  509ca545d4255 ("bpf: Support BPF_F_EGRESS with bpf_redirect_peer")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc net/core/filter.c
index 11bb0d236822a,0b7afdd0ae474..0000000000000
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@@ -2575,13 -2578,12 +2580,13 @@@ static const struct bpf_func_proto bpf_
  
  BPF_CALL_2(bpf_redirect_peer, u32, ifindex, u64, flags)
  {
 -	struct bpf_redirect_info *ri = bpf_net_ctx_get_ri();
 +	struct bpf_redirect_info *ri;
  
- 	if (unlikely(!bpf_net_ctx_get() || flags))
 -	if (unlikely(flags & ~BPF_F_EGRESS))
++	if (unlikely(!bpf_net_ctx_get() || flags & ~BPF_F_EGRESS))
  		return TC_ACT_SHOT;
  
 +	ri = bpf_net_ctx_get_ri();
- 	ri->flags = BPF_F_PEER;
+ 	ri->flags = BPF_F_PEER | flags;
  	ri->tgt_index = ifindex;
  
  	return TC_ACT_REDIRECT;
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmpfeCMACgkQJNaLcl1U
h9DQcwf+Lh7WhBOrUTg2ICMHaVJn+jAY0fxZ4bK2mtoSbyHwIGQLTQxl2vEthxnl
0JdRlDi2HTekh2oOrx2vwpm5+R8wMCuHhoaAx+zUrSgm4xmJttAu0ilVffKtKBVE
uKjd3Mju4+02llLVPKNrz0V/NAZzhEPnx9xf6U+JPA6C53xhcjNgdCcZRlG1frmw
5AUKjkEqvR/0HFPOrHXDELHw12ws9/wfWmbcDtPweRPeUQqAMayLb0KeIr1qdKeA
nawksTBNjHfFhwWrXQYZepky3jpmwn0oFNeG21xF9T8bi6PXsuV9a06I/fwVLYXH
QPkEvY2+ufZGLL4eBBlhq071Mkj+pQ==
=bbnB
-----END PGP SIGNATURE-----