diff options
author | Phil Sutter <phil@nwl.cc> | 2021-06-11 19:08:26 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-06-16 22:25:01 +0200 |
commit | 06e95f0a2aa24d480cbc0c3bd18ca49e1c85f868 (patch) | |
tree | bd9ced74560354e8339bee595724f3a3d9ed22e0 /net/netfilter | |
parent | netfilter: nft_exthdr: Search chunks in SCTP packets only (diff) | |
download | linux-06e95f0a2aa24d480cbc0c3bd18ca49e1c85f868.tar.xz linux-06e95f0a2aa24d480cbc0c3bd18ca49e1c85f868.zip |
netfilter: nft_extdhr: Drop pointless check of tprot_set
Pablo says, tprot_set is only there to detect if tprot was set to
IPPROTO_IP as that evaluates to zero. Therefore, code asserting a
different value in tprot does not need to check tprot_set.
Fixes: 935b7f6430188 ("netfilter: nft_exthdr: add TCP option matching")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nft_exthdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nft_exthdr.c b/net/netfilter/nft_exthdr.c index 9cf86be2cff4..4f583d2e220e 100644 --- a/net/netfilter/nft_exthdr.c +++ b/net/netfilter/nft_exthdr.c @@ -164,7 +164,7 @@ nft_tcp_header_pointer(const struct nft_pktinfo *pkt, { struct tcphdr *tcph; - if (!pkt->tprot_set || pkt->tprot != IPPROTO_TCP) + if (pkt->tprot != IPPROTO_TCP) return NULL; tcph = skb_header_pointer(pkt->skb, nft_thoff(pkt), sizeof(*tcph), buffer); |