diff options
author | David S. Miller <davem@davemloft.net> | 2016-05-15 13:32:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-15 13:32:48 -0400 |
commit | 909b27f706433a0b3dff79aa259de63aafe40a42 (patch) | |
tree | c13cda633379cdbef701e730027b6a19ba6b267e /net/sched/act_simple.c | |
parent | 8fbb89c6fbfd1cda9ae413cd1e042837a8edbdeb (diff) | |
parent | 272911b889f47aa5bc3e004804fc2382f0ac6ce6 (diff) | |
download | blackbird-obmc-linux-909b27f706433a0b3dff79aa259de63aafe40a42.tar.gz blackbird-obmc-linux-909b27f706433a0b3dff79aa259de63aafe40a42.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
The nf_conntrack_core.c fix in 'net' is not relevant in 'net-next'
because we no longer have a per-netns conntrack hash.
The ip_gre.c conflict as well as the iwlwifi ones were cases of
overlapping changes.
Conflicts:
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
net/ipv4/ip_gre.c
net/netfilter/nf_conntrack_core.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_simple.c')
-rw-r--r-- | net/sched/act_simple.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 2057fd56d74c..e42f8daca147 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -87,7 +87,7 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla, struct tc_defact *parm; struct tcf_defact *d; char *defdata; - int ret = 0, err; + int ret = 0, err, exists = 0; if (nla == NULL) return -EINVAL; @@ -99,13 +99,21 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla, if (tb[TCA_DEF_PARMS] == NULL) return -EINVAL; - if (tb[TCA_DEF_DATA] == NULL) - return -EINVAL; parm = nla_data(tb[TCA_DEF_PARMS]); + exists = tcf_hash_check(tn, parm->index, a, bind); + if (exists && bind) + return 0; + + if (tb[TCA_DEF_DATA] == NULL) { + if (exists) + tcf_hash_release(a, bind); + return -EINVAL; + } + defdata = nla_data(tb[TCA_DEF_DATA]); - if (!tcf_hash_check(tn, parm->index, a, bind)) { + if (!exists) { ret = tcf_hash_create(tn, parm->index, est, a, sizeof(*d), bind, false); if (ret) @@ -122,8 +130,6 @@ static int tcf_simp_init(struct net *net, struct nlattr *nla, } else { d = to_defact(a); - if (bind) - return 0; tcf_hash_release(a, bind); if (!ovr) return -EEXIST; |