summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2002-07-09 13:38:50 +0000
committerBart De Schuymer <bdschuym@pandora.be>2002-07-09 13:38:50 +0000
commita2ffc9c1555123cd2cbfc1edf7899bc581b0f967 (patch)
tree77b55d3b84ace09a49146fcaab3962c74ff0a0bd /kernel
parent93bf322657429083ac9c8292f494fa33ba0638d3 (diff)
MAC destination address for redirect in BROUTE should be the
address of the physical device. MAC destination address for redirect in PREROUTING should be the address of the logical bridge device.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/linux/net/bridge/netfilter/ebt_redirect.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/linux/net/bridge/netfilter/ebt_redirect.c b/kernel/linux/net/bridge/netfilter/ebt_redirect.c
index 6580fe3..1b8d696 100644
--- a/kernel/linux/net/bridge/netfilter/ebt_redirect.c
+++ b/kernel/linux/net/bridge/netfilter/ebt_redirect.c
@@ -22,9 +22,14 @@ static int ebt_target_redirect(struct sk_buff **pskb, unsigned int hooknr,
{
struct ebt_redirect_info *infostuff = (struct ebt_redirect_info *) data;
- memcpy((**pskb).mac.ethernet->h_dest,
- in->br_port->br->dev.dev_addr, ETH_ALEN);
- (*pskb)->pkt_type = PACKET_HOST;
+ if (hooknr != NF_BR_BROUTING)
+ memcpy((**pskb).mac.ethernet->h_dest,
+ in->br_port->br->dev.dev_addr, ETH_ALEN);
+ else {
+ memcpy((**pskb).mac.ethernet->h_dest,
+ in->dev_addr, ETH_ALEN);
+ (*pskb)->pkt_type = PACKET_HOST;
+ }
return infostuff->target;
}