Subject: Re: CVS commit: src/sys/net (INET6)
To: None <source-changes@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: source-changes
Date: 09/01/2007 05:21:11
David Young <dyoung@netbsd.org> caused:
: Module Name: src
: Committed By: dyoung
: Date: Fri Aug 31 21:02:16 UTC 2007
:
: Modified Files:
: src/sys/net: if.c if.h
:
: Log Message:
: Per discussion in 30 May 2007 on tech-net, add accessors for
: ifreq->ifr_addr, ifreq_getaddr() and ifreq_setaddr().
: cvs rdiff -r1.197 -r1.198 src/sys/net/if.c
: cvs rdiff -r1.124 -r1.125 src/sys/net/if.h
Enclose in #ifdef INET6 please.
Regards,
Geoff
--- sys/net/if.c.org 2007-09-01 15:01:11.000000000 +1000
+++ sys/net/if.c 2007-09-01 15:16:17.000000000 +1000
@@ -1676,9 +1676,12 @@
const uint8_t osockspace = sizeof(ifr->ifr_addr);
const uint8_t sockspace = sizeof(ifr->ifr_ifru.ifru_space);
+#ifdef INET6
if (cmd == SIOCGIFPSRCADDR_IN6 || cmd == SIOCGIFPDSTADDR_IN6)
len = MIN(sizeof(struct sockaddr_in6), sa->sa_len);
- else if ((ncmd = compat_cvtcmd(cmd)) != cmd)
+ else
+#endif
+ if ((ncmd = compat_cvtcmd(cmd)) != cmd)
len = MIN(sockspace, sa->sa_len);
else
len = MIN(osockspace, sa->sa_len);