net_sched: act: Dont increment refcnt on replace
This is a bug fix. The existing code tries to kill many birds with one stone: Handling binding of actions to filters, new actions and replacing of action attributes. A simple test case to illustrate: XXXX moja@fe1:~$ sudo tc actions add action drop index 12 moja@fe1:~$ actions get action gact index 12 action order 1: gact action drop random type none pass val 0 index 12 ref 1 bind 0 moja@fe1:~$ sudo tc actions replace action ok index 12 moja@fe1:~$ actions get action gact index 12 action order 1: gact action drop random type none pass val 0 index 12 ref 2 bind 0 XXXX The above shows the refcounf being wrongly incremented on replace. There are more complex scenarios with binding of actions to filters that i am leaving out that didnt work as well... Signed-off-by:Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- net/sched/act_csum.c 5 additions, 5 deletionsnet/sched/act_csum.c
- net/sched/act_gact.c 4 additions, 3 deletionsnet/sched/act_gact.c
- net/sched/act_ipt.c 5 additions, 3 deletionsnet/sched/act_ipt.c
- net/sched/act_nat.c 5 additions, 5 deletionsnet/sched/act_nat.c
- net/sched/act_pedit.c 5 additions, 3 deletionsnet/sched/act_pedit.c
- net/sched/act_police.c 3 additions, 1 deletionnet/sched/act_police.c
- net/sched/act_simple.c 6 additions, 3 deletionsnet/sched/act_simple.c
- net/sched/act_skbedit.c 4 additions, 3 deletionsnet/sched/act_skbedit.c
Loading
Please register or sign in to comment