svn commit: r286862 - head/sys/netpfil/pf
Luiz Otavio O Souza
loos at FreeBSD.org
Mon Aug 17 23:03:55 UTC 2015
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) {
More information about the svn-src-head
mailing list