summaryrefslogtreecommitdiff
path: root/regress/sys/net
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-24 07:03:31 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-03-24 07:03:31 +0000
commitb9f16ef5dce3b28d033ff3000681d3ec16321114 (patch)
treec3d82bae078d697e8dd5f3995abfc5f6e9ec64e1 /regress/sys/net
parentc2fcb62dfa6ad77048c2dfb571de0455cbf80a3a (diff)
Remove #ifdef from code shared with the kernel, IPv6 is always enabled
in the tests.
Diffstat (limited to 'regress/sys/net')
-rw-r--r--regress/sys/net/rtable/util.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/regress/sys/net/rtable/util.c b/regress/sys/net/rtable/util.c
index bea48da1fcd..b2dee61fad4 100644
--- a/regress/sys/net/rtable/util.c
+++ b/regress/sys/net/rtable/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.4 2016/03/23 09:55:08 mpi Exp $ */
+/* $OpenBSD: util.c,v 1.5 2016/03/24 07:03:30 mpi Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
@@ -267,9 +267,7 @@ struct sockaddr *
rt_plentosa(sa_family_t af, int plen, struct sockaddr_in6 *sa_mask)
{
struct sockaddr_in *sin = (struct sockaddr_in *)sa_mask;
-#ifdef INET6
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa_mask;
-#endif
assert(plen >= 0 || plen == -1);
@@ -284,13 +282,11 @@ rt_plentosa(sa_family_t af, int plen, struct sockaddr_in6 *sa_mask)
sin->sin_len = sizeof(struct sockaddr_in);
in_prefixlen2mask(&sin->sin_addr, plen);
break;
-#ifdef INET6
case AF_INET6:
sin6->sin6_family = AF_INET6;
sin6->sin6_len = sizeof(struct sockaddr_in6);
in6_prefixlen2mask(&sin6->sin6_addr, plen);
break;
-#endif /* INET6 */
default:
return (NULL);
}