[patch 2/9] Fix minor iptables error logging issue

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

 



Fix a minor issue with some error reporting in the iptables
code - namely that we use errno after it may have been set
to something other than the error reported.

Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx>

Index: libvirt/src/iptables.c
===================================================================
--- libvirt.orig/src/iptables.c	2008-01-04 11:46:38.000000000 +0000
+++ libvirt.orig/src/iptables.c	2008-01-04 11:46:38.000000000 +0000
@@ -601,7 +601,7 @@ iptRulesReload(iptRules *rules)
 
         if ((retval = iptablesSpawn(WITH_ERRORS, rule->argv)))
             qemudLog(QEMUD_WARN, "Failed to remove iptables rule '%s' from chain '%s' in table '%s': %s",
-                     rule->rule, rules->chain, rules->table, strerror(errno));
+                     rule->rule, rules->chain, rules->table, strerror(retval));
 
         rule->argv[rule->flipflop] = orig;
     }

-- 

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