Re: [PATCH] use -w flag if supported by iptables

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

 



Quoting Laine Stump (laine@xxxxxxxxx):
> On 10/31/2013 11:36 PM, Serge Hallyn wrote:
> > This will properly lock libvirt's usage of iptables with
> > others (like ufw).
> >
> > (See https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1245322)
> >
> > Signed-off-by: Serge Hallyn <serge.hallyn@xxxxxxxxxx>
> > ---
> >  src/util/viriptables.c | 30 ++++++++++++++++++++++++++----
> >  1 file changed, 26 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/util/viriptables.c b/src/util/viriptables.c
> > index 16f571e..30d59b6 100644
> > --- a/src/util/viriptables.c
> > +++ b/src/util/viriptables.c
> > @@ -50,19 +50,25 @@
> >  #include "virstring.h"
> >  #include "virutil.h"
> >  
> > +bool iptables_supports_xlock = false;
> > +
> >  #if HAVE_FIREWALLD
> >  static char *firewall_cmd_path = NULL;
> > +#endif
> >  
> >  static int
> >  virIpTablesOnceInit(void)
> >  {
> > +    virCommandPtr cmd;
> > +    int status;
> > +
> > +#if HAVE_FIREWALLD
> >      firewall_cmd_path = virFindFileInPath("firewall-cmd");
> >      if (!firewall_cmd_path) {
> >          VIR_INFO("firewall-cmd not found on system. "
> >                   "firewalld support disabled for iptables.");
> >      } else {
> > -        virCommandPtr cmd = virCommandNew(firewall_cmd_path);
> > -        int status;
> > +        virCommandNew(firewall_cmd_path);
> 
> This needs to be "cmd = virCommandNew(.....);"

d'oh, yes, thanks.

--
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]