Linux Netfilter discussions
 help / color / mirror / Atom feed
* Initialization of local variable in a iptables datastructure
@ 2007-09-07  2:50 KARIM SATTAR
  0 siblings, 0 replies; only message in thread
From: KARIM SATTAR @ 2007-09-07  2:50 UTC (permalink / raw)
  To: netfilter

Hi
I have introduced a variable in xt_counters data structure of type 
uint_64t to be used as a counter in ipt_entry data structure. I have 
installed iptable new version source code from its website. In this 
userspace, I am printing the variable with other packet and byte 
counters. Till now iptables are working fine and every thing is all 
right -- except with the problem that the variable which I introduced 
is showing garbage values mostly 0's ( when print several times with 
iptables -L command). I have initialized the variable on the location 
where its required but I am not getting a constant value which is in my 
case should be only 0 (during testing). Can any one puts a light on 
this. I didnt know what the Linux kernel might do if its encounter an 
uninitialized variable.

Also since I am printing the counters with the help of iptables-save -c 
and iptables -L -n -v and in both cases I am getting this non-obvious 
results; there fore I had also tried with initiailizing the variable in 
ipt_do_table function under the do_while loop and make the variable 
initialized always to 0, but this also not useful as I am still viewing 
the same results.



Regards
Karim Asif Sattar


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-07  2:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-07  2:50 Initialization of local variable in a iptables datastructure KARIM SATTAR

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox