From: mpi Date: Sun, 25 Oct 2015 13:22:09 +0000 (+0000) Subject: arp_ifinit() is no longer needed. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=82ab6bfd1d45b6e718818eff2e091ec8c3341c80;p=openbsd arp_ifinit() is no longer needed. --- diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c index 9e3d862b9d0..2a766448f66 100644 --- a/sys/arch/macppc/dev/if_bm.c +++ b/sys/arch/macppc/dev/if_bm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bm.c,v 1.35 2015/08/24 16:38:43 mpi Exp $ */ +/* $OpenBSD: if_bm.c,v 1.36 2015/10/25 13:22:09 mpi Exp $ */ /* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */ /*- @@ -740,7 +740,6 @@ int bmac_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct bmac_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -749,16 +748,7 @@ bmac_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - - switch (ifa->ifa_addr->sa_family) { - case AF_INET: - bmac_init(sc); - arp_ifinit(&sc->arpcom, ifa); - break; - default: - bmac_init(sc); - break; - } + bmac_init(sc); break; case SIOCSIFFLAGS: diff --git a/sys/arch/macppc/dev/if_mc.c b/sys/arch/macppc/dev/if_mc.c index 35337042449..8889289f5c5 100644 --- a/sys/arch/macppc/dev/if_mc.c +++ b/sys/arch/macppc/dev/if_mc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mc.c,v 1.22 2015/07/08 07:21:49 mpi Exp $ */ +/* $OpenBSD: if_mc.c,v 1.23 2015/10/25 13:22:09 mpi Exp $ */ /* $NetBSD: if_mc.c,v 1.9.16.1 2006/06/21 14:53:13 yamt Exp $ */ /*- @@ -489,7 +489,6 @@ int mc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct mc_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; int s, err = 0; s = splnet(); @@ -499,8 +498,6 @@ mc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) mc_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/arch/octeon/dev/if_cnmac.c b/sys/arch/octeon/dev/if_cnmac.c index c2403cf0fcb..a94cddb28f4 100644 --- a/sys/arch/octeon/dev/if_cnmac.c +++ b/sys/arch/octeon/dev/if_cnmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnmac.c,v 1.26 2015/10/24 05:35:42 visa Exp $ */ +/* $OpenBSD: if_cnmac.c,v 1.27 2015/10/25 13:22:09 mpi Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -702,7 +702,6 @@ int octeon_eth_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct octeon_eth_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -713,8 +712,6 @@ octeon_eth_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) octeon_eth_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c index 1416c321a80..90629b2400b 100644 --- a/sys/arch/sgi/dev/if_iec.c +++ b/sys/arch/sgi/dev/if_iec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iec.c,v 1.15 2015/09/18 11:15:20 visa Exp $ */ +/* $OpenBSD: if_iec.c,v 1.16 2015/10/25 13:22:09 mpi Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -1016,7 +1016,6 @@ iec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct iec_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; - struct ifaddr *ifa = (struct ifaddr *)data; int s, error = 0; s = splnet(); @@ -1026,8 +1025,6 @@ iec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) iec_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index 1acf49eb7b4..97e64c1afa0 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mec.c,v 1.30 2015/06/24 09:40:53 mpi Exp $ */ +/* $OpenBSD: if_mec.c,v 1.31 2015/10/25 13:22:09 mpi Exp $ */ /* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* @@ -1026,7 +1026,6 @@ mec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct mec_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; - struct ifaddr *ifa = (struct ifaddr *)data; int s, error = 0; s = splnet(); @@ -1036,8 +1035,6 @@ mec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) mec_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/arch/sgi/hpc/if_sq.c b/sys/arch/sgi/hpc/if_sq.c index 26ca048e362..620f52af5b3 100644 --- a/sys/arch/sgi/hpc/if_sq.c +++ b/sys/arch/sgi/hpc/if_sq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sq.c,v 1.17 2015/09/18 20:50:02 miod Exp $ */ +/* $OpenBSD: if_sq.c,v 1.18 2015/10/25 13:22:09 mpi Exp $ */ /* $NetBSD: if_sq.c,v 1.42 2011/07/01 18:53:47 dyoung Exp $ */ /* @@ -591,7 +591,6 @@ int sq_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct sq_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -604,8 +603,6 @@ sq_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) sq_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); break; case SIOCSIFMEDIA: diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c index 0802d0b898f..b8a38341080 100644 --- a/sys/arch/socppc/dev/if_tsec.c +++ b/sys/arch/socppc/dev/if_tsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tsec.c,v 1.37 2015/06/24 09:40:53 mpi Exp $ */ +/* $OpenBSD: if_tsec.c,v 1.38 2015/10/25 13:22:09 mpi Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -557,7 +557,6 @@ int tsec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) { struct tsec_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)addr; struct ifreq *ifr = (struct ifreq *)addr; int error = 0, s; @@ -566,8 +565,6 @@ tsec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c index 1fdd86b11cb..3d47188bbb4 100644 --- a/sys/arch/sparc/dev/be.c +++ b/sys/arch/sparc/dev/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.51 2015/06/24 09:40:53 mpi Exp $ */ +/* $OpenBSD: be.c,v 1.52 2015/10/25 13:22:09 mpi Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -560,7 +560,6 @@ beioctl(ifp, cmd, data) caddr_t data; { struct besoftc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -569,15 +568,7 @@ beioctl(ifp, cmd, data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { - case AF_INET: - beinit(sc); - arp_ifinit(&sc->sc_arpcom, ifa); - break; - default: - beinit(sc); - break; - } + beinit(sc); break; case SIOCSIFFLAGS: diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index f279f69bc4d..fc288ed7d03 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.71 2015/07/08 07:21:49 mpi Exp $ */ +/* $OpenBSD: hme.c,v 1.72 2015/10/25 13:22:09 mpi Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -395,7 +395,6 @@ hmeioctl(ifp, cmd, data) caddr_t data; { struct hme_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -406,8 +405,6 @@ hmeioctl(ifp, cmd, data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) hmeinit(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index 536b6f73a79..a82d796e2c6 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.53 2015/06/24 09:40:53 mpi Exp $ */ +/* $OpenBSD: if_ie.c,v 1.54 2015/10/25 13:22:09 mpi Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -1843,7 +1843,6 @@ ieioctl(ifp, cmd, data) caddr_t data; { struct ie_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; int s, error = 0; s = splnet(); @@ -1851,16 +1850,7 @@ ieioctl(ifp, cmd, data) switch(cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - - switch(ifa->ifa_addr->sa_family) { - case AF_INET: - ieinit(sc); - arp_ifinit(&sc->sc_arpcom, ifa); - break; - default: - ieinit(sc); - break; - } + ieinit(sc); break; case SIOCSIFFLAGS: diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c index 7595fc77df0..d6b110133be 100644 --- a/sys/arch/sparc/dev/qe.c +++ b/sys/arch/sparc/dev/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.41 2015/09/14 11:18:49 stsp Exp $ */ +/* $OpenBSD: qe.c,v 1.42 2015/10/25 13:22:09 mpi Exp $ */ /* * Copyright (c) 1998, 2000 Jason L. Wright. @@ -580,7 +580,6 @@ qeioctl(ifp, cmd, data) caddr_t data; { struct qesoftc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -589,15 +588,7 @@ qeioctl(ifp, cmd, data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { - case AF_INET: - qeinit(sc); - arp_ifinit(&sc->sc_arpcom, ifa); - break; - default: - qeinit(sc); - break; - } + qeinit(sc); break; case SIOCSIFFLAGS: diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c index 5d87b971661..ec19e013526 100644 --- a/sys/arch/sparc64/dev/vnet.c +++ b/sys/arch/sparc64/dev/vnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnet.c,v 1.46 2015/06/24 09:40:53 mpi Exp $ */ +/* $OpenBSD: vnet.c,v 1.47 2015/10/25 13:22:09 mpi Exp $ */ /* * Copyright (c) 2009, 2015 Mark Kettenis * @@ -1243,7 +1243,6 @@ int vnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct vnet_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1252,8 +1251,6 @@ vnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) {