mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 20:55:13 +02:00
xt_TEE: enable routing by iif, nfmark and flowlabel
Patrick McHardy suggests in http://marc.info/?l=netfilter-devel&m=123564267330117&w=2 that routing should handle the clone more like its original.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- xt_LOGMARK: print incoming interface index
|
||||
- revert "TEE: do not use TOS for routing"
|
||||
- xt_TEE: resolve unknown symbol error with CONFIG_IPV6=n
|
||||
- xt_TEE: enable routing by iif, nfmark and flowlabel
|
||||
|
||||
|
||||
Xtables-addons 1.10 (February 18 2009)
|
||||
|
@@ -60,6 +60,8 @@ tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info)
|
||||
struct flowi fl;
|
||||
|
||||
memset(&fl, 0, sizeof(fl));
|
||||
fl.iif = skb->iif;
|
||||
fl.mark = skb->mark;
|
||||
fl.nl_u.ip4_u.daddr = info->gw.ip;
|
||||
fl.nl_u.ip4_u.tos = RT_TOS(iph->tos);
|
||||
fl.nl_u.ip4_u.scope = RT_SCOPE_UNIVERSE;
|
||||
@@ -219,11 +221,16 @@ tee_tg4(struct sk_buff **pskb, const struct xt_target_param *par)
|
||||
static bool
|
||||
tee_tg_route6(struct sk_buff *skb, const struct xt_tee_tginfo *info)
|
||||
{
|
||||
const struct ipv6hdr *iph = ipv6_hdr(skb);
|
||||
struct dst_entry *dst;
|
||||
struct flowi fl;
|
||||
|
||||
memset(&fl, 0, sizeof(fl));
|
||||
fl.iif = skb->iif;
|
||||
fl.mark = skb->mark;
|
||||
fl.nl_u.ip6_u.daddr = info->gw.in6;
|
||||
fl.nl_u.ip6_u.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) |
|
||||
(iph->flow_lbl[1] << 8) | iph->flow_lbl[2];
|
||||
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 25)
|
||||
dst = ip6_route_output(NULL, &fl);
|
||||
|
Reference in New Issue
Block a user