This helps to bring down the frame size of virNWFilterRuleDefFixup, as it exceeds 8192 bytes when libvirt is build with sanitizers enabled, in debug mode, on clang. Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/nwfilter_conf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index a3109962af..62334edeec 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2189,23 +2189,23 @@ virNWFilterRuleValidate(virNWFilterRuleDef *rule) static void virNWFilterRuleDefFixup(virNWFilterRuleDef *rule) { + ethHdrDataDef *ethHdr; + #define COPY_NEG_SIGN(A, B) \ (A).flags = ((A).flags & ~NWFILTER_ENTRY_ITEM_FLAG_IS_NEG) | \ ((B).flags & NWFILTER_ENTRY_ITEM_FLAG_IS_NEG); switch (rule->prtclType) { case VIR_NWFILTER_RULE_PROTOCOL_MAC: - COPY_NEG_SIGN(rule->p.ethHdrFilter.ethHdr.dataSrcMACMask, - rule->p.ethHdrFilter.ethHdr.dataSrcMACAddr); - COPY_NEG_SIGN(rule->p.ethHdrFilter.ethHdr.dataDstMACMask, - rule->p.ethHdrFilter.ethHdr.dataDstMACAddr); + ethHdr = &rule->p.ethHdrFilter.ethHdr; + COPY_NEG_SIGN(ethHdr->dataSrcMACMask, ethHdr->dataSrcMACAddr); + COPY_NEG_SIGN(ethHdr->dataDstMACMask, ethHdr->dataDstMACAddr); break; case VIR_NWFILTER_RULE_PROTOCOL_VLAN: - COPY_NEG_SIGN(rule->p.vlanHdrFilter.ethHdr.dataSrcMACMask, - rule->p.vlanHdrFilter.ethHdr.dataSrcMACAddr); - COPY_NEG_SIGN(rule->p.vlanHdrFilter.ethHdr.dataDstMACMask, - rule->p.vlanHdrFilter.ethHdr.dataDstMACAddr); + ethHdr = &rule->p.vlanHdrFilter.ethHdr; + COPY_NEG_SIGN(ethHdr->dataSrcMACMask, ethHdr->dataSrcMACAddr); + COPY_NEG_SIGN(ethHdr->dataDstMACMask, ethHdr->dataDstMACAddr); break; case VIR_NWFILTER_RULE_PROTOCOL_STP: -- 2.31.1