diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2002-07-09 13:38:50 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2002-07-09 13:38:50 +0000 |
commit | a2ffc9c1555123cd2cbfc1edf7899bc581b0f967 (patch) | |
tree | 77b55d3b84ace09a49146fcaab3962c74ff0a0bd /kernel/linux/net | |
parent | 93bf322657429083ac9c8292f494fa33ba0638d3 (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/linux/net')
-rw-r--r-- | kernel/linux/net/bridge/netfilter/ebt_redirect.c | 11 |
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; } |