summaryrefslogtreecommitdiffstats
path: root/kernel/patches/incremental-patches/ebtables-v2.0_vs_2.4.18.pre3.005.diff
blob: 425bc539865b65e308e5c08506efbb2a8d112167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
make redirect work for bridged traffic too

--- ebt2.0pre3.004/net/bridge/netfilter/ebt_redirect.c	Sat Apr 27 13:09:16 2002
+++ ebt2.0pre3.005/net/bridge/netfilter/ebt_redirect.c	Sat Apr 27 22:48:52 2002
@@ -14,6 +14,7 @@
 #include <linux/skbuff.h>
 #include <linux/module.h>
 #include <net/sock.h>
+#include "../br_private.h"
 
 static __u8 ebt_target_redirect(struct sk_buff **pskb, unsigned int hooknr,
    const struct net_device *in, const struct net_device *out,
@@ -21,7 +22,8 @@
 {
 	struct ebt_redirect_info *infostuff = (struct ebt_redirect_info *) data;
 
-	memcpy((**pskb).mac.ethernet->h_dest, in->dev_addr, ETH_ALEN);
+	memcpy((**pskb).mac.ethernet->h_dest,
+	   in->br_port->br->dev.dev_addr, ETH_ALEN);
 	(*pskb)->pkt_type = PACKET_HOST;
 	return infostuff->target;
 }