[PATCH][BRIDGE-NF] Adjust skb->pkt_type when necessary
Bart De Schuymer <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Dave,
Below is a trivial patch to make iptables and ebtables redirect targets
work again on a bridge.
cheers,
Bart
--- linux-2.6.0-test8/net/bridge/br_netfilter.c.old 2003-10-18 22:40:31.000000000 +0200
+++ linux-2.6.0-test8/net/bridge/br_netfilter.c 2003-10-18 22:41:08.000000000 +0200
@@ -217,6 +217,7 @@ bridged_dnat:
}
memcpy(skb->mac.ethernet->h_dest, dev->dev_addr,
ETH_ALEN);
+ skb->pkt_type = PACKET_HOST;
}
} else {
skb->dst = (struct dst_entry *)&__fake_rtable;
--- linux-2.6.0-test8/net/bridge/netfilter/ebt_redirect.c.old 2003-10-18 22:41:19.000000000 +0200
+++ linux-2.6.0-test8/net/bridge/netfilter/ebt_redirect.c 2003-10-18 22:41:58.000000000 +0200
@@ -34,11 +34,10 @@ static int ebt_target_redirect(struct sk
if (hooknr != NF_BR_BROUTING)
memcpy((**pskb).mac.ethernet->h_dest,
in->br_port->br->dev->dev_addr, ETH_ALEN);
- else {
+ else
memcpy((**pskb).mac.ethernet->h_dest,
in->dev_addr, ETH_ALEN);
- (*pskb)->pkt_type = PACKET_HOST;
- }
+ (*pskb)->pkt_type = PACKET_HOST;
return info->target;
}
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com