sockstat: don't query jail vnet if system is running without VIMAGE.
Fixes: f1cd4902bf
This commit is contained in:
parent
32723a3ba9
commit
1fec1fa814
@ -1292,6 +1292,10 @@ jail_getvnet(int jid)
|
|||||||
{
|
{
|
||||||
struct iovec jiov[6];
|
struct iovec jiov[6];
|
||||||
int vnet;
|
int vnet;
|
||||||
|
size_t len = sizeof(vnet);
|
||||||
|
|
||||||
|
if (sysctlbyname("kern.features.vimage", &vnet, &len, NULL, 0) != 0)
|
||||||
|
return (0);
|
||||||
|
|
||||||
vnet = -1;
|
vnet = -1;
|
||||||
jiov[0].iov_base = __DECONST(char *, "jid");
|
jiov[0].iov_base = __DECONST(char *, "jid");
|
||||||
|
Loading…
Reference in New Issue
Block a user