netfilter: qtaguid: fix proc/.../stats uid filtered output
authorJP Abgrall <jpa@google.com>
Wed, 31 Aug 2011 20:50:15 +0000 (13:50 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:23:31 +0000 (12:23 -0800)
commitc9caf7a5bd7268359af4f82fc9aa6d53e3d110a7
treed1401eb5dadecfb9c7c83702fe2e56d7a2fe2ec5
parent7fdaf333b80d84c495aaa95cfa3e6e614940c085
netfilter: qtaguid: fix proc/.../stats uid filtered output

"cat /proc/net/xt_qtaguid/stats"
for a non-priviledged UID would output multiple twice its own stats.
The fix tweaks the way lines are counted.

Non-root:
  idx iface acct_tag_hex uid_tag_int cnt_set ...
  2 wlan0 0x0 10022 0 ...
  3 wlan0 0x0 10022 1 ...
  4 wlan0 0x3010000000000000 10022 0 ...
  5 wlan0 0x3010000000000000 10022 1 ...

Root:
  idx iface acct_tag_hex uid_tag_int cnt_set
  2 wlan0 0x0 0 0 ...
  3 wlan0 0x0 0 1 ...
  4 wlan0 0x0 1000 0 ...
  ...
  12 wlan0 0x0 10022 0 ...
  13 wlan0 0x0 10022 1 ...
  ...
  18 wlan0 0x3010000000000000 10022 0 ...
  19 wlan0 0x3010000000000000 10022 1 ...

Change-Id: I3cae1f4fee616bc897831350374656b0c718c45b
Signed-off-by: JP Abgrall <jpa@google.com>
net/netfilter/xt_qtaguid.c