diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 0d672f4f967f..c209608709d9 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gif.c,v 1.133 2017/11/27 05:02:22 knakahara Exp $ */ +/* $NetBSD: if_gif.c,v 1.134 2017/11/27 05:05:50 knakahara Exp $ */ /* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.133 2017/11/27 05:02:22 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.134 2017/11/27 05:05:50 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -378,8 +378,7 @@ gif_encapcheck(struct mbuf *m, int off, int proto, void *arg) if (sc == NULL) return 0; - if ((sc->gif_if.if_flags & (IFF_UP|IFF_RUNNING)) - != (IFF_UP|IFF_RUNNING)) + if ((sc->gif_if.if_flags & IFF_UP) == 0) return 0; var = gif_getref_variant(sc, &psref); @@ -492,7 +491,7 @@ gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, goto end; } - if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { + if ((ifp->if_flags & IFF_UP) == 0) { m_freem(m); error = ENETDOWN; goto end; diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index f9fd071e92b8..01eb08321c78 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_gif.c,v 1.90 2017/11/27 05:02:22 knakahara Exp $ */ +/* $NetBSD: in_gif.c,v 1.91 2017/11/27 05:05:51 knakahara Exp $ */ /* $KAME: in_gif.c,v 1.66 2001/07/29 04:46:09 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.90 2017/11/27 05:02:22 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.91 2017/11/27 05:05:51 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -216,7 +216,7 @@ in_gif_input(struct mbuf *m, int off, int proto, void *eparg) ip = mtod(m, const struct ip *); gifp = &sc->gif_if; - if ((gifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { + if ((gifp->if_flags & IFF_UP) == 0) { m_freem(m); ip_statinc(IP_STAT_NOGIF); return; diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 34581f0b948d..cc6af43b3508 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -1,4 +1,4 @@ -/* $NetBSD: in6_gif.c,v 1.88 2017/11/27 05:02:22 knakahara Exp $ */ +/* $NetBSD: in6_gif.c,v 1.89 2017/11/27 05:05:51 knakahara Exp $ */ /* $KAME: in6_gif.c,v 1.62 2001/07/29 04:27:25 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.88 2017/11/27 05:02:22 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.89 2017/11/27 05:05:51 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -233,7 +233,7 @@ in6_gif_input(struct mbuf **mp, int *offp, int proto, void *eparg) ip6 = mtod(m, struct ip6_hdr *); gifp = &sc->gif_if; - if ((gifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { + if ((gifp->if_flags & IFF_UP) == 0) { m_freem(m); IP6_STATINC(IP6_STAT_NOGIF); return IPPROTO_DONE;