On Mon, Feb 01, 2021 at 08:08:56AM +1300, Richard Procter wrote:
> - Might the rule disabling checksum offload for broadcasts on IFF_SIMPLEX
> interfaces be weakened to disable checksum offload for all broadcast
> packets instead?
I just copied the condition from ether_resolve():
/* If broadcasting on a simplex interface, loopback a copy */
if (ISSET(m->m_flags, M_BCAST) &&
ISSET(ifp->if_flags, IFF_SIMPLEX) &&
!m->m_pkthdr.pf.routed) {
struct mbuf *mcopy;
/* XXX Should we input an unencrypted IPsec packet? */
mcopy = m_copym(m, 0, M_COPYALL, M_NOWAIT);
if (mcopy != NULL)
if_input_local(ifp, mcopy, af);
}
The bug is triggered when the packet is processed by if_input_local().
> This simplifies the logic, and shouldn???t impact performance as
Yes, performance does not matter. I just wanted to show that the
code is necessary for simplex interfaces.
> (I wonder if IFF_SIMPLEX is a relic of another age and deserves to be removed
> at some point;
Then remove the IFF_SIMPLEX in ether_resolve() and in in_ifcap_cksum()
simultaneously. Currently I think it makes sense in both places.
> - what motivates the new '!m->m_pkthdr.pf.routed??? term?
Just copied from ether_resolve(). It looks strange I don't know
why it is there. I can leave it out in my check if you think this
is clearer.
bluhm