Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net/npf PR/53207: David Binderman: Use logical and



details:   https://anonhg.NetBSD.org/src/rev/ad084ee81fb2
branches:  trunk
changeset: 361314:ad084ee81fb2
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Apr 23 15:36:30 2018 +0000

description:
PR/53207: David Binderman: Use logical and

diffstat:

 sys/net/npf/npf_nat.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 60bce005a859 -r ad084ee81fb2 sys/net/npf/npf_nat.c
--- a/sys/net/npf/npf_nat.c     Mon Apr 23 14:53:07 2018 +0000
+++ b/sys/net/npf/npf_nat.c     Mon Apr 23 15:36:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_nat.c,v 1.41 2016/12/26 23:05:06 christos Exp $    */
+/*     $NetBSD: npf_nat.c,v 1.42 2018/04/23 15:36:30 christos Exp $    */
 
 /*-
  * Copyright (c) 2014 Mindaugas Rasiukevicius <rmind at netbsd org>
@@ -72,7 +72,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_nat.c,v 1.41 2016/12/26 23:05:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_nat.c,v 1.42 2018/04/23 15:36:30 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -890,7 +890,7 @@
        prop_dictionary_get_uint16(natdict, "tport", &nt->nt_tport);
 
        /* Take a specific port from port-map. */
-       if ((np->n_flags & NPF_NAT_PORTMAP) != 0 && nt->nt_tport &
+       if ((np->n_flags & NPF_NAT_PORTMAP) != 0 && nt->nt_tport &&
            !npf_nat_takeport(np, nt->nt_tport)) {
                pool_cache_put(nat_cache, nt);
                return NULL;



Home | Main Index | Thread Index | Old Index