Re: [libvirt] [PATCH 1/2] add ebtables wrapper

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

 



On Tue, 2009-11-03 at 23:17 +0100, Daniel Veillard wrote:
> On Tue, Oct 27, 2009 at 12:36:09PM +0100, Gerhard Stenzel wrote:
> > This patch adds the files which implement the ebtables wrapper.
> > 
> > Signed-off-by: Gerhard Stenzel <gerhard.stenzel@xxxxxxxxxx>
...
> > +/**
> > + * ebtablesSaveRules:
> > + * @ctx: pointer to the EB table context
> > + *
> > + * Saves all the EB table rules associated with a context
> > + * to disk so that if ebtables is restarted, the rules
> > + * will automatically be reload.
> > + */
> > +void
> > +ebtablesSaveRules(ebtablesContext *ctx)
> > +{
> > +    ebtRulesSave(ctx->input_filter);
> > +    ebtRulesSave(ctx->forward_filter);
> > +    ebtRulesSave(ctx->nat_postrouting);
> > +}
> 
>   Hum, and where ? Under /etc/libvirt/ebtables/.... ?
> 
> Are the table and chain names provided in ebtRulesNew() sufficient
> to uniquely name the set ? I hope so otherwise we're gonna have trouble
> with persistance. It would be good to have ebtRulesSave() documented if
> not fully finished before next release.
> 
>   I'm gonna commit this, but I think we need to double-check that the
> current APIs won't be a problem when we want to implement saving (didn't
> checked the second patch yet).
> 
>  I also think the spec file should add a Requires to ebtables as this
> is not installed systematically (it wasn't present on my workstation
> by default).
> 
>   I will push this tonight,
> 
>     thanks !
> 
> Daniel
> 

This patch removes the ebtablesSaveRules() function as it more confusing
than useful at the moment.

Signed-off-by: Gerhard Stenzel <gerhard.stenzel@xxxxxxxxxx>

Index: libvirt/src/libvirt_private.syms
===================================================================
--- libvirt.orig/src/libvirt_private.syms
+++ libvirt/src/libvirt_private.syms
@@ -179,7 +179,6 @@ ebtablesAddForwardAllowIn;
 ebtablesAddForwardPolicyReject;
 ebtablesContextNew;
 ebtablesRemoveForwardAllowIn;
-ebtablesSaveRules;
 
 
 # event.h
Index: libvirt/src/qemu/qemu_bridge_filter.c
===================================================================
--- libvirt.orig/src/qemu/qemu_bridge_filter.c
+++ libvirt/src/qemu/qemu_bridge_filter.c
@@ -44,7 +44,6 @@ networkAddEbtablesRules(struct qemud_dri
                              __FILE__);
         return err;
     }
-    ebtablesSaveRules(driver->ebtables);
 
     return 0;
 }
Index: libvirt/src/util/ebtables.c
===================================================================
--- libvirt.orig/src/util/ebtables.c
+++ libvirt/src/util/ebtables.c
@@ -65,12 +65,6 @@ enum {
 };
 
 static void
-ebtRulesSave(ebtRules *rules)
-{
-    (void) rules;
-}
-
-static void
 ebtRuleFree(ebtRule *rule)
 {
     VIR_FREE(rule->rule);
@@ -315,22 +309,6 @@ ebtablesContextFree(ebtablesContext *ctx
     VIR_FREE(ctx);
 }
 
-/**
- * ebtablesSaveRules:
- * @ctx: pointer to the EB table context
- *
- * Saves all the EB table rules associated with a context
- * to disk so that if ebtables is restarted, the rules
- * will automatically be reload.
- */
-void
-ebtablesSaveRules(ebtablesContext *ctx)
-{
-    ebtRulesSave(ctx->input_filter);
-    ebtRulesSave(ctx->forward_filter);
-    ebtRulesSave(ctx->nat_postrouting);
-}
-
 int
 ebtablesAddForwardPolicyReject(ebtablesContext *ctx)
 {


-- 
Best regards, 

Gerhard Stenzel, 
-----------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]