summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2015-08-14 18:07:29 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2015-08-14 18:07:29 +0000
commit61fa9a842e56e2065f36b0efbd660ee203b46343 (patch)
tree918476d7c83f53e8c1dd38bdc9c89152f76f8bd8 /sys/netinet/ip_divert.c
parentecbb677c6fcf8d26e8750736fa61bc0b39244b8f (diff)
Replace sockaddr casts with the proper satosin() or satosin6() calls.
From David Hill; OK mpi@
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index f07e6eaaff0..7f834db15fc 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_divert.c,v 1.35 2015/07/15 22:16:42 deraadt Exp $ */
+/* $OpenBSD: ip_divert.c,v 1.36 2015/08/14 18:07:28 bluhm Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -217,7 +217,7 @@ divert_packet(struct mbuf *m, int dir, u_int16_t divert_port)
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
- addr.sin_addr.s_addr = ((struct sockaddr_in *)
+ addr.sin_addr.s_addr = satosin(
ifa->ifa_addr)->sin_addr.s_addr;
break;
}