On Mon, Sep 14, 2015 at 09:54:42AM +0100, Daniel P. Berrange wrote: > On Wed, Sep 09, 2015 at 03:24:33PM +0800, Yang Hongyang wrote: > > Add a netfilter object based on QOM. > > > > A netfilter is attached to a netdev, captures all network packets > > that pass through the netdev. When we delete the netdev, we also > > delete the netfilter object attached to it, because if the netdev is > > removed, the filter which attached to it is useless. > > > > QTAILQ_ENTRY global_list but used by filter layer, so that we can > > manage all filters together. > > QTAILQ_ENTRY next used by netdev, filter belongs to the specific netdev is > > in this queue. > > > > Also init delayed object after net_init_clients, because netfilters need > > to be initialized after net clients initialized. > > > > Signed-off-by: Yang Hongyang <yan...@cn.fujitsu.com>
> > diff --git a/vl.c b/vl.c > > index 584ca88..672f8b2 100644 > > --- a/vl.c > > +++ b/vl.c > > @@ -2783,6 +2783,7 @@ static bool object_create_initial(const char *type) > > if (g_str_equal(type, "rng-egd")) { > > return false; > > } > > + /* TODO: reture false for concrete netfilters */ > > return true; > > } > > Don't you want to be adding your object type here, alongside rng-egd > since IIRC, you said it needed to be created later Oh ignore this comment, I forgot this particular object is just an abstract base Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|