aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_output.c2
-rw-r--r--net/ipv6/netfilter/ip6_queue.c2
-rw-r--r--net/ipv6/netfilter/ip6table_mangle.c9
-rw-r--r--net/ipv6/route.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 93330685adfc..1bde3aca3466 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -499,12 +499,12 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from)
499 dst_release(to->dst); 499 dst_release(to->dst);
500 to->dst = dst_clone(from->dst); 500 to->dst = dst_clone(from->dst);
501 to->dev = from->dev; 501 to->dev = from->dev;
502 to->mark = from->mark;
502 503
503#ifdef CONFIG_NET_SCHED 504#ifdef CONFIG_NET_SCHED
504 to->tc_index = from->tc_index; 505 to->tc_index = from->tc_index;
505#endif 506#endif
506#ifdef CONFIG_NETFILTER 507#ifdef CONFIG_NETFILTER
507 to->nfmark = from->nfmark;
508 /* Connection association is same as pre-frag packet */ 508 /* Connection association is same as pre-frag packet */
509 nf_conntrack_put(to->nfct); 509 nf_conntrack_put(to->nfct);
510 to->nfct = from->nfct; 510 to->nfct = from->nfct;
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 9fec832ee08b..21908c9a10da 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -241,7 +241,7 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
241 pmsg->data_len = data_len; 241 pmsg->data_len = data_len;
242 pmsg->timestamp_sec = entry->skb->tstamp.off_sec; 242 pmsg->timestamp_sec = entry->skb->tstamp.off_sec;
243 pmsg->timestamp_usec = entry->skb->tstamp.off_usec; 243 pmsg->timestamp_usec = entry->skb->tstamp.off_usec;
244 pmsg->mark = entry->skb->nfmark; 244 pmsg->mark = entry->skb->mark;
245 pmsg->hook = entry->info->hook; 245 pmsg->hook = entry->info->hook;
246 pmsg->hw_protocol = entry->skb->protocol; 246 pmsg->hw_protocol = entry->skb->protocol;
247 247
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c
index 386ea260e767..6250e86a6ddc 100644
--- a/net/ipv6/netfilter/ip6table_mangle.c
+++ b/net/ipv6/netfilter/ip6table_mangle.c
@@ -149,11 +149,10 @@ ip6t_local_hook(unsigned int hook,
149 int (*okfn)(struct sk_buff *)) 149 int (*okfn)(struct sk_buff *))
150{ 150{
151 151
152 unsigned long nfmark;
153 unsigned int ret; 152 unsigned int ret;
154 struct in6_addr saddr, daddr; 153 struct in6_addr saddr, daddr;
155 u_int8_t hop_limit; 154 u_int8_t hop_limit;
156 u_int32_t flowlabel; 155 u_int32_t flowlabel, mark;
157 156
158#if 0 157#if 0
159 /* root is playing with raw sockets. */ 158 /* root is playing with raw sockets. */
@@ -165,10 +164,10 @@ ip6t_local_hook(unsigned int hook,
165 } 164 }
166#endif 165#endif
167 166
168 /* save source/dest address, nfmark, hoplimit, flowlabel, priority, */ 167 /* save source/dest address, mark, hoplimit, flowlabel, priority, */
169 memcpy(&saddr, &(*pskb)->nh.ipv6h->saddr, sizeof(saddr)); 168 memcpy(&saddr, &(*pskb)->nh.ipv6h->saddr, sizeof(saddr));
170 memcpy(&daddr, &(*pskb)->nh.ipv6h->daddr, sizeof(daddr)); 169 memcpy(&daddr, &(*pskb)->nh.ipv6h->daddr, sizeof(daddr));
171 nfmark = (*pskb)->nfmark; 170 mark = (*pskb)->mark;
172 hop_limit = (*pskb)->nh.ipv6h->hop_limit; 171 hop_limit = (*pskb)->nh.ipv6h->hop_limit;
173 172
174 /* flowlabel and prio (includes version, which shouldn't change either */ 173 /* flowlabel and prio (includes version, which shouldn't change either */
@@ -179,7 +178,7 @@ ip6t_local_hook(unsigned int hook,
179 if (ret != NF_DROP && ret != NF_STOLEN 178 if (ret != NF_DROP && ret != NF_STOLEN
180 && (memcmp(&(*pskb)->nh.ipv6h->saddr, &saddr, sizeof(saddr)) 179 && (memcmp(&(*pskb)->nh.ipv6h->saddr, &saddr, sizeof(saddr))
181 || memcmp(&(*pskb)->nh.ipv6h->daddr, &daddr, sizeof(daddr)) 180 || memcmp(&(*pskb)->nh.ipv6h->daddr, &daddr, sizeof(daddr))
182 || (*pskb)->nfmark != nfmark 181 || (*pskb)->mark != mark
183 || (*pskb)->nh.ipv6h->hop_limit != hop_limit)) 182 || (*pskb)->nh.ipv6h->hop_limit != hop_limit))
184 return ip6_route_me_harder(*pskb) == 0 ? ret : NF_DROP; 183 return ip6_route_me_harder(*pskb) == 0 ? ret : NF_DROP;
185 184
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e9c1fc5f21b1..aaabb1fad1cf 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -712,7 +712,7 @@ void ip6_route_input(struct sk_buff *skb)
712 .daddr = iph->daddr, 712 .daddr = iph->daddr,
713 .saddr = iph->saddr, 713 .saddr = iph->saddr,
714#ifdef CONFIG_IPV6_ROUTE_FWMARK 714#ifdef CONFIG_IPV6_ROUTE_FWMARK
715 .fwmark = skb->nfmark, 715 .fwmark = skb->mark,
716#endif 716#endif
717 .flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK, 717 .flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK,
718 }, 718 },