Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[firefly-linux-kernel-4.4.55.git] / net / ipv6 / icmp.c
index c7da1422cbde63af314c7b12d9ee6851723d5a51..24d69dbca4d68e2f1d1444796cb3d5c33b0a1fe2 100644 (file)
@@ -194,8 +194,10 @@ static inline bool icmpv6_xrlim_allow(struct sock *sk, u8 type,
                if (rt->rt6i_dst.plen < 128)
                        tmo >>= ((128 - rt->rt6i_dst.plen)>>5);
 
-               peer = rt6_get_peer_create(rt);
+               peer = inet_getpeer_v6(net->ipv6.peers, &rt->rt6i_dst.addr, 1);
                res = inet_peer_xrlim_allow(peer, tmo);
+               if (peer)
+                       inet_putpeer(peer);
        }
        dst_release(dst);
        return res;
@@ -596,7 +598,7 @@ out:
        icmpv6_xmit_unlock(sk);
 }
 
-static void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info)
+void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info)
 {
        const struct inet6_protocol *ipprot;
        int inner_offset;