diff options
Diffstat (limited to 'include/linux/ipv6.h')
| -rw-r--r-- | include/linux/ipv6.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index f80c4b3f84a3..0dec5d2ff0c2 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -282,6 +282,17 @@ static inline struct raw6_opt * raw6_sk(const struct sock *__sk) return &((struct raw6_sock *)__sk)->raw6; } +static inline void inet_sk_copy_descendant(struct sock *sk_to, + const struct sock *sk_from) +{ + int ancestor_size = sizeof(struct inet_sock); + + if (sk_from->sk_family == PF_INET6) + ancestor_size += sizeof(struct ipv6_pinfo); + + __inet_sk_copy_descendant(sk_to, sk_from, ancestor_size); +} + #define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only) #define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk)) #else |
