diff --git a/sys/contrib/pf/net/if_pflog.c b/sys/contrib/pf/net/if_pflog.c index 9047c4fc05a4..1fd6a82d4f1c 100644 --- a/sys/contrib/pf/net/if_pflog.c +++ b/sys/contrib/pf/net/if_pflog.c @@ -271,10 +271,17 @@ pflogioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCAIFADDR: case SIOCSIFDSTADDR: case SIOCSIFFLAGS: +#ifdef __FreeBSD__ if (ifp->if_flags & IFF_UP) ifp->if_drv_flags |= IFF_DRV_RUNNING; else ifp->if_drv_flags &= ~IFF_DRV_RUNNING; +#else + if (ifp->if_flags & IFF_UP) + ifp->if_flags |= IFF_RUNNING; + else + ifp->if_flags &= ~IFF_RUNNING; +#endif break; default: return (EINVAL); diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c index 1df46048ad75..1ebaba9fed27 100644 --- a/sys/contrib/pf/net/if_pfsync.c +++ b/sys/contrib/pf/net/if_pfsync.c @@ -989,10 +989,17 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCAIFADDR: case SIOCSIFDSTADDR: case SIOCSIFFLAGS: +#ifdef __FreeBSD__ if (ifp->if_flags & IFF_UP) ifp->if_drv_flags |= IFF_DRV_RUNNING; else ifp->if_drv_flags &= ~IFF_DRV_RUNNING; +#else + if (ifp->if_flags & IFF_UP) + ifp->if_flags |= IFF_RUNNING; + else + ifp->if_flags &= ~IFF_RUNNING; +#endif break; case SIOCSIFMTU: if (ifr->ifr_mtu < PFSYNC_MINMTU)