Add sk_v6_copy_addrs for copying sk_v6_daddr and sk_v6_rcv_saddr, it will be used in the coming patch. Signed-off-by: Wang Weidong <wangweidong1@xxxxxxxxxx> --- include/net/sock.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/net/sock.h b/include/net/sock.h index e3a18ff..9be2b9f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -442,6 +442,12 @@ struct sock { #define SK_CAN_REUSE 1 #define SK_FORCE_REUSE 2 +static inline void sk_v6_copy_addrs(struct sock *newsk, struct sock *oldsk) +{ + newsk->sk_v6_daddr = oldsk->sk_v6_daddr; + newsk->sk_v6_rcv_saddr = oldsk->sk_v6_rcv_saddr; +} + static inline int sk_peek_offset(struct sock *sk, int flags) { if ((flags & MSG_PEEK) && (sk->sk_peek_off >= 0)) -- 1.7.12 -- To unsubscribe from this list: send the line "unsubscribe dccp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html