[netcf-devel] [PATCH] interface.rng: Fix ipv4-address regex

Eric Blake eblake at redhat.com
Mon Nov 15 18:42:27 UTC 2010


On 11/15/2010 11:40 AM, Laine Stump wrote:
> When the regex in ipv4-addr was copied for use in libvirt's
> network.rng file, a reviewer pointed out that it allowed two digit
> numbers with leading 0's. The new regex here doesn't allow that.

[that libvirt reviewer was me :) ]

> ---
>  data/xml/interface.rng |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/data/xml/interface.rng b/data/xml/interface.rng
> index 80d686e..4dd1bb4 100644
> --- a/data/xml/interface.rng
> +++ b/data/xml/interface.rng
> @@ -442,7 +442,7 @@
>  
>    <define name='ipv4-addr'>
>      <data type='string'>
> -      <param name="pattern">(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))\.){3}((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2}))</param>
> +      <param name="pattern">(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([1-9][0-9])|([0-9]))</param>

ACK; identical to the libvirt solution.

-- 
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 : https://fedorahosted.org/pipermail/netcf-devel/attachments/20101115/676990f3/attachment.bin 


More information about the netcf-devel mailing list