mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
p9fs: fix lookup of "." for lib9p-based 9P servers
The lib9p implementation takes a strict interpretation of the Twalk RPC call and returns an error for attempts to lookup ".". The workaround is to fake the lookup locally. Reviewed by: Val Packett <val@packett.cool> MFC after: 3 months
This commit is contained in:
parent
5d1fb5a9c9
commit
dac7723907
1 changed files with 6 additions and 0 deletions
|
|
@ -243,6 +243,12 @@ p9fs_lookup(struct vop_lookup_args *ap)
|
|||
if (dnp == NULL)
|
||||
return (ENOENT);
|
||||
|
||||
if (cnp->cn_nameptr[0] == '.' && strlen(cnp->cn_nameptr) == 1) {
|
||||
vref(dvp);
|
||||
*vpp = dvp;
|
||||
return (0);
|
||||
}
|
||||
|
||||
vses = dnp->p9fs_ses;
|
||||
mp = vses->p9fs_mount;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue