9 netstat in a jail, 12 vs 13

2019-01-31 Thread Sami Halabi
Compile static binary of netstat and copy it to the jail may solve your
problem.
Sami

בתאריך יום ה׳, 31 בינו׳ 2019, 20:09, מאת Christer Edwards <
christer.edwa...@gmail.com>:

> On Thu, Jan 31, 2019 at 9:29 AM Michael W. Lucas <
> mwlu...@michaelwlucas.com>
> wrote:
>
> >
> > 12.0 jail on -current host:
> >
> > root@loghost:~ # sockstat -4
> > sockstat: struct xinpgen size mismatch
> > root@loghost:~ # netstat -na -f inet
> > netstat: kvm not available: /dev/mem: No such file or directory
> > Some tcp sockets may have been deleted.
> > Some udp sockets may have been deleted.
>
>
> I have seen this happen anytime I have run a jail where the version does
> not exactly match the host. sockstat always fails with 'sockstat: struct
> xinpgen size mismatch'
>
> Very interested in a solution / patch / workaround myself.
>
> Christer
> ___
> freebsd-jail@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-jail
> To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"
>
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: netstat in a jail, 12 vs 13

2019-01-31 Thread Christer Edwards
On Thu, Jan 31, 2019 at 9:29 AM Michael W. Lucas 
wrote:

>
> 12.0 jail on -current host:
>
> root@loghost:~ # sockstat -4
> sockstat: struct xinpgen size mismatch
> root@loghost:~ # netstat -na -f inet
> netstat: kvm not available: /dev/mem: No such file or directory
> Some tcp sockets may have been deleted.
> Some udp sockets may have been deleted.


I have seen this happen anytime I have run a jail where the version does
not exactly match the host. sockstat always fails with 'sockstat: struct
xinpgen size mismatch'

Very interested in a solution / patch / workaround myself.

Christer
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


netstat in a jail, 12 vs 13

2019-01-31 Thread Michael W. Lucas


Hi,

I have a jail that I swap between a 12.0 userland and a -current
userland, and I'm looking at network diagnosis tools available to the
jail in both.

-current jail on -current can see its own network.

root@loghost:/var/db/pkg # sockstat -4
USER COMMANDPID   FD PROTO  LOCAL ADDRESS FOREIGN ADDRESS
root sendmail   37707 4  tcp4   127.0.0.1:25  *:*
root sshd   37704 4  tcp4   *:22  *:*
root syslogd37639 6  udp4   *:514 *:*
root@loghost:/var/db/pkg # netstat -na -f inet
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address  Foreign Address(state)
tcp4   0  0 127.0.0.1.25   *.*LISTEN
tcp4   0  0 *.22   *.*LISTEN
udp4   0  0 *.514  *.*


12.0 jail on -current host:

root@loghost:~ # sockstat -4
sockstat: struct xinpgen size mismatch
root@loghost:~ # netstat -na -f inet
netstat: kvm not available: /dev/mem: No such file or directory
Some tcp sockets may have been deleted.
Some udp sockets may have been deleted.


Neither jail has /dev/mem or /dev/kmem access--they have the same
jail.conf entry, I literally move the userland directory. It appears
that -current netstat/sockstat doesn't need /dev/mem?

As a workaround in the non-vnet case, I can use the host's netstat to
view open sockets on a 12.0 jail.

That doesn't work with vnets, though.

Questions:

-Does netstat in -current no longer need /dev/mem, or is something else
going on?

-Is there a way for a jail owner in 12.0 and earlier to view sockets on
their jail?


Thanks,
==ml

-- 
Michael W. Lucashttps://mwl.io/
author of: Absolute OpenBSD, SSH Mastery, git commit murder,
Immortal Clay, PGP & GPG, Absolute FreeBSD, etc, etc, etc...
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: icmp (IPv4) issues with VIMAGE JAILs and IPv6

2019-01-31 Thread O. Hartmann
On Tue, 29 Jan 2019 11:36:37 +0300
"Andrey V. Elsukov"  wrote:

> On 28.01.2019 15:44, O. Hartmann wrote:
> > Stopping all jails, destroying all epairs and bridge0 doesn't change
> > anything. The problems occured when IPv6 came into play on the specific
> > host in question.
> > 
> > Does anyone have any ideas? I'm out of ideas.  
> 
> Hi,
> 
> I think I found the problem, the bug was introduced in r342908.
> Can you try attached patch?
> 

Sorry for responding so late.

Thank you for digging into this problem - and finally having resolved it!
Great. After the patch has been apllied, the system worked as expected.

Thanks a lot.


Regards,
Oliver
___
freebsd-jail@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"