netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Can we rely on ethernet header padding?
@ 2013-03-19 15:05 Michal Kubecek
  2013-03-19 15:21 ` Eric Dumazet
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Kubecek @ 2013-03-19 15:05 UTC (permalink / raw)
  To: netdev; +Cc: netfilter-devel

Hello,

a customer of ours ran into

  http://bugzilla.netfilter.org/show_bug.cgi?id=765

They checked that commit a504b86e prevents the crash but I'm not sure it
is sufficient.

The crash happens when br_nf_pre_routing_finish_bridge() calls
neigh_hh_bridge() which copies not only destination MAC address but also
the padding with it. IIUC this is for performance reasons (so that
aligned 8 bytes are copied rather than 6).

But I wonder whether we can rely on the fact that every skb on an
ethernet-like device has ethernet header padded at least to the 16 bytes
expected by neigh_hh_bridge() and neigh_hh_output() or whether the
bridge code should make sure. I tried to look for such test but couldn't
find any, even if commit a504b86e description mentions reallocating the
skb rather than a crash.

Thanks in advance,
                                                          Michal Kubecek


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-20  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19 15:05 Can we rely on ethernet header padding? Michal Kubecek
2013-03-19 15:21 ` Eric Dumazet
2013-03-19 15:48   ` Michal Kubecek
2013-03-19 21:25     ` Stephen Hemminger
2013-03-20  9:54       ` Michal Kubecek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).