Patrick McHardy a193a4abdd [NETFILTER]: Fix skb->nf_bridge lifetime issues
The bridge netfilter code simulates the NF_IP_PRE_ROUTING hook and skips
the real hook by registering with high priority and returning NF_STOP if
skb->nf_bridge is present and the BRNF_NF_BRIDGE_PREROUTING flag is not
set. The flag is only set during the simulated hook.

Because skb->nf_bridge is only freed when the packet is destroyed, the
packet will not only skip the first invocation of NF_IP_PRE_ROUTING, but
in the case of tunnel devices on top of the bridge also all further ones.
Forwarded packets from a bridge encapsulated by a tunnel device and sent
as locally outgoing packet will also still have the incorrect bridge
information from the input path attached.

We already have nf_reset calls on all RX/TX paths of tunnel devices,
so simply reset the nf_bridge field there too. As an added bonus,
the bridge information for locally delivered packets is now also freed
when the packet is queued to a socket.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 19:23:05 -08:00
..
2006-01-11 18:42:14 -08:00
2006-01-11 18:42:14 -08:00
2006-03-20 19:15:29 -08:00
2006-01-11 18:42:14 -08:00
2006-03-20 19:15:29 -08:00
2006-01-03 14:38:34 -08:00
2006-02-07 20:57:37 -05:00
2006-01-11 18:42:14 -08:00
2006-01-03 13:10:28 -08:00
2006-01-18 19:20:30 -08:00
2006-03-20 17:53:41 -08:00
2006-01-03 13:10:27 -08:00
2006-01-03 16:03:49 -08:00
2006-01-03 13:11:09 -08:00
2006-01-30 20:54:39 -08:00
2006-03-20 17:53:41 -08:00
2006-03-20 17:53:41 -08:00
2006-03-20 17:53:41 -08:00
2006-03-20 17:53:41 -08:00
2006-01-04 13:59:32 -08:00