mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: pass layer into firewall query callback
Some of the query callbacks want to know the firewall layer that was being used for triggering the query to avoid duplicating that data. Reviewed-by: Laine Stump <laine@laine.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -990,11 +990,12 @@ testFirewallQueryHook(const char *const*args,
|
||||
|
||||
static int
|
||||
testFirewallQueryCallback(virFirewallPtr fw,
|
||||
virFirewallLayer layer,
|
||||
const char *const *lines,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
virFirewallAddRule(fw, VIR_FIREWALL_LAYER_IPV4,
|
||||
virFirewallAddRule(fw, layer,
|
||||
"-A", "INPUT",
|
||||
"--source-host", "!192.168.122.129",
|
||||
"--jump", "REJECT", NULL);
|
||||
|
||||
Reference in New Issue
Block a user