Module Name:    src
Committed By:   christos
Date:           Mon Apr 23 15:36:30 UTC 2018

Modified Files:
        src/sys/net/npf: npf_nat.c

Log Message:
PR/53207: David Binderman: Use logical and


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/net/npf/npf_nat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/npf/npf_nat.c
diff -u src/sys/net/npf/npf_nat.c:1.41 src/sys/net/npf/npf_nat.c:1.42
--- src/sys/net/npf/npf_nat.c:1.41	Mon Dec 26 18:05:06 2016
+++ src/sys/net/npf/npf_nat.c	Mon Apr 23 11:36:30 2018
@@ -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 @@ npf_nat_import(npf_t *npf, prop_dictiona
 	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;

Reply via email to