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: 935b7f6430 ("netfilter: nft_exthdr: add TCP option matching")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
5acc44f394
commit
06e95f0a2a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue