Otherwise we will mangle the packet for anyone who came before us
(e.g. tcpdump via AF_PACKET).
static void
do_port_input(struct net_bridge_port *p, struct sk_buff *skb)
{
+ /* Make our own copy of the packet. Otherwise we will mangle the
+ * packet for anyone who came before us (e.g. tcpdump via AF_PACKET).
+ * (No one comes after us, since we tell handle_bridge() that we took
+ * the packet.) */
+ skb = skb_share_check(skb, GFP_ATOMIC);
+ if (!skb)
+ return;
+
#ifdef SUPPORT_SNAT
/* Check if this packet needs early SNAT processing. */
if (snat_pre_route(skb)) {