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

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



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


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