compat: Always use own __ipv6_select_ident().
authorJoe Stringer <joe@ovn.org>
Tue, 15 Dec 2015 19:24:33 +0000 (11:24 -0800)
committerJoe Stringer <joe@ovn.org>
Sat, 19 Dec 2015 01:27:11 +0000 (17:27 -0800)
If the ip fragmentation backport is enabled, we should always use our
own {,__}ipv6_select_ident(). This fixes the following issue on some
v3.19 kernels:

datapath/linux/ip6_output.c:93:12: error: conflicting types for
‘__ipv6_select_ident’
 static u32 __ipv6_select_ident(struct net *net, u32 hashrnd,

Reported-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Tested-by: Simon Horman <simon.horman@netronome.com>
datapath/linux/compat/ip6_output.c

index 004575c..5c0cdec 100644 (file)
@@ -90,7 +90,7 @@ static u32 rpl_ip_idents_reserve(u32 hash, int segs)
        return atomic_add_return(segs + delta, p_id) - segs;
 }
 
-static u32 __ipv6_select_ident(struct net *net, u32 hashrnd,
+static u32 rpl___ipv6_select_ident(struct net *net, u32 hashrnd,
                               const struct in6_addr *dst,
                               const struct in6_addr *src)
 {
@@ -111,7 +111,6 @@ static u32 __ipv6_select_ident(struct net *net, u32 hashrnd,
        return id;
 }
 
-/* XXX: Exported in 3.19. */
 static __be32 rpl_ipv6_select_ident(struct net *net,
                             const struct in6_addr *daddr,
                             const struct in6_addr *saddr)
@@ -121,7 +120,7 @@ static __be32 rpl_ipv6_select_ident(struct net *net,
 
        net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
 
-       id = __ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr);
+       id = rpl___ipv6_select_ident(net, ip6_idents_hashrnd, daddr, saddr);
        return htonl(id);
 }