Cong Wang 7735cce0c5 kernel: net_sched: fix a NULL pointer deref in ipt action
The net pointer in struct xt_tgdtor_param is not explicitly
initialized therefore is still NULL when dereferencing it.
So we have to find a way to pass the correct net pointer to
ipt_destroy_target().

The best way I find is just saving the net pointer inside the per
netns struct tcf_idrinfo, which could make this patch smaller.

Fixes: 0c66dc1ea3f0 ("netfilter: conntrack: register hooks in netns when needed by ruleset")
Reported-and-tested-by: Tony Ambardar <itugrok@xxxxxxxxx>
Cc: Jamal Hadi Salim <jhs@xxxxxxxxxxxx>
Cc: Jiri Pirko <jiri@xxxxxxxxxxx>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

[Backport for kernel v4.19 and v4.14]
[Bug Link: https://bugzilla.kernel.org/show_bug.cgi?id=204681]
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2019-09-01 18:38:04 +02:00
..
2019-07-31 16:51:46 +02:00
2019-07-10 16:56:16 +02:00
2019-08-28 13:08:20 +02:00
2019-07-31 16:51:46 +02:00
2019-08-30 16:45:54 +02:00
2019-08-30 16:45:54 +02:00
2019-07-31 16:51:46 +02:00
2019-08-28 13:08:20 +02:00
2019-08-06 11:52:47 +02:00
2019-08-06 11:52:47 +02:00
2019-08-30 16:45:54 +02:00
2019-03-11 19:35:43 +01:00
2019-08-02 22:45:02 +02:00
2019-05-11 17:15:41 +02:00
2019-05-11 17:15:41 +02:00
2019-08-27 10:32:44 +02:00
2019-08-17 16:57:32 +02:00