Commit fe87a8de authored by Lin Ma's avatar Lin Ma Committed by Pablo Neira Ayuso
Browse files

netfilter: cttimeout: remove 'l3num' attr check



After commit dd2934a9 ("netfilter: conntrack: remove l3->l4 mapping
information"), the attribute of type `CTA_TIMEOUT_L3PROTO` is not used
any more in function cttimeout_default_set.

However, the previous commit ea9cf2a5 ("netfilter: cttimeout: remove
set but not used variable 'l3num'") forgot to remove the attribute
present check when removing the related variable.

This commit removes that check to ensure consistency.

Signed-off-by: default avatarLin Ma <linma@zju.edu.cn>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 0b88d165
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -366,8 +366,7 @@ static int cttimeout_default_set(struct sk_buff *skb,
	__u8 l4num;
	int ret;

	if (!cda[CTA_TIMEOUT_L3PROTO] ||
	    !cda[CTA_TIMEOUT_L4PROTO] ||
	if (!cda[CTA_TIMEOUT_L4PROTO] ||
	    !cda[CTA_TIMEOUT_DATA])
		return -EINVAL;