Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'cls_flower-mask'

Paul Blakey says:

====================
net/sched: cls_flower: Fix mask handling

The series fix how the mask is being handled.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+5 -1
+5 -1
net/sched/cls_flower.c
··· 252 252 offload.cookie = (unsigned long)f; 253 253 offload.dissector = dissector; 254 254 offload.mask = mask; 255 - offload.key = &f->key; 255 + offload.key = &f->mkey; 256 256 offload.exts = &f->exts; 257 257 258 258 tc->type = TC_SETUP_CLSFLOWER; ··· 509 509 510 510 if (tb[TCA_FLOWER_KEY_IPV4_SRC] || tb[TCA_FLOWER_KEY_IPV4_DST]) { 511 511 key->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS; 512 + mask->control.addr_type = ~0; 512 513 fl_set_key_val(tb, &key->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC, 513 514 &mask->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC_MASK, 514 515 sizeof(key->ipv4.src)); ··· 518 517 sizeof(key->ipv4.dst)); 519 518 } else if (tb[TCA_FLOWER_KEY_IPV6_SRC] || tb[TCA_FLOWER_KEY_IPV6_DST]) { 520 519 key->control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; 520 + mask->control.addr_type = ~0; 521 521 fl_set_key_val(tb, &key->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC, 522 522 &mask->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC_MASK, 523 523 sizeof(key->ipv6.src)); ··· 573 571 if (tb[TCA_FLOWER_KEY_ENC_IPV4_SRC] || 574 572 tb[TCA_FLOWER_KEY_ENC_IPV4_DST]) { 575 573 key->enc_control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS; 574 + mask->enc_control.addr_type = ~0; 576 575 fl_set_key_val(tb, &key->enc_ipv4.src, 577 576 TCA_FLOWER_KEY_ENC_IPV4_SRC, 578 577 &mask->enc_ipv4.src, ··· 589 586 if (tb[TCA_FLOWER_KEY_ENC_IPV6_SRC] || 590 587 tb[TCA_FLOWER_KEY_ENC_IPV6_DST]) { 591 588 key->enc_control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; 589 + mask->enc_control.addr_type = ~0; 592 590 fl_set_key_val(tb, &key->enc_ipv6.src, 593 591 TCA_FLOWER_KEY_ENC_IPV6_SRC, 594 592 &mask->enc_ipv6.src,