aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inetpeer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inetpeer.h')
-rw-r--r--include/net/inetpeer.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index ead2cb2de18c..60e2cd8d1319 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -15,12 +15,16 @@
15#include <net/ipv6.h> 15#include <net/ipv6.h>
16#include <asm/atomic.h> 16#include <asm/atomic.h>
17 17
18struct inetpeer_addr { 18struct inetpeer_addr_base {
19 union { 19 union {
20 __be32 a4; 20 __be32 a4;
21 __be32 a6[4]; 21 __be32 a6[4];
22 }; 22 };
23 __u16 family; 23};
24
25struct inetpeer_addr {
26 struct inetpeer_addr_base addr;
27 __u16 family;
24}; 28};
25 29
26struct inet_peer { 30struct inet_peer {
@@ -67,7 +71,7 @@ static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create)
67{ 71{
68 struct inetpeer_addr daddr; 72 struct inetpeer_addr daddr;
69 73
70 daddr.a4 = v4daddr; 74 daddr.addr.a4 = v4daddr;
71 daddr.family = AF_INET; 75 daddr.family = AF_INET;
72 return inet_getpeer(&daddr, create); 76 return inet_getpeer(&daddr, create);
73} 77}
@@ -76,7 +80,7 @@ static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int cr
76{ 80{
77 struct inetpeer_addr daddr; 81 struct inetpeer_addr daddr;
78 82
79 ipv6_addr_copy((struct in6_addr *)daddr.a6, v6daddr); 83 ipv6_addr_copy((struct in6_addr *)daddr.addr.a6, v6daddr);
80 daddr.family = AF_INET6; 84 daddr.family = AF_INET6;
81 return inet_getpeer(&daddr, create); 85 return inet_getpeer(&daddr, create);
82} 86}