Re: [PATCH 05/13] Pass prefix rather than netmask into iptables functions

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

 



On 12/20/2010 01:03 AM, Laine Stump wrote:
> IPv6 will use prefix exclusively, and IPv4 will also optionally be
> able to use it, and the iptables functions really need a prefix
> anyway, so use the new virNetworkDefPrefix() function to send prefixes
> into iptables functions instead of netmasks.
> 
> Also, in a couple places where a netmask is actually needed, use the
> new private API function for it rather than getting it directly. This
> will allow for cases where no netmask or prefix is specified (it
> returns the default for the current class of network.)
> +++ b/src/util/iptables.c
> @@ -276,25 +276,24 @@ iptablesRemoveUdpInput(iptablesContext *ctx,
>  
>  
>  static char *iptablesFormatNetwork(virSocketAddr *netaddr,
> -                                   virSocketAddr *netmask)
> +                                   int prefix)

Depending on the resolution to 1/13, you probably want these to all be
unsigned int prefix as well.

But that's a mechanical change, and I didn't see anything else wrong, so
conditional ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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