Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2017 11:11:53 +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: r324593 - head/sys/netpfil/ipfw
Message-ID:  <201710131111.v9DBBsPl051270@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Fri Oct 13 11:11:53 2017
New Revision: 324593
URL: https://svnweb.freebsd.org/changeset/base/324593

Log:
  Fix regression in handling O_FORWARD_IP opcode after r279948.
  
  To properly handle 'fwd tablearg,port' opcode, copy sin_port value from
  sockaddr_in structure stored in the opcode into corresponding hopstore
  field.
  
  PR:		222953
  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	Fri Oct 13 11:01:33 2017	(r324592)
+++ head/sys/netpfil/ipfw/ip_fw2.c	Fri Oct 13 11:11:53 2017	(r324593)
@@ -2442,6 +2442,7 @@ do {								\
 						sa6->sin6_len = sizeof(*sa6);
 						sa6->sin6_addr = TARG_VAL(
 						    chain, tablearg, nh6);
+						sa6->sin6_port = sa->sin_port;
 						/*
 						 * Set sin6_scope_id only for
 						 * link-local unicast addresses.
@@ -2455,6 +2456,8 @@ do {								\
 					} else
 #endif
 					{
+						args->hopstore.sin_port =
+						    sa->sin_port;
 						sa = args->next_hop =
 						    &args->hopstore;
 						sa->sin_family = AF_INET;



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