Re: [PATCH V5 07/10] Enable chains with names having a known prefix

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

 



On 11/17/2011 06:38 PM, Eric Blake wrote:
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.

Fixed everywhere, also in subsequent patch series adding vlan and stp...

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