]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r274744.
authorcy <cy@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 28 Nov 2014 20:39:35 +0000 (20:39 +0000)
committercy <cy@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 28 Nov 2014 20:39:35 +0000 (20:39 +0000)
commit0a340df754d6696cd15ac07b6c331d3f06cc42a9
tree5467f15eee25fbf00470384b1c96533614fabb0b
parentd8ae63f3b9c3a3c9b19867e954cdfca3e9663296
MFC r274744.

Set the current vnet inside the ioctl handler for ipfilter.

Without this fix, the vnet was NULL and would crash.
This fix is similar to what was done inside the ioctl handler for PF.

Tested by:
   (1) Boot a kernel with "options VIMAGE" enabled
   (2) Type:

   echo "map lo0 from 10.0.0.0/24 to ! 10.0.0.0/24 -> 127.0.0.1/32" > /etc/ipnat.rules ; service ipnat onerestart

PR: 176992
Differential Revision: https://reviews.freebsd.org/D1191

git-svn-id: svn://svn.freebsd.org/base/stable/10@275213 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/contrib/ipfilter/netinet/ip_fil_freebsd.c