Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224723
b: refs/heads/master
c: 672f007
h: refs/heads/master
i:
  224721: a67170b
  224719: 601042e
v: v3
  • Loading branch information
David S. Miller committed Nov 30, 2010
1 parent 0f9a950 commit 3f80df5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 021e9299113363cc1b713f86b2cba30b8e6cb5dd
refs/heads/master: 672f007d65f50468a4a1e55825fe58e5b035324d
10 changes: 10 additions & 0 deletions trunk/include/net/inetpeer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/spinlock.h>
#include <net/ipv6.h>
#include <asm/atomic.h>

typedef struct {
Expand Down Expand Up @@ -61,6 +62,15 @@ static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create)
return inet_getpeer(&daddr, create);
}

static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int create)
{
inet_peer_address_t daddr;

ipv6_addr_copy((struct in6_addr *)daddr.a6, v6daddr);
daddr.family = AF_INET6;
return inet_getpeer(&daddr, create);
}

/* can be called from BH context or outside */
extern void inet_putpeer(struct inet_peer *p);

Expand Down

0 comments on commit 3f80df5

Please sign in to comment.