Message ID | 1615953763-23824-1-git-send-email-wenxu@ucloud.cn |
---|---|
State | New |
Headers | show |
Series | [net,v2] net/sched: cls_flower: fix only mask bit check in the validate_ct_state | expand |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 17 Mar 2021 12:02:43 +0800 you wrote: > From: wenxu <wenxu@ucloud.cn> > > The ct_state validate should not only check the mask bit and also > check mask_bit & key_bit.. > For the +new+est case example, The 'new' and 'est' bits should be > set in both state_mask and state flags. Or the -new-est case also > will be reject by kernel. > When Openvswitch with two flows > ct_state=+trk+new,action=commit,forward > ct_state=+trk+est,action=forward > > [...] Here is the summary with links: - [net,v2] net/sched: cls_flower: fix only mask bit check in the validate_ct_state https://git.kernel.org/netdev/net/c/afa536d8405a You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index d097b5c..c69a4ba 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -1451,7 +1451,7 @@ static int fl_set_key_ct(struct nlattr **tb, &mask->ct_state, TCA_FLOWER_KEY_CT_STATE_MASK, sizeof(key->ct_state)); - err = fl_validate_ct_state(mask->ct_state, + err = fl_validate_ct_state(key->ct_state & mask->ct_state, tb[TCA_FLOWER_KEY_CT_STATE_MASK], extack); if (err)