Patch "sched,cls_flower: set key address type when present" has been added to the 4.3-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
sched,cls_flower: set key address type when present
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sched-cls_flower-set-key-address-type-when-present.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Jan 26 21:35:03 PST 2016
From: Jamal Hadi Salim <[email protected]>
Date: Sun, 10 Jan 2016 11:47:01 -0500
Subject: sched,cls_flower: set key address type when present
From: Jamal Hadi Salim <[email protected]>
[ Upstream commit 66530bdf85eb1d72a0c399665e09a2c2298501c6 ]
only when user space passes the addresses should we consider their presence
--- net/sched/cls_flower.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
net/sched/cls_flower.c +8 -2
@@ -252,23 +252,28 @@ static int fl_set_key(struct net *net, sfl_set_key_val (tb, key->eth.src,TCA_FLOWER_KEY_ETH_SRC , mask->eth.src,TCA_FLOWER_KEY_ETH_SRC_MASK ,sizeof (key->eth.src)); +fl_set_key_val (tb, &key->basic.n_proto,TCA_FLOWER_KEY_ETH_TYPE , &mask->basic.n_proto,TCA_FLOWER_UNSPEC ,sizeof (key->basic.n_proto)); +if (key->basic.n_proto ==htons (ETH_P_IP ) || key->basic.n_proto ==htons (ETH_P_IPV6 )) {fl_set_key_val (tb, &key->basic.ip_proto,TCA_FLOWER_KEY_IP_PROTO , &mask->basic.ip_proto,TCA_FLOWER_UNSPEC ,sizeof (key->basic.ip_proto)); } -if (key->control.addr_type ==FLOW_DISSECTOR_KEY_IPV4_ADDRS ) { + +if (tb[TCA_FLOWER_KEY_IPV4_SRC ] || tb[TCA_FLOWER_KEY_IPV4_DST ]) { + key->control.addr_type =FLOW_DISSECTOR_KEY_IPV4_ADDRS ;fl_set_key_val (tb, &key->ipv4.src,TCA_FLOWER_KEY_IPV4_SRC , &mask->ipv4.src,TCA_FLOWER_KEY_IPV4_SRC_MASK ,sizeof (key->ipv4.src));fl_set_key_val (tb, &key->ipv4.dst,TCA_FLOWER_KEY_IPV4_DST , &mask->ipv4.dst,TCA_FLOWER_KEY_IPV4_DST_MASK ,sizeof (key->ipv4.dst)); - }else if (key->control.addr_type ==FLOW_DISSECTOR_KEY_IPV6_ADDRS ) { + }else if (tb[TCA_FLOWER_KEY_IPV6_SRC ] || tb[TCA_FLOWER_KEY_IPV6_DST ]) { + key->control.addr_type =FLOW_DISSECTOR_KEY_IPV6_ADDRS ;fl_set_key_val (tb, &key->ipv6.src,TCA_FLOWER_KEY_IPV6_SRC , &mask->ipv6.src,TCA_FLOWER_KEY_IPV6_SRC_MASK ,sizeof (key->ipv6.src));
@@ -276,6 +281,7 @@ static int fl_set_key(struct net *net, s &mask->ipv6.dst,TCA_FLOWER_KEY_IPV6_DST_MASK , sizeof(key->ipv6.dst)); } +if (key->basic.ip_proto ==IPPROTO_TCP ) { fl_set_key_val(tb, &key->tp.src, TCA_FLOWER_KEY_TCP_SRC, &mask->tp.src, TCA_FLOWER_UNSPEC,
Patches currently in stable-queue which might be from [email protected] are
queue-4.3/sched-cls_flower-set-key-address-type-when-present.patch