HomeFreeBSD

nfscl: Fix the NFSv4.0 mount so that it does not crash

Description

nfscl: Fix the NFSv4.0 mount so that it does not crash

Commit efe58855f3ea modifies IN_LOOPBACK() so that it uses a VNET
variable. Without this patch, nfscl_getmyip() uses IN_LOOPBACK()
when the VNET is not set and crashes the system.
nfscl_getmyip() is only called when a NFSv4.0 (not NFSv4.1/4.2)
mount is done.

This patch re-organizes nfscl_getmyip() so that IN_LOOPBACK()
is before the CURVENT_RESTORE() macro, to avoid the crashes.

Reviewed by: karels, zlei.huang_gmail.com
Differential Revision: https://reviews.freebsd.org/D37008

Details

Provenance
rmacklemAuthored on Oct 15 2022, 3:38 PM
Reviewer
karels
Differential Revision
D37008: Fix nfscl_getmyip() so that it does not cause a crash post commit efe58855f3ea
Parents
rG43f8c763cdee: if_me: Use dedicated network privilege
Branches
Unknown
Tags
Unknown