* [PATCH 2.6.3-bk7] Allow ebtables module to change protocol in netif_receive_skb
@ 2004-02-25 22:49 Simon Barber
0 siblings, 0 replies; only message in thread
From: Simon Barber @ 2004-02-25 22:49 UTC (permalink / raw)
To: Kernel Mailing List, netdev; +Cc: Bart De Schuymer
Currently skb->protocol is read before the bridge is called, even though
it's not used until after. Hence if an ebtables module changes the
protocol of a frame the wrong protocol is interpreted.
Simon Barber
--- linux-2.6.3-bk7.orig/net/core/dev.c 2004-02-25 04:19:07.000000000
-0800
+++ linux-2.6.3-bk7/net/core/dev.c 2004-02-25 06:42:11.000000000
-0800
@@ -1725,7 +1725,7 @@
{
struct packet_type *ptype, *pt_prev;
int ret = NET_RX_DROP;
- unsigned short type = skb->protocol;
+ unsigned short type;
if (!skb->stamp.tv_sec)
do_gettimeofday(&skb->stamp);
@@ -1759,6 +1759,7 @@
if (__handle_bridge(skb, &pt_prev, &ret))
goto out;
+ type = skb->protocol;
list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type)&15],
list) {
if (ptype->type == type &&
(!ptype->dev || ptype->dev == skb->dev)) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-25 22:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-25 22:49 [PATCH 2.6.3-bk7] Allow ebtables module to change protocol in netif_receive_skb Simon Barber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®