[libvirt] [PATCHv2 11/13] Update iptables.c to also support ip6tables.

Eric Blake eblake at redhat.com
Thu Dec 23 17:30:57 UTC 2010


On 12/22/2010 11:58 AM, Laine Stump wrote:
> All of the iptables functions eventually call down to a single
> bottom-level function, and fortunately, ip6tables syntax (for all the
> args that we use) is identical to iptables format (except the
> addresses), so all we need to do is:
> 
> 1) Get an address family down to the lowest level function in each
>    case, either implied through an address, or explicitly when no
>    address is in the parameter list, and
> 
> 2) At the lowest level, just decide whether to call "iptables" or
>    "ip6tables" based on the family.
> 
> The location of the ip6tables binary is determined at build time by
> autoconf. If a particular target system happens to not have ip6tables
> installed, any attempts to run it will generate an error, but that
> won't happen unless someone tries to define an IPv6 address for a
> network. This is identical behavior to IPv4 addresses and iptables.

>  err6:
>      if (ipv4def && ipv4def->tftproot) {
> -        iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 69);
> +    iptablesRemoveUdpInput(driver->iptables, AF_INET, network->def->bridge, 69);
>      }

Indentation.

ACK with that nit fixed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101223/494f7b50/attachment-0001.sig>


More information about the libvir-list mailing list