Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 2015 23:03:54 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286862 - head/sys/netpfil/pf
Message-ID:  <201508172303.t7HN3sxC083934@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: loos
Date: Mon Aug 17 23:03:54 2015
New Revision: 286862
URL: https://svnweb.freebsd.org/changeset/base/286862

Log:
  Fix the copy of addresses passed from userland in table replace command.
  
  The size2 is the maximum userland buffer size (used when the addresses are
  copied back to userland).
  
  Obtained from:	pfSense
  MFC after:	3 days
  Sponsored by:	Rubicon Communications (Netgate)

Modified:
  head/sys/netpfil/pf/pf_ioctl.c

Modified: head/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- head/sys/netpfil/pf/pf_ioctl.c	Mon Aug 17 21:07:21 2015	(r286861)
+++ head/sys/netpfil/pf/pf_ioctl.c	Mon Aug 17 23:03:54 2015	(r286862)
@@ -2724,8 +2724,7 @@ DIOCCHANGEADDR_error:
 			error = ENODEV;
 			break;
 		}
-		totlen = (io->pfrio_size + io->pfrio_size2) *
-		    sizeof(struct pfr_addr);
+		totlen = io->pfrio_size * sizeof(struct pfr_addr);
 		pfras = malloc(totlen, M_TEMP, M_WAITOK);
 		error = copyin(io->pfrio_buffer, pfras, totlen);
 		if (error) {



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