Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3de77cf2 authored by David S. Miller's avatar David S. Miller
Browse files

Revert "xfrm: Accept ESP packets regardless of UDP encapsulation mode"



This reverts commit e061b165.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49ad9599
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -167,6 +167,11 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
			goto drop_unlock;
			goto drop_unlock;
		}
		}


		if ((x->encap ? x->encap->encap_type : 0) != encap_type) {
			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMISMATCH);
			goto drop_unlock;
		}

		if (x->props.replay_window && xfrm_replay_check(x, skb, seq)) {
		if (x->props.replay_window && xfrm_replay_check(x, skb, seq)) {
			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
			goto drop_unlock;
			goto drop_unlock;