HomeFreeBSD

MFC r274744.

Description

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

Details

Provenance
cyAuthored on
Differential Revision
D1191: Eliminate ipfilter crash when VIMAGE is enabled in kernel
Parents
rS275212: MFC r274017, r274088 and r275205:
Branches
Unknown
Tags
Unknown

Event Timeline