]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_ife: preserve the action control in case of error
authorDavide Caratti <dcaratti@redhat.com>
Tue, 19 Jun 2018 13:45:50 +0000 (15:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jun 2018 00:03:58 +0000 (09:03 +0900)
commit2f4c2962efd4edb827c7ba3b0ab7a6527eae8236
tree7126a4b3da3a1044997a1e258395a71080cc7dd4
parentb2887d8e37a824ae0e9b9722f2c6826a81279585
net/sched: act_ife: preserve the action control in case of error

in the following script

 # tc actions add action ife encode allow prio pass index 42
 # tc actions replace action ife encode allow tcindex drop index 42

the action control should remain equal to 'pass', if the kernel failed
to replace the TC action. Pospone the assignment of the action control,
to ensure it is not overwritten in the error path of tcf_ife_init().

Fixes: c8e4759039b0 ("introduce IFE action")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ife.c