提交 df3a681c 编写于 作者: D Daniel P. Berrange

Change CMD_STOPONERR(1) to use true

The CMD_STOPONERR macro uses its parameter as a boolean, so should
be passed true rather than 1.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 7dd1c91a
...@@ -797,7 +797,7 @@ iptablesSetupVirtInPost(virBufferPtr buf, ...@@ -797,7 +797,7 @@ iptablesSetupVirtInPost(virBufferPtr buf,
"fi\n", "fi\n",
PHYSDEV_IN, ifname, PHYSDEV_IN, ifname,
match, ifname, match, ifname,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
} }
...@@ -3246,7 +3246,7 @@ ebtablesApplyBasicRules(const char *ifname, ...@@ -3246,7 +3246,7 @@ ebtablesApplyBasicRules(const char *ifname,
"%s", "%s",
chain, macaddr_str, chain, macaddr_str,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
virBufferAsprintf(&buf, virBufferAsprintf(&buf,
CMD_DEF("$EBT -t nat -A %s -p IPv4 -j ACCEPT") CMD_SEPARATOR CMD_DEF("$EBT -t nat -A %s -p IPv4 -j ACCEPT") CMD_SEPARATOR
...@@ -3254,7 +3254,7 @@ ebtablesApplyBasicRules(const char *ifname, ...@@ -3254,7 +3254,7 @@ ebtablesApplyBasicRules(const char *ifname,
"%s", "%s",
chain, chain,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
virBufferAsprintf(&buf, virBufferAsprintf(&buf,
CMD_DEF("$EBT -t nat -A %s -p ARP -j ACCEPT") CMD_SEPARATOR CMD_DEF("$EBT -t nat -A %s -p ARP -j ACCEPT") CMD_SEPARATOR
...@@ -3262,7 +3262,7 @@ ebtablesApplyBasicRules(const char *ifname, ...@@ -3262,7 +3262,7 @@ ebtablesApplyBasicRules(const char *ifname,
"%s", "%s",
chain, chain,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
virBufferAsprintf(&buf, virBufferAsprintf(&buf,
CMD_DEF("$EBT -t nat -A %s -j DROP") CMD_SEPARATOR CMD_DEF("$EBT -t nat -A %s -j DROP") CMD_SEPARATOR
...@@ -3270,7 +3270,7 @@ ebtablesApplyBasicRules(const char *ifname, ...@@ -3270,7 +3270,7 @@ ebtablesApplyBasicRules(const char *ifname,
"%s", "%s",
chain, chain,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
ebtablesLinkTmpRootChain(&buf, true, ifname); ebtablesLinkTmpRootChain(&buf, true, ifname);
ebtablesRenameTmpRootChain(&buf, true, ifname); ebtablesRenameTmpRootChain(&buf, true, ifname);
...@@ -3351,7 +3351,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname, ...@@ -3351,7 +3351,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname,
chain_in, chain_in,
macaddr_str, macaddr_str,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
virBufferAsprintf(&buf, virBufferAsprintf(&buf,
CMD_DEF("$EBT -t nat -A %s -j DROP") CMD_SEPARATOR CMD_DEF("$EBT -t nat -A %s -j DROP") CMD_SEPARATOR
...@@ -3359,7 +3359,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname, ...@@ -3359,7 +3359,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname,
"%s", "%s",
chain_in, chain_in,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
num_dhcpsrvrs = (dhcpsrvrs != NULL) num_dhcpsrvrs = (dhcpsrvrs != NULL)
? virNWFilterVarValueGetCardinality(dhcpsrvrs) ? virNWFilterVarValueGetCardinality(dhcpsrvrs)
...@@ -3396,7 +3396,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname, ...@@ -3396,7 +3396,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname,
chain_out, chain_out,
(ctr == 0) ? macaddr_str : "ff:ff:ff:ff:ff:ff", (ctr == 0) ? macaddr_str : "ff:ff:ff:ff:ff:ff",
srcIPParam != NULL ? srcIPParam : "", srcIPParam != NULL ? srcIPParam : "",
CMD_STOPONERR(1)); CMD_STOPONERR(true));
} }
VIR_FREE(srcIPParam); VIR_FREE(srcIPParam);
...@@ -3413,7 +3413,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname, ...@@ -3413,7 +3413,7 @@ ebtablesApplyDHCPOnlyRules(const char *ifname,
"%s", "%s",
chain_out, chain_out,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
ebtablesLinkTmpRootChain(&buf, true, ifname); ebtablesLinkTmpRootChain(&buf, true, ifname);
ebtablesLinkTmpRootChain(&buf, false, ifname); ebtablesLinkTmpRootChain(&buf, false, ifname);
...@@ -3478,7 +3478,7 @@ ebtablesApplyDropAllRules(const char *ifname) ...@@ -3478,7 +3478,7 @@ ebtablesApplyDropAllRules(const char *ifname)
"%s", "%s",
chain_in, chain_in,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
virBufferAsprintf(&buf, virBufferAsprintf(&buf,
CMD_DEF("$EBT -t nat -A %s -j DROP") CMD_SEPARATOR CMD_DEF("$EBT -t nat -A %s -j DROP") CMD_SEPARATOR
...@@ -3486,7 +3486,7 @@ ebtablesApplyDropAllRules(const char *ifname) ...@@ -3486,7 +3486,7 @@ ebtablesApplyDropAllRules(const char *ifname)
"%s", "%s",
chain_out, chain_out,
CMD_STOPONERR(1)); CMD_STOPONERR(true));
ebtablesLinkTmpRootChain(&buf, true, ifname); ebtablesLinkTmpRootChain(&buf, true, ifname);
ebtablesLinkTmpRootChain(&buf, false, ifname); ebtablesLinkTmpRootChain(&buf, false, ifname);
...@@ -4182,7 +4182,7 @@ ebiptablesDriverInitWithFirewallD(void) ...@@ -4182,7 +4182,7 @@ ebiptablesDriverInitWithFirewallD(void)
CMD_DEF("$FWC --state") CMD_SEPARATOR CMD_DEF("$FWC --state") CMD_SEPARATOR
CMD_EXEC CMD_EXEC
"%s", "%s",
CMD_STOPONERR(1)); CMD_STOPONERR(true));
if (ebiptablesExecCLI(&buf, false, &output) < 0) { if (ebiptablesExecCLI(&buf, false, &output) < 0) {
VIR_INFO("firewalld support disabled for nwfilter"); VIR_INFO("firewalld support disabled for nwfilter");
...@@ -4251,7 +4251,7 @@ ebiptablesDriverTestCLITools(void) ...@@ -4251,7 +4251,7 @@ ebiptablesDriverTestCLITools(void)
CMD_DEF("$EBT -t nat -L") CMD_SEPARATOR CMD_DEF("$EBT -t nat -L") CMD_SEPARATOR
CMD_EXEC CMD_EXEC
"%s", "%s",
CMD_STOPONERR(1)); CMD_STOPONERR(true));
if (ebiptablesExecCLI(&buf, false, &errmsg) < 0) { if (ebiptablesExecCLI(&buf, false, &errmsg) < 0) {
VIR_FREE(ebtables_cmd_path); VIR_FREE(ebtables_cmd_path);
...@@ -4268,7 +4268,7 @@ ebiptablesDriverTestCLITools(void) ...@@ -4268,7 +4268,7 @@ ebiptablesDriverTestCLITools(void)
CMD_DEF("$IPT -n -L FORWARD") CMD_SEPARATOR CMD_DEF("$IPT -n -L FORWARD") CMD_SEPARATOR
CMD_EXEC CMD_EXEC
"%s", "%s",
CMD_STOPONERR(1)); CMD_STOPONERR(true));
if (ebiptablesExecCLI(&buf, false, &errmsg) < 0) { if (ebiptablesExecCLI(&buf, false, &errmsg) < 0) {
VIR_FREE(iptables_cmd_path); VIR_FREE(iptables_cmd_path);
...@@ -4285,7 +4285,7 @@ ebiptablesDriverTestCLITools(void) ...@@ -4285,7 +4285,7 @@ ebiptablesDriverTestCLITools(void)
CMD_DEF("$IPT -n -L FORWARD") CMD_SEPARATOR CMD_DEF("$IPT -n -L FORWARD") CMD_SEPARATOR
CMD_EXEC CMD_EXEC
"%s", "%s",
CMD_STOPONERR(1)); CMD_STOPONERR(true));
if (ebiptablesExecCLI(&buf, false, &errmsg) < 0) { if (ebiptablesExecCLI(&buf, false, &errmsg) < 0) {
VIR_FREE(ip6tables_cmd_path); VIR_FREE(ip6tables_cmd_path);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册