Re: Xtables2 Netlink spec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Nov 2010, Jan Engelhardt wrote:

> On Friday 2010-11-26 09:25, Pablo Neira Ayuso wrote:
> >
> >>[...] memory needs to be allocated and stored, right before
> >>netlink_dump_start is called. [But] because nlk->cb->cb_args is
> >>inaccessible from outside[...], the lookup and allocation is
> >>currently done inside the dump function[...]
> >
> >What is that initial data handling in dumps for?
> 
> Making an atomic snapshot/copy of the table. A userspace client
> could take almost indefinitely on retrieving a table, so it is
> possible that something else changes tables meanwhile.

Why don't you lock the tables during dumping? That way the tables won't 
change, whatever long time the dump takes. Snapshotting the table looks as 
wasting memory and time.

Best regards,
Jozsef
-
E-mail  : kadlec@xxxxxxxxxxxxxxxxx, kadlec@xxxxxxxxxxxx
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux