Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2018 10:25:34 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339357 - head/sys/netpfil/ipfw
Message-ID:  <201810151025.w9FAPYw5067660@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Mon Oct 15 10:25:34 2018
New Revision: 339357
URL: https://svnweb.freebsd.org/changeset/base/339357

Log:
  Add extra parentheses to fix "versrcreach" opcode, (oif != NULL) should
  not be used as condition for ternary operator.
  
  Submitted by:	Tatsuki Makino <tatsuki_makino at hotmail dot com>
  Approved by:	re (kib)
  MFC after:	1 week

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw2.c	Sun Oct 14 18:42:54 2018	(r339356)
+++ head/sys/netpfil/ipfw/ip_fw2.c	Mon Oct 15 10:25:34 2018	(r339357)
@@ -2355,13 +2355,13 @@ do {								\
 
 			case O_VERSRCREACH:
 				/* Outgoing packets automatically pass/match */
-				match = (hlen > 0 && ((oif != NULL) ||
+				match = (hlen > 0 && ((oif != NULL) || (
 #ifdef INET6
 				    is_ipv6 ?
 				        verify_path6(&(args->f_id.src_ip6),
 				            NULL, args->f_id.fib) :
 #endif
-				    verify_path(src_ip, NULL, args->f_id.fib)));
+				    verify_path(src_ip, NULL, args->f_id.fib))));
 				break;
 
 			case O_ANTISPOOF:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810151025.w9FAPYw5067660>