[libvirt] [PATCH V5 07/10] Enable chains with names having a known prefix
Eric Blake
eblake at redhat.com
Thu Nov 17 23:38:31 UTC 2011
On 11/17/2011 01:11 PM, Stefan Berger wrote:
> +
> + if (strlen(chainname) > MAX_CHAIN_SUFFIX_SIZE) {
> + virNWFilterReportError(VIR_ERR_INVALID_ARG,
> + _("Name of chain is longer than %u characters"),
> + MAX_CHAIN_SUFFIX_SIZE);
> + return NULL;
> + }
Oh, one other thought...
> + <data type="string">
> + <param name="pattern">arp[a-zA-Z0-9_\.:-]*</param>
> + </data>
Since it's easy enough to do, we should probably enforce the strlen rule
during XML validation, by writing this with {0,9} instead of * (since
MAX_CHAIN_SUFFIX_SIZE of 12 minus strlen("arp") is 9), and so forth for
the other patterns.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111117/a6529dcc/attachment-0001.sig>
More information about the libvir-list
mailing list