<tt><font size=2>Eric Blake <eblake@redhat.com> wrote on 03/10/2014
06:05:18 PM:<br>
<br>
> From: Eric Blake <eblake@redhat.com></font></tt>
<br><tt><font size=2><br>
> On 03/10/2014 02:49 PM, Stefan Berger wrote:<br>
> > From: Stefan Berger <stefanb@linux.vnet.ibm.com><br>
> > <br>
> > Recent Linux iptables (3.11.7) refuses to create iptables MAC
address<br>
> > check rules using -m mac --mac-source <addr> where previous
versions<br>
> > still allowed it. So we now need to deactivate the filtering
rules for<br>
> > when the incoming traffic is filtered before it is sent into
the VM.<br>
> > Those are typically the chains that start with FO-* or start
with FP-*<br>
> > when they are being built.<br>
> > <br>
> > Adapt the documentation to reflect the fact that srcmacaddr,
when<br>
> > used in iptables rules, should be regarded as deprecated due
to the<br>
> > above mentioned problems.<br>
> <br>
> Is this an unintentional kernel regression, or something that we were<br>
> doing wrong all along and the kernel is now finally calling our bluff?</font></tt>
<br>
<br><tt><font size=2>I must say, I did not test whether the iptables rule
in this particular case</font></tt>
<br><tt><font size=2>did not work. I assumed that if it applies, it will
work. And besides that</font></tt>
<br><tt><font size=2>it is supposed to work in the FORWARD chain (following
dmesg) and we now have</font></tt>
<br><tt><font size=2>a case where the rule is accepted in a chain that
is connected to the FORWARD</font></tt>
<br><tt><font size=2>chain and is rejected in a chain that is also connected
to the FORWARD chain.</font></tt>
<br><tt><font size=2>Both chains are not connected to the FORDWARD chain
directly but there is one</font></tt>
<br><tt><font size=2>other chain in between. It may be that iptables walks
these chains to see whether</font></tt>
<br><tt><font size=2>they are connected to the FORWARD chain but for some
reason doesn't do it</font></tt>
<br><tt><font size=2>correctly for the 2nd case.</font></tt>
<br>
<br><tt><font size=2>It still applies in 3.10.</font></tt>
<br><tt><font size=2><br>
> <br>
> <br>
> > +++ b/docs/formatnwfilter.html.in<br>
> > @@ -1209,7 +1209,7 @@<br>
> >         <tr><br>
> >           <td>srcmacaddr</td><br>
> >           <td>MAC_ADDR</td><br>
> > -         <td>MAC address of sender</td><br>
> > +         <td>MAC address of sender;
this option is deprecated</td><br>
> <br>
> Marking something as deprecated is one thing...<br>
> <br>
> >         </tr><br>
> >         <tr><br>
> >           <td>srcipaddr</td><br>
> > @@ -1320,22 +1320,7 @@<br>
> >         <tr><br>
> >           <td>srcmacaddr</td><br>
> >           <td>MAC_ADDR</td><br>
> > -         <td>MAC address of sender</td><br>
> > -       </tr><br>
> > -       <tr><br>
> > -         <td>srcmacmask</td><br>
> > -         <td>MAC_MASK</td><br>
> > -         <td>Mask applied to MAC address
of sender</td><br>
> > -       </tr><br>
> <br>
> ...but completely removing documentation feels wrong.  Was this
bogus<br>
> documentation, or do we still support usage of this XML on older kernels<br>
> that don't prohibit it?  Maybe separate this into multiple patches
- doc</font></tt>
<br>
<br><tt><font size=2>This was bogs documentation. Must have been a c&p
error. srcmacmask only exists for rules mapping into ebtables rules, but
that's not the case here.</font></tt>
<br><tt><font size=2><br>
> fixes (deleting stuff that never worked) vs. deprecation (marking
stuff<br>
> that no longer works on newer kernels).<br>
> <br>
> > @@ -984,6 +984,14 @@ iptablesHandleSrcMacAddr(virBufferPtr buf,<br>
> >              return 0;<br>
> >          }<br>
> >  <br>
> > +        /* recent Linux iptables does not
allow this filteirng rule to be<br>
> <br>
> s/filteirng/filtering/<br>
> <br>
> > +         * applied to all FO-* chains<br>
> > +         */<br>
> > +        if (chain[1] == CHAINPREFIX_HOST_OUT_TEMP
) {<br>
> <br>
> No space before )<br>
></font></tt>
<br>
<br><tt><font size=2>Will fix.</font></tt>
<br>
<br><tt><font size=2>Stefan</font></tt>
<br>