From 0574d5859cc252df4fb6efbbc2edee0513849a4a Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Sun, 9 Jun 2002 00:22:25 +0000 Subject: correct getpeername(2). --- sys/netinet6/in6_pcb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index acc6320b627..c3186b48dc7 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_pcb.c,v 1.28 2002/03/14 01:27:12 millert Exp $ */ +/* $OpenBSD: in6_pcb.c,v 1.29 2002/06/09 00:22:24 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -717,6 +717,8 @@ in6_setpeeraddr(inp, nam) sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_port = inp->inp_fport; sin6->sin6_addr = inp->inp_faddr6; + /* KAME hack: recover scopeid */ + (void)in6_recoverscope(sin6, &inp->inp_faddr6, NULL); return 0; } -- cgit v1.2.3