diff options
author | Cong Wang | 2014-04-25 22:54:06 +0200 |
---|---|---|
committer | David S. Miller | 2014-04-28 05:42:39 +0200 |
commit | 2f7ef2f8790f5bf53db4fc6b2310943139285827 (patch) | |
tree | f2deb92bec03f3af01b9d7c1bf4dfb7b97760ecf /include/net/sch_generic.h | |
parent | Merge branch 'qlcnic-next' (diff) | |
download | kernel-qcow2-linux-2f7ef2f8790f5bf53db4fc6b2310943139285827.tar.gz kernel-qcow2-linux-2f7ef2f8790f5bf53db4fc6b2310943139285827.tar.xz kernel-qcow2-linux-2f7ef2f8790f5bf53db4fc6b2310943139285827.zip |
sched, cls: check if we could overwrite actions when changing a filter
When actions are attached to a filter, they are a part of the filter
itself, so when changing a filter we should allow to overwrite the actions
inside as well.
In my specific case, when I tried to _append_ a new action to an existing
filter which already has an action, I got EEXIST since kernel refused
to overwrite the existing one in kernel.
This patch checks if we are changing the filter checking NLM_F_CREATE flag
(Sigh, filters don't use NLM_F_REPLACE...) and then passes the boolean down
to actions. This fixes the problem above.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index d062f81c692f..624f9857c83e 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -199,7 +199,7 @@ struct tcf_proto_ops { int (*change)(struct net *net, struct sk_buff *, struct tcf_proto*, unsigned long, u32 handle, struct nlattr **, - unsigned long *); + unsigned long *, bool); int (*delete)(struct tcf_proto*, unsigned long); void (*walk)(struct tcf_proto*, struct tcf_walker *arg); |