From 215c98b0c888bcb6bcb12eec526ff192fc19c6a1 Mon Sep 17 00:00:00 2001 From: mpi Date: Thu, 22 Oct 2015 13:30:29 +0000 Subject: [PATCH] Do not pass an ``ia'' just to dereference ``ia_ifp''. ok claudio@, bluhm@, jsg@ --- sys/netinet/if_ether.c | 4 ++-- sys/netinet/ip_carp.c | 6 +++--- sys/netinet/ip_carp.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 1b834ef2238..237b02769e2 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.172 2015/10/13 10:21:27 mpi Exp $ */ +/* $OpenBSD: if_ether.c,v 1.173 2015/10/22 13:30:29 mpi Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -578,7 +578,7 @@ in_arpinput(struct mbuf *m) (IFF_UP|IFF_RUNNING))) { if (op == ARPOP_REPLY) break; - if (carp_iamatch(ifatoia(ifa), ea->arp_sha, + if (carp_iamatch(ifp, ea->arp_sha, &enaddr, ðer_shost)) break; else diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 206fe7e4b5f..8dd1a3520a1 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.276 2015/10/14 13:59:31 jsg Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.277 2015/10/22 13:30:29 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1355,10 +1355,10 @@ carp_update_lsmask(struct carp_softc *sc) } int -carp_iamatch(struct in_ifaddr *ia, u_char *src, u_int8_t **sha, +carp_iamatch(struct ifnet *ifp, u_char *src, u_int8_t **sha, u_int8_t **ether_shost) { - struct carp_softc *sc = ia->ia_ifp->if_softc; + struct carp_softc *sc = ifp->if_softc; struct carp_vhost_entry *vhe = SRPL_FIRST_LOCKED(&sc->carp_vhosts); KERNEL_ASSERT_LOCKED(); /* touching carp_vhosts */ diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h index b2998786046..9f48f275e61 100644 --- a/sys/netinet/ip_carp.h +++ b/sys/netinet/ip_carp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.h,v 1.34 2015/06/08 13:40:48 mpi Exp $ */ +/* $OpenBSD: ip_carp.h,v 1.35 2015/10/22 13:30:29 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -168,7 +168,7 @@ void carp_proto_input (struct mbuf *, ...); void carp_carpdev_state(void *); void carp_group_demote_adj(struct ifnet *, int, char *); int carp6_proto_input(struct mbuf **, int *, int); -int carp_iamatch(struct in_ifaddr *, u_char *, u_int8_t **, +int carp_iamatch(struct ifnet *, u_char *, u_int8_t **, u_int8_t **); int carp_iamatch6(struct ifnet *, u_char *, struct sockaddr_dl **); struct ifnet *carp_ourether(void *, u_int8_t *); -- 2.20.1