From 62f76486821669cfb9ceafa372dcdc7eb15d4e3c Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Sun, 18 Aug 2002 07:05:00 +0000 Subject: [PATCH] Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoid breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net --- sbin/ifconfig/ifconfig.c | 5 +++-- share/man/man4/netintro.4 | 17 +++++++++-------- share/man/man9/ifnet.9 | 2 +- sys/compat/linux/linux_ioctl.c | 2 +- sys/dev/dc/if_dc.c | 6 +++--- sys/dev/fxp/if_fxp.c | 4 ++-- sys/dev/vx/if_vx.c | 2 +- sys/kern/kern_poll.c | 10 +++++----- sys/net/if.c | 30 +++++++++++++++++++----------- sys/net/if.h | 12 ++---------- sys/net/if_tap.c | 4 ++-- sys/net/if_var.h | 2 +- sys/net/rtsock.c | 4 ++-- sys/netatm/atm_if.c | 2 +- sys/netinet6/in6_var.h | 2 +- sys/nfsclient/bootp_subr.c | 2 +- sys/pci/if_dc.c | 6 +++--- sys/pci/if_rl.c | 6 +++--- sys/pci/if_sis.c | 6 +++--- usr.sbin/mrouted/config.c | 2 +- 20 files changed, 64 insertions(+), 62 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 9f37f9903aed..537378bb3687 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -999,14 +999,15 @@ setifflags(const char *vname, int value, int s, const struct afswtch *afp) exit(1); } strncpy(my_ifr.ifr_name, name, sizeof (my_ifr.ifr_name)); - flags = my_ifr.ifr_flags; + flags = (ifr->ifr_flags & 0xffff) | (my_ifr.ifr_flagshigh << 16); if (value < 0) { value = -value; flags &= ~value; } else flags |= value; - my_ifr.ifr_flags = flags; + my_ifr.ifr_flags = flags & 0xffff; + my_ifr.ifr_flagshigh = flags >> 16; if (ioctl(s, SIOCSIFFLAGS, (caddr_t)&my_ifr) < 0) Perror(vname); } diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4 index 97ba82b427f7..dc869ba47546 100644 --- a/share/man/man4/netintro.4 +++ b/share/man/man4/netintro.4 @@ -197,20 +197,21 @@ struct ifreq { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; - short ifru_flags; + short ifru_flags[2]; int ifru_metric; int ifru_mtu; int ifru_phys; caddr_t ifru_data; } ifr_ifru; -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ +#define ifr_addr ifr_ifru.ifru_addr /* address */ +#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -#define ifr_phys ifr_ifru.ifru_phys /* physical wire */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ +#define ifr_flags ifr_ifru.ifru_flags[0] /* flags (low 16 bits) */ +#define ifr_flagshigh ifr_ifru.ifru_flags[1] /* flags (high 16 bits) */ +#define ifr_metric ifr_ifru.ifru_metric /* metric */ +#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ +#define ifr_phys ifr_ifru.ifru_phys /* physical wire */ +#define ifr_data ifr_ifru.ifru_data /* for use by interface */ }; .Ed .Pp diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 49222e245f78..1697b4a410f8 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -284,7 +284,7 @@ is called, or zero if the timer is disabled. (Set by driver, decremented by generic watchdog code.) .It Va if_flags -.Pq Vt short +.Pq Vt int Flags describing operational parameters of this interface (see below). (Manipulated by both driver and generic code.) .It Va if_capabilities diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 05fc0bddd3b8..d0dbdddf4ba5 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -1981,7 +1981,7 @@ linux_gifflags(struct thread *td, struct ifnet *ifp, struct l_ifreq *ifr) { l_short flags; - flags = ifp->if_flags; + flags = ifp->if_flags & 0xffff; /* these flags have no Linux equivalent */ flags &= ~(IFF_SMART|IFF_OACTIVE|IFF_SIMPLEX| IFF_LINK0|IFF_LINK1|IFF_LINK2); diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 7c553469de4b..d854a446b7a7 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -2483,7 +2483,7 @@ static void dc_rxeof(sc) while(!(sc->dc_ldata->dc_rx_list[i].dc_status & DC_RXSTAT_OWN)) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -2885,7 +2885,7 @@ static void dc_intr(arg) DC_LOCK(sc); ifp = &sc->arpcom.ac_if; #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(dc_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_4(sc, DC_IMR, 0x00000000); @@ -3265,7 +3265,7 @@ static void dc_init(xsc) * the case of polling. Some cards (e.g. fxp) turn interrupts on * after a reset. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_4(sc, DC_IMR, 0x00000000); else #endif diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 3d8ba4cd7387..594d9ac2d667 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -1193,7 +1193,7 @@ fxp_intr(void *xsc) #ifdef DEVICE_POLLING struct ifnet *ifp = &sc->sc_if; - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) return; if (ether_poll_register(fxp_poll, ifp)) { /* disable interrupts */ @@ -1785,7 +1785,7 @@ fxp_init(void *xsc) * ... but only do that if we are not polling. And because (presumably) * the default is interrupts on, we need to disable them explicitly! */ - if ( ifp->if_ipending & IFF_POLLING ) + if ( ifp->if_flags & IFF_POLLING ) CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); else #endif /* DEVICE_POLLING */ diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c index b5ddd7b8ff14..317ee11d4999 100644 --- a/sys/dev/vx/if_vx.c +++ b/sys/dev/vx/if_vx.c @@ -285,7 +285,7 @@ vxsetlink(sc) register struct ifnet *ifp = &sc->arpcom.ac_if; int i, j, k; char *reason, *warning; - static short prev_flags; + static int prev_flags; static char prev_conn = -1; if (prev_conn == -1) { diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c index b3a96bacb8b9..0f3254e97c9f 100644 --- a/sys/kern/kern_poll.c +++ b/sys/kern/kern_poll.c @@ -383,7 +383,7 @@ netisr_poll(void) for (i = 0 ; i < poll_handlers ; i++) { if (pr[i].handler && pr[i].ifp->if_flags & IFF_RUNNING) { - pr[i].ifp->if_ipending &= ~IFF_POLLING; + pr[i].ifp->if_flags &= ~IFF_POLLING; pr[i].handler(pr[i].ifp, POLL_DEREGISTER, 1); } pr[i].handler=NULL; @@ -415,7 +415,7 @@ ether_poll_register(poll_handler_t *h, struct ifnet *ifp) return 0; if ( !(ifp->if_flags & IFF_UP) ) /* must be up */ return 0; - if (ifp->if_ipending & IFF_POLLING) /* already polling */ + if (ifp->if_flags & IFF_POLLING) /* already polling */ return 0; s = splhigh(); @@ -440,7 +440,7 @@ ether_poll_register(poll_handler_t *h, struct ifnet *ifp) pr[poll_handlers].handler = h; pr[poll_handlers].ifp = ifp; poll_handlers++; - ifp->if_ipending |= IFF_POLLING; + ifp->if_flags |= IFF_POLLING; splx(s); if (idlepoll_sleeping) wakeup(&idlepoll_sleeping); @@ -459,14 +459,14 @@ ether_poll_deregister(struct ifnet *ifp) int i; mtx_lock(&Giant); - if ( !ifp || !(ifp->if_ipending & IFF_POLLING) ) { + if ( !ifp || !(ifp->if_flags & IFF_POLLING) ) { mtx_unlock(&Giant); return 0; } for (i = 0 ; i < poll_handlers ; i++) if (pr[i].ifp == ifp) /* found it */ break; - ifp->if_ipending &= ~IFF_POLLING; /* found or not... */ + ifp->if_flags &= ~IFF_POLLING; /* found or not... */ if (i == poll_handlers) { mtx_unlock(&Giant); printf("ether_poll_deregister: ifp not found!!!\n"); diff --git a/sys/net/if.c b/sys/net/if.c index 1dd37ec91b5b..969963de5bff 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1234,6 +1234,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) struct ifreq *ifr; struct ifstat *ifs; int error = 0; + int new_flags; ifr = (struct ifreq *)data; switch (cmd) { @@ -1242,7 +1243,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) break; case SIOCGIFFLAGS: - ifr->ifr_flags = ifp->if_flags; + ifr->ifr_flags = ifp->if_flags & 0xffff; + ifr->ifr_flagshigh = ifp->if_flags >> 16; break; case SIOCGIFCAP: @@ -1272,22 +1274,23 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) error = suser(td); if (error) return (error); - ifr->ifr_prevflags = ifp->if_flags; + new_flags = (ifr->ifr_flags & 0xffff) | + (ifr->ifr_flagshigh << 16); if (ifp->if_flags & IFF_SMART) { /* Smart drivers twiddle their own routes */ } else if (ifp->if_flags & IFF_UP && - (ifr->ifr_flags & IFF_UP) == 0) { + (new_flags & IFF_UP) == 0) { int s = splimp(); if_down(ifp); splx(s); - } else if (ifr->ifr_flags & IFF_UP && + } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { int s = splimp(); if_up(ifp); splx(s); } ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) | - (ifr->ifr_flags &~ IFF_CANTCHANGE); + (new_flags &~ IFF_CANTCHANGE); if (ifp->if_ioctl) (void) (*ifp->if_ioctl)(ifp, cmd, data); getmicrotime(&ifp->if_lastchange); @@ -1438,7 +1441,7 @@ ifioctl(so, cmd, data, td) struct ifnet *ifp; struct ifreq *ifr; int error; - short oif_flags; + int oif_flags; switch (cmd) { case SIOCGIFCONF: @@ -1573,7 +1576,8 @@ ifpromisc(ifp, pswitch) return (0); ifp->if_flags &= ~IFF_PROMISC; } - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; error = (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); if (error == 0) { log(LOG_INFO, "%s%d: promiscuous mode %s\n", @@ -1695,7 +1699,8 @@ if_allmulti(ifp, onswitch) if (onswitch) { if (ifp->if_amcount++ == 0) { ifp->if_flags |= IFF_ALLMULTI; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); } } else { @@ -1704,7 +1709,8 @@ if_allmulti(ifp, onswitch) } else { ifp->if_amcount = 0; ifp->if_flags &= ~IFF_ALLMULTI; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff;; + ifr.ifr_flagshigh = ifp->if_flags >> 16; error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); } } @@ -1919,10 +1925,12 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len) */ if ((ifp->if_flags & IFF_UP) != 0) { ifp->if_flags &= ~IFF_UP; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); ifp->if_flags |= IFF_UP; - ifr.ifr_flags = ifp->if_flags; + ifr.ifr_flags = ifp->if_flags & 0xffff; + ifr.ifr_flagshigh = ifp->if_flags >> 16; (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); #ifdef INET /* diff --git a/sys/net/if.h b/sys/net/if.h index 0074cecce25b..fc95786b7764 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -139,14 +139,6 @@ struct if_data { #define IFF_LINK2 0x4000 /* per link layer defined bit */ #define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */ #define IFF_MULTICAST 0x8000 /* supports multicast */ - -/* - * The following flag(s) ought to go in if_flags, but we cannot change - * struct ifnet because of binary compatibility, so we store them in - * if_ipending, which is not used so far. - * If possible, make sure the value is not conflicting with other - * IFF flags, so we have an easier time when we want to merge them. - */ #define IFF_POLLING 0x10000 /* Interface is in polling mode. */ /* flags set internally only: */ @@ -244,8 +236,8 @@ struct ifreq { #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_flags ifr_ifru.ifru_flags[0] /* flags */ -#define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */ +#define ifr_flags ifr_ifru.ifru_flags[0] /* flags (low 16 bits) */ +#define ifr_flagshigh ifr_ifru.ifru_flags[1] /* flags (high 16 bits) */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ #define ifr_phys ifr_ifru.ifru_phys /* physical wire */ diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index ef0a36d99581..0d466397885e 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -654,7 +654,7 @@ tapioctl(dev, cmd, data, flag, td) struct ifnet *ifp = &tp->tap_if; struct tapinfo *tapp = NULL; int s; - short f; + int f; switch (cmd) { case TAPSIFINFO: @@ -728,7 +728,7 @@ tapioctl(dev, cmd, data, flag, td) break; case VMIO_SIOCSIFFLAGS: /* VMware/VMnet SIOCSIFFLAGS */ - f = *(short *)data; + f = *(int *)data; f &= 0x0fff; f &= ~IFF_CANTCHANGE; f |= IFF_UP; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index f36091b42767..bd9ebfd9f989 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -138,7 +138,7 @@ struct ifnet { u_short if_index; /* numeric abbreviation for this if */ short if_unit; /* sub-unit for lower level driver */ short if_timer; /* time 'til if_watchdog called */ - short if_flags; /* up/down, broadcast, etc. */ + int if_flags; /* up/down, broadcast, etc. */ int if_capabilities; /* interface capabilities */ int if_capenable; /* enabled features */ int if_ipending; /* interrupts pending */ diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index d9c2316095f0..98a042c4a1ed 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -757,7 +757,7 @@ rt_ifmsg(ifp) return; ifm = mtod(m, struct if_msghdr *); ifm->ifm_index = ifp->if_index; - ifm->ifm_flags = (u_short)ifp->if_flags; + ifm->ifm_flags = ifp->if_flags; ifm->ifm_data = ifp->if_data; ifm->ifm_addrs = 0; route_proto.sp_protocol = 0; @@ -958,7 +958,7 @@ sysctl_iflist(af, w) ifm = (struct if_msghdr *)w->w_tmem; ifm->ifm_index = ifp->if_index; - ifm->ifm_flags = (u_short)ifp->if_flags; + ifm->ifm_flags = ifp->if_flags; ifm->ifm_data = ifp->if_data; ifm->ifm_addrs = info.rti_addrs; error = SYSCTL_OUT(w->w_req,(caddr_t)ifm, len); diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c index 7b8a1161b476..fa843b5f158c 100644 --- a/sys/netatm/atm_if.c +++ b/sys/netatm/atm_if.c @@ -1057,7 +1057,7 @@ atm_if_ioctl(ifp, cmd, data) break; case SIOCGIFFLAGS: - *(short *)data = ifp->if_flags; + *(int *)data = ifp->if_flags; break; case SIOCSIFFLAGS: diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 06fff7b24105..fc2242a516a6 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -234,7 +234,7 @@ struct in6_ifreq { union { struct sockaddr_in6 ifru_addr; struct sockaddr_in6 ifru_dstaddr; - short ifru_flags; + int ifru_flags; int ifru_flags6; int ifru_metric; caddr_t ifru_data; diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index 993e0c542a95..a9c504f6bdcb 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -385,7 +385,7 @@ bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa) printf("%s%d flags %x, addr ", ifp->if_name, ifp->if_unit, - (unsigned short) ifp->if_flags); + ifp->if_flags); print_sin_addr((struct sockaddr_in *) ifa->ifa_addr); printf(", broadcast "); print_sin_addr((struct sockaddr_in *) ifa->ifa_dstaddr); diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index 7c553469de4b..d854a446b7a7 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -2483,7 +2483,7 @@ static void dc_rxeof(sc) while(!(sc->dc_ldata->dc_rx_list[i].dc_status & DC_RXSTAT_OWN)) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -2885,7 +2885,7 @@ static void dc_intr(arg) DC_LOCK(sc); ifp = &sc->arpcom.ac_if; #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(dc_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_4(sc, DC_IMR, 0x00000000); @@ -3265,7 +3265,7 @@ static void dc_init(xsc) * the case of polling. Some cards (e.g. fxp) turn interrupts on * after a reset. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_4(sc, DC_IMR, 0x00000000); else #endif diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index e5dc0be35f45..63dc6f8cdd9e 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1187,7 +1187,7 @@ static void rl_rxeof(sc) while((CSR_READ_1(sc, RL_COMMAND) & RL_CMD_EMPTY_RXBUF) == 0) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -1416,7 +1416,7 @@ static void rl_intr(arg) ifp = &sc->arpcom.ac_if; #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(rl_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_2(sc, RL_IMR, 0x0000); @@ -1654,7 +1654,7 @@ static void rl_init(xsc) /* * Disable interrupts if we are polling. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_2(sc, RL_IMR, 0); else /* otherwise ... */ #endif /* DEVICE_POLLING */ diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index d9588666f6a6..977e83fc196e 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1285,7 +1285,7 @@ static void sis_rxeof(sc) while(SIS_OWNDESC(&sc->sis_ldata.sis_rx_list[i])) { #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) { + if (ifp->if_flags & IFF_POLLING) { if (sc->rxcycles <= 0) break; sc->rxcycles--; @@ -1508,7 +1508,7 @@ static void sis_intr(arg) SIS_LOCK(sc); #ifdef DEVICE_POLLING - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) goto done; if (ether_poll_register(sis_poll, ifp)) { /* ok, disable interrupts */ CSR_WRITE_4(sc, SIS_IER, 0); @@ -1810,7 +1810,7 @@ static void sis_init(xsc) * ... only enable interrupts if we are not polling, make sure * they are off otherwise. */ - if (ifp->if_ipending & IFF_POLLING) + if (ifp->if_flags & IFF_POLLING) CSR_WRITE_4(sc, SIS_IER, 0); else #endif /* DEVICE_POLLING */ diff --git a/usr.sbin/mrouted/config.c b/usr.sbin/mrouted/config.c index 5b436e60b813..9ca6f88891e3 100644 --- a/usr.sbin/mrouted/config.c +++ b/usr.sbin/mrouted/config.c @@ -32,7 +32,7 @@ config_vifs_from_kernel() register vifi_t vifi; int n; u_int32 addr, mask, subnet; - short flags; + int flags; int num_ifreq = 32; ifc.ifc_len = num_ifreq * sizeof(struct ifreq);