aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c19
-rw-r--r--net/ipv6/icmp.c4
-rw-r--r--net/ipv6/ip6_input.c3
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c2
4 files changed, 24 insertions, 4 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 5ab9973571ef..87f688857ade 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -776,6 +776,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
776 struct inet6_dev *idev = ifp->idev; 776 struct inet6_dev *idev = ifp->idev;
777 struct in6_addr addr, *tmpaddr; 777 struct in6_addr addr, *tmpaddr;
778 unsigned long tmp_prefered_lft, tmp_valid_lft, tmp_cstamp, tmp_tstamp; 778 unsigned long tmp_prefered_lft, tmp_valid_lft, tmp_cstamp, tmp_tstamp;
779 unsigned long regen_advance;
779 int tmp_plen; 780 int tmp_plen;
780 int ret = 0; 781 int ret = 0;
781 int max_addresses; 782 int max_addresses;
@@ -836,8 +837,23 @@ retry:
836 tmp_tstamp = ifp->tstamp; 837 tmp_tstamp = ifp->tstamp;
837 spin_unlock_bh(&ifp->lock); 838 spin_unlock_bh(&ifp->lock);
838 839
840 regen_advance = idev->cnf.regen_max_retry *
841 idev->cnf.dad_transmits *
842 idev->nd_parms->retrans_time / HZ;
839 write_unlock(&idev->lock); 843 write_unlock(&idev->lock);
840 844
845 /* A temporary address is created only if this calculated Preferred
846 * Lifetime is greater than REGEN_ADVANCE time units. In particular,
847 * an implementation must not create a temporary address with a zero
848 * Preferred Lifetime.
849 */
850 if (tmp_prefered_lft <= regen_advance) {
851 in6_ifa_put(ifp);
852 in6_dev_put(idev);
853 ret = -1;
854 goto out;
855 }
856
841 addr_flags = IFA_F_TEMPORARY; 857 addr_flags = IFA_F_TEMPORARY;
842 /* set in addrconf_prefix_rcv() */ 858 /* set in addrconf_prefix_rcv() */
843 if (ifp->flags & IFA_F_OPTIMISTIC) 859 if (ifp->flags & IFA_F_OPTIMISTIC)
@@ -1834,6 +1850,9 @@ ok:
1834 * lifetimes of an existing temporary address 1850 * lifetimes of an existing temporary address
1835 * when processing a Prefix Information Option. 1851 * when processing a Prefix Information Option.
1836 */ 1852 */
1853 if (ifp != ift->ifpub)
1854 continue;
1855
1837 spin_lock(&ift->lock); 1856 spin_lock(&ift->lock);
1838 flags = ift->flags; 1857 flags = ift->flags;
1839 if (ift->valid_lft > valid_lft && 1858 if (ift->valid_lft > valid_lft &&
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 63309d10df3a..227ce3d2339d 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -440,10 +440,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
440 } 440 }
441 441
442 if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) 442 if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6))
443 goto out; 443 goto out_dst_release;
444 444
445 if (ip6_dst_lookup(sk, &dst2, &fl)) 445 if (ip6_dst_lookup(sk, &dst2, &fl))
446 goto out; 446 goto out_dst_release;
447 447
448 err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP); 448 err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP);
449 if (err == -ENOENT) { 449 if (err == -ENOENT) {
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 7e36269826ba..43a617e2268b 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -234,8 +234,7 @@ int ip6_mc_input(struct sk_buff *skb)
234 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS); 234 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS);
235 235
236 hdr = ipv6_hdr(skb); 236 hdr = ipv6_hdr(skb);
237 deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) || 237 deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
238 ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
239 238
240 /* 239 /*
241 * IPv6 multicast router mode isnt currently supported. 240 * IPv6 multicast router mode isnt currently supported.
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index ad8066200f9d..9e5f305b2022 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -171,7 +171,9 @@ static __inline__ void fq_kill(struct nf_ct_frag6_queue *fq)
171 171
172static void nf_ct_frag6_evictor(void) 172static void nf_ct_frag6_evictor(void)
173{ 173{
174 local_bh_disable();
174 inet_frag_evictor(&nf_init_frags, &nf_frags); 175 inet_frag_evictor(&nf_init_frags, &nf_frags);
176 local_bh_enable();
175} 177}
176 178
177static void nf_ct_frag6_expire(unsigned long data) 179static void nf_ct_frag6_expire(unsigned long data)