Skip to contentSkip to conversation

Need Help !!!

DISCUSSION Biswajit Paul 1 participant 1 message Jun 30, 2004 1 message not in the archive netfilter

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

HI,

Can u help me ???

---------------------------------------------------------------------
INTRO :
----------------------------------------------------------------------
i need to maintain counters for number of packets

1. drop
2. accepted.
by Netfilter and the protocol distribution among them.

i put two counters in nf_hook_slow(...) function inB
net/core/netfilter.c

   switch(verdict){
                    case NF_ACCEPT:
                              pkt_accept_count++;
                    case NF_DROP :
                              pkt_drop_count++;
   }

-----------------------------------------------------------------------
OBSERVATION :
-----------------------------------------------------------------------

when default policy is ACCEPT and i write rules to drop
selective packets i am getting the appropiate values of counters.

but when the default policy is DROP and no other rule for
ACCEPT then both the counters (pkt_accept_count and pkt_drop_count ) are incrementing !!!!

-----------------------------------------------------------------------
QUERY :
-----------------------------------------------------------------------

1. As i am not accepting a single packet the why
pkt_accept_count counter is incrementing !!!

2. Is there any other better way to do the job ?
-----------------------------------------------------------------------

Regards

Biswajit