Skip to content

Commit

Permalink
Revert "xfrm: Accept ESP packets regardless of UDP encapsulation mode"
Browse files Browse the repository at this point in the history
This reverts commit e061b16.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Dec 19, 2008
1 parent 49ad959 commit 3de77cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/xfrm/xfrm_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
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)) {
XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
goto drop_unlock;
Expand Down

0 comments on commit 3de77cf

Please sign in to comment.