Skip to content

Commit eb523f4

Browse files
hadarhenziondavem330
authored andcommitted
net/sched: cls_flower: Use a proper mask value for enc key id parameter
The current code use the encapsulation key id value as the mask of that parameter which is wrong. Fix that by using a full mask. Fixes: bc3103f ('net/sched: cls_flower: Classify packet in ip tunnels') Signed-off-by: Hadar Hen Zion <[email protected]> Acked-by: Amir Vadai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dfdc771 commit eb523f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sched/cls_flower.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static int fl_set_key(struct net *net, struct nlattr **tb,
481481
}
482482

483483
fl_set_key_val(tb, &key->enc_key_id.keyid, TCA_FLOWER_KEY_ENC_KEY_ID,
484-
&mask->enc_key_id.keyid, TCA_FLOWER_KEY_ENC_KEY_ID,
484+
&mask->enc_key_id.keyid, TCA_FLOWER_UNSPEC,
485485
sizeof(key->enc_key_id.keyid));
486486

487487
return 0;
@@ -919,7 +919,7 @@ static int fl_dump(struct net *net, struct tcf_proto *tp, unsigned long fh,
919919
goto nla_put_failure;
920920

921921
if (fl_dump_key_val(skb, &key->enc_key_id, TCA_FLOWER_KEY_ENC_KEY_ID,
922-
&mask->enc_key_id, TCA_FLOWER_KEY_ENC_KEY_ID,
922+
&mask->enc_key_id, TCA_FLOWER_UNSPEC,
923923
sizeof(key->enc_key_id)))
924924
goto nla_put_failure;
925925

0 commit comments

Comments
 (0)