diff options
author | bluhm <bluhm@openbsd.org> | 2015-08-14 18:07:28 +0000 |
---|---|---|
committer | bluhm <bluhm@openbsd.org> | 2015-08-14 18:07:28 +0000 |
commit | 5dd46ca9e3fb073ecc605eae010de65199942ee5 (patch) | |
tree | 83bf217ad4f1bd07ea8f305f32fb15b1dd63d18e /sys/netinet/ip_ipip.c | |
parent | match myproposal.h order; from brian conway (diff) | |
download | wireguard-openbsd-5dd46ca9e3fb073ecc605eae010de65199942ee5.tar.xz wireguard-openbsd-5dd46ca9e3fb073ecc605eae010de65199942ee5.zip |
Replace sockaddr casts with the proper satosin() or satosin6() calls.
From David Hill; OK mpi@
Diffstat (limited to 'sys/netinet/ip_ipip.c')
-rw-r--r-- | sys/netinet/ip_ipip.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c index 8d42e63e8cc..857e797cab0 100644 --- a/sys/netinet/ip_ipip.c +++ b/sys/netinet/ip_ipip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipip.c,v 1.63 2015/07/16 16:12:15 mpi Exp $ */ +/* $OpenBSD: ip_ipip.c,v 1.64 2015/08/14 18:07:28 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -307,8 +307,7 @@ ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp, int proto) AF_INET) continue; - sin = (struct sockaddr_in *) - ifa->ifa_addr; + sin = satosin(ifa->ifa_addr); if (sin->sin_addr.s_addr == ipo->ip_src.s_addr) { ipipstat.ipips_spoof++; @@ -322,8 +321,7 @@ ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp, int proto) AF_INET6) continue; - sin6 = (struct sockaddr_in6 *) - ifa->ifa_addr; + sin6 = satosin6(ifa->ifa_addr); if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &ip6->ip6_src)) { ipipstat.ipips_spoof++; |