diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index fd5b3a4e3329..0b88c5632793 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
@@ -56,6 +56,7 @@ EXPORT_SYMBOL(ip6_route_me_harder); | |||
56 | struct ip6_rt_info { | 56 | struct ip6_rt_info { |
57 | struct in6_addr daddr; | 57 | struct in6_addr daddr; |
58 | struct in6_addr saddr; | 58 | struct in6_addr saddr; |
59 | u_int32_t mark; | ||
59 | }; | 60 | }; |
60 | 61 | ||
61 | static void nf_ip6_saveroute(const struct sk_buff *skb, | 62 | static void nf_ip6_saveroute(const struct sk_buff *skb, |
@@ -68,6 +69,7 @@ static void nf_ip6_saveroute(const struct sk_buff *skb, | |||
68 | 69 | ||
69 | rt_info->daddr = iph->daddr; | 70 | rt_info->daddr = iph->daddr; |
70 | rt_info->saddr = iph->saddr; | 71 | rt_info->saddr = iph->saddr; |
72 | rt_info->mark = skb->mark; | ||
71 | } | 73 | } |
72 | } | 74 | } |
73 | 75 | ||
@@ -79,7 +81,8 @@ static int nf_ip6_reroute(struct sk_buff *skb, | |||
79 | if (entry->hook == NF_INET_LOCAL_OUT) { | 81 | if (entry->hook == NF_INET_LOCAL_OUT) { |
80 | struct ipv6hdr *iph = ipv6_hdr(skb); | 82 | struct ipv6hdr *iph = ipv6_hdr(skb); |
81 | if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || | 83 | if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || |
82 | !ipv6_addr_equal(&iph->saddr, &rt_info->saddr)) | 84 | !ipv6_addr_equal(&iph->saddr, &rt_info->saddr) || |
85 | skb->mark != rt_info->mark) | ||
83 | return ip6_route_me_harder(skb); | 86 | return ip6_route_me_harder(skb); |
84 | } | 87 | } |
85 | return 0; | 88 | return 0; |