netfilter: xt_quota2: make quota2_log work well
authorLiping Zhang <liping.zhang@spreadtrum.com>
Wed, 22 Jun 2016 08:49:48 +0000 (16:49 +0800)
committerDmitry Shmidt <dimitrysh@google.com>
Wed, 29 Jun 2016 18:29:56 +0000 (11:29 -0700)
commit074c908972a215f63bb5409f6a317020fb137d5b
tree3f8d31eaa93d1346b4219c6ce9eeb67f93438c3e
parente639a4e74d6cd2c01d4f2afbbe0b6e6e233b42d2
netfilter: xt_quota2: make quota2_log work well

In upstream commit 7200135bc1e61f1437dc326ae2ef2f310c50b4eb
(netfilter: kill ulog targets)
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7200135bc1e6

ipt_ULOG target was removed, meanwhile, the IP_NF_TARGET_ULOG Kconfig
and ipt_ULOG.h header file were removed too. This causes we cannot enable
QUOTA2_LOG, and netd complains this error: "Unable to open quota socket".
So when we reach the quota2 limit, userspace will not be notified with
this event.

Since IP_NF_TARGET_ULOG was removed, we need not depend on
"IP_NF_TARGET_ULOG=n", and for compatibility, add ulog_packet_msg_t
related definitions copied from "ipt_ULOG.h".

Change-Id: I38132efaabf52bea75dfd736ce734a1b9690e87e
Reported-by: Samboo Shen <samboo.shen@spreadtrum.com>
Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
net/netfilter/Kconfig
net/netfilter/xt_quota2.c