Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 2021 17:45:36 +0300
From:      =?UTF-8?B?w5Z6a2FuIEtJUklL?= <ozkan.kirik@gmail.com>
To:        Michael Gmelin <freebsd@grem.de>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: jail - vnet bug - ping: UDP connect: No route to host
Message-ID:  <CAAcX-AEuOr6OsxDOPmUVf=6AP-E6zipqzepszvV7Ku1_d033Mw@mail.gmail.com>
In-Reply-To: <20210412143852.2c856a0b@bsd64.grem.de>
References:  <CAAcX-AGd0=Kf-VnwywyHFEM9jUocO%2BZP4LK0XYBijgz-Pd%2BUGg@mail.gmail.com> <20210412125222.16610891@bsd64.grem.de> <CAAcX-AGuzUvjTTgPELUYoYhOsoQSmWevmsM=QZr_LnvOZ3yMgA@mail.gmail.com> <20210412143852.2c856a0b@bsd64.grem.de>

next in thread | previous in thread | raw e-mail | index | archive | help
root@f13:~ # jls -s -j client
devfs_ruleset=3D0 enforce_statfs=3D2 host=3Dnew ip4=3Dinherit ip6=3Dinherit=
 jid=3D2
name=3Dclient osreldate=3D1300139 osrelease=3D13.0-RC5 path=3D/ persist
securelevel=3D-1 sysvmsg=3Ddisable sysvsem=3Ddisable sysvshm=3Ddisable vnet=
=3Dnew
allow.nochflags allow.nomlock allow.nomount allow.mount.nodevfs
allow.mount.noprocfs allow.mount.notmpfs allow.noquotas allow.noraw_sockets
allow.noread_msgbuf allow.reserved_ports allow.set_hostname
allow.nosocket_af allow.suser allow.nosysvipc allow.unprivileged_proc_debug
children.max=3D0 host.domainname=3D"" host.hostid=3D0 host.hostname=3D""
host.hostuuid=3D00000000-0000-0000-0000-000000000000

On Mon, Apr 12, 2021 at 3:39 PM Michael Gmelin <freebsd@grem.de> wrote:

>
>
> On Mon, 12 Apr 2021 15:28:16 +0300
> =C3=96zkan KIRIK <ozkan.kirik@gmail.com> wrote:
>
> > Hello
> >
> > the output is below:
> >
> > root@f13:~ # cat /etc/resolv.conf
> > # Generated by resolvconf
> > nameserver 8.8.8.8
> >
> > The jail uses same resolv.conf with host, because path is /
>
> So you run a jail on top of / ?
>
> Can you share the output of `jls -s -j <jailname>` with us?
>
> -m
>
>
> >
> > root@f13:~ # jls -N
> >  JID             IP Address      Hostname                      Path
> >  client                                                        /
> >
> > root@f13:~ # jexec client ping -6 -c 2 www.google.com
> > ping: UDP connect: No route to host
> >
> > root@f13:~ # jexec client truss ping -6 -c 2 www.google.com
> > mmap(0x0,135168,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) =3D
> > 34362036224 (0x800231000)
> > mprotect(0x80022e000,4096,PROT_READ) =3D 0 (0x0)
> > issetugid() =3D 0 (0x0)
> > sigfastblock(0x1,0x8002304d0) =3D 0 (0x0)
> > open("/etc/libmap.conf",O_RDONLY|O_CLOEXEC,010575650) =3D 3 (0x3)
> > fstat(3,{ mode=3D-rw-r--r-- ,inode=3D4807776,size=3D47,blksize=3D32768 =
}) =3D 0
> > (0x0) read(3,"# $FreeBSD$\nincludedir /usr/loc"...,47) =3D 47 (0x2f)
> > close(3) =3D 0 (0x0)
> >
> open("/usr/local/etc/libmap.d",O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,=
0165)
> > ERR#2 'No such file or directory'
> > open("/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,010014544) =3D 3
> > (0x3) read(3,"Ehnt\^A\0\0\0\M^@\0\0\0G\0\0\0\0"...,128) =3D 128 (0x80)
> > fstat(3,{ mode=3D-r--r--r-- ,inode=3D3446022,size=3D199,blksize=3D32768=
 }) =3D
> > 0 (0x0) pread(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,71,0x80) =3D 71
> > (0x47) close(3) =3D 0 (0x0)
> > open("/lib/libm.so.5",O_RDONLY|O_CLOEXEC|O_VERIFY,032266000) =3D 3 (0x3=
)
> > fstat(3,{ mode=3D-r--r--r-- ,inode=3D4727581,size=3D195816,blksize=3D32=
768 })
> > =3D 0 (0x0)
> > mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D
> > 34362171392 (0x800252000)
> > mmap(0x0,208896,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34362175488
> > (0x800253000)
> >
> mmap(0x800253000,73728,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PRE=
FAULT_READ,3,0x0)
> > =3D 34362175488 (0x800253000)
> >
> mmap(0x800265000,122880,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOC=
ORE|MAP_PREFAULT_READ,3,0x11000)
> > =3D 34362249216 (0x800265000)
> >
> mmap(0x800283000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x2e000)
> > =3D 34362372096 (0x800283000)
> >
> mmap(0x800284000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x2e000)
> > =3D 34362376192 (0x800284000) munmap(0x800252000,4096) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > open("/lib/libmd.so.6",O_RDONLY|O_CLOEXEC|O_VERIFY,014232266000) =3D 3
> > (0x3) fstat(3,{ mode=3D-r--r--r--
> > ,inode=3D4727558,size=3D109536,blksize=3D32768 }) =3D 0 (0x0)
> > mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D
> > 34362171392 (0x800252000)
> > mmap(0x0,122880,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34362384384
> > (0x800286000)
> >
> mmap(0x800286000,32768,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PRE=
FAULT_READ,3,0x0)
> > =3D 34362384384 (0x800286000)
> >
> mmap(0x80028e000,77824,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCO=
RE|MAP_PREFAULT_READ,3,0x7000)
> > =3D 34362417152 (0x80028e000)
> >
> mmap(0x8002a1000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x19000)
> > =3D 34362494976 (0x8002a1000)
> >
> mmap(0x8002a3000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x1a000)
> > =3D 34362503168 (0x8002a3000) munmap(0x800252000,4096) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > open("/lib/libcasper.so.1",O_RDONLY|O_CLOEXEC|O_VERIFY,00) =3D 3 (0x3)
> > fstat(3,{ mode=3D-r--r--r-- ,inode=3D4727576,size=3D23280,blksize=3D327=
68 })
> > =3D 0 (0x0)
> > mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D
> > 34362171392 (0x800252000)
> > mmap(0x0,36864,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34362507264 (0x8002a4000=
)
> >
> mmap(0x8002a4000,12288,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PRE=
FAULT_READ,3,0x0)
> > =3D 34362507264 (0x8002a4000)
> >
> mmap(0x8002a7000,12288,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCO=
RE|MAP_PREFAULT_READ,3,0x2000)
> > =3D 34362519552 (0x8002a7000)
> >
> mmap(0x8002aa000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x4000)
> > =3D 34362531840 (0x8002aa000)
> >
> mmap(0x8002ab000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x4000)
> > =3D 34362535936 (0x8002ab000)
> > munmap(0x800252000,4096) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > open("/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,00) ERR#2 'No
> > such file or directory'
> > open("/usr/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,00) ERR#2
> > 'No such file or directory'
> > open("/usr/lib/compat/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,00)
> > ERR#2 'No such file or directory'
> > open("/usr/local/lib/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,00)
> > ERR#2 'No such file or directory'
> >
> open("/usr/local/lib/compat/pkg/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VER=
IFY,00)
> > ERR#2 'No such file or directory'
> > open("/lib/casper/libcap_dns.so.2",O_RDONLY|O_CLOEXEC|O_VERIFY,00) =3D
> > 3 (0x3) fstat(3,{ mode=3D-r--r--r--
> > ,inode=3D4727640,size=3D17528,blksize=3D32768 }) =3D 0 (0x0)
> > mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D
> > 34362171392 (0x800252000)
> > mmap(0x0,28672,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34362544128 (0x8002ad000=
)
> >
> mmap(0x8002ad000,8192,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREF=
AULT_READ,3,0x0)
> > =3D 34362544128 (0x8002ad000)
> >
> mmap(0x8002af000,12288,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCO=
RE|MAP_PREFAULT_READ,3,0x1000)
> > =3D 34362552320 (0x8002af000)
> >
> mmap(0x8002b2000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x3000)
> > =3D 34362564608 (0x8002b2000)
> >
> mmap(0x8002b3000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x3000)
> > =3D 34362568704 (0x8002b3000)
> > munmap(0x800252000,4096) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > open("/lib/libipsec.so.4",O_RDONLY|O_CLOEXEC|O_VERIFY,00) =3D 3 (0x3)
> > fstat(3,{ mode=3D-r--r--r-- ,inode=3D4727575,size=3D31384,blksize=3D327=
68 })
> > =3D 0 (0x0)
> > mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D
> > 34362171392 (0x800252000)
> > mmap(0x0,45056,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34362572800 (0x8002b4000=
)
> >
> mmap(0x8002b4000,16384,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PRE=
FAULT_READ,3,0x0)
> > =3D 34362572800 (0x8002b4000)
> >
> mmap(0x8002b8000,16384,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCO=
RE|MAP_PREFAULT_READ,3,0x3000)
> > =3D 34362589184 (0x8002b8000)
> >
> mmap(0x8002bc000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x6000)
> > =3D 34362605568 (0x8002bc000)
> >
> mmap(0x8002bd000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x6000)
> > =3D 34362609664 (0x8002bd000)
> > munmap(0x800252000,4096) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > open("/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) =3D 3 (0x3)
> > fstat(3,{ mode=3D-r--r--r-- ,inode=3D4727578,size=3D1981952,blksize=3D3=
2768
> > }) =3D 0 (0x0)
> > mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D
> > 34362171392 (0x800252000)
> > mmap(0x0,4263936,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34362617856
> > (0x8002bf000)
> >
> mmap(0x8002bf000,540672,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PR=
EFAULT_READ,3,0x0)
> > =3D 34362617856 (0x8002bf000)
> >
> mmap(0x800343000,1384448,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NO=
CORE|MAP_PREFAULT_READ,3,0x83000)
> > =3D 34363158528 (0x800343000)
> >
> mmap(0x800495000,40960,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PRE=
FAULT_READ,3,0x1d4000)
> > =3D 34364542976 (0x800495000)
> >
> mmap(0x80049f000,28672,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PRE=
FAULT_READ,3,0x1dd000)
> > =3D 34364583936 (0x80049f000)
> >
> mmap(0x8004a6000,2269184,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_A=
NON,-1,0x0)
> > =3D 34364612608 (0x8004a6000) munmap(0x800252000,4096) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > open("/lib/libnv.so.0",O_RDONLY|O_CLOEXEC|O_VERIFY,00) =3D 3 (0x3)
> > fstat(3,{ mode=3D-r--r--r-- ,inode=3D4727585,size=3D91728,blksize=3D327=
68 })
> > =3D 0 (0x0)
> > mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) =3D
> > 34362171392 (0x800252000)
> > mmap(0x0,102400,PROT_NONE,MAP_GUARD,-1,0x0) =3D 34366881792
> > (0x8006d0000)
> >
> mmap(0x8006d0000,40960,PROT_READ,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PRE=
FAULT_READ,3,0x0)
> > =3D 34366881792 (0x8006d0000)
> >
> mmap(0x8006da000,53248,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCO=
RE|MAP_PREFAULT_READ,3,0x9000)
> > =3D 34366922752 (0x8006da000)
> >
> mmap(0x8006e7000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x15000)
> > =3D 34366976000 (0x8006e7000)
> >
> mmap(0x8006e8000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREF=
AULT_READ,3,0x15000)
> > =3D 34366980096 (0x8006e8000) munmap(0x800252000,4096) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > mprotect(0x800283000,4096,PROT_READ) =3D 0 (0x0)
> > mprotect(0x8002a1000,4096,PROT_READ) =3D 0 (0x0)
> > mprotect(0x8002aa000,4096,PROT_READ) =3D 0 (0x0)
> > mprotect(0x8002b2000,4096,PROT_READ) =3D 0 (0x0)
> > mprotect(0x8002bc000,4096,PROT_READ) =3D 0 (0x0)
> > mprotect(0x800495000,40960,PROT_READ) =3D 0 (0x0)
> > mprotect(0x8006e7000,4096,PROT_READ) =3D 0 (0x0)
> > mprotect(0x800495000,40960,PROT_READ|PROT_WRITE) =3D 0 (0x0)
> > mprotect(0x800495000,40960,PROT_READ) =3D 0 (0x0)
> > readlink("/etc/malloc.conf",0x7fffffffd600,1024) ERR#2 'No such file
> > or directory'
> > issetugid() =3D 0 (0x0)
> > __sysctl("vm.overcommit",2,0x7fffffffbb94,0x7fffffffbb88,0x0,0) =3D 0
> > (0x0)
> >
> mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(21=
),-1,0x0)
> > =3D 34368126976 (0x800800000)
> >
> mmap(0x0,2097152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12=
),-1,0x0)
> > =3D 34370224128 (0x800a00000)
> >
> mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(21=
),-1,0x0)
> > =3D 34372321280 (0x800c00000) mprotect(0x210000,4096,PROT_READ) =3D 0
> > (0x0) socketpair(0x1,0x20000001,0x0,0x7fffffffba98) =3D 0 (0x0)
> > pdfork(0x7fffffffba94,0x0) =3D 1477 (0x5c5)
> > close(4) =3D 0 (0x0)
> > fcntl(3,F_GETFL,) =3D 6 (0x6)
> > fcntl(5,F_GETFL,) =3D 2 (0x2)
> > select(4,0x0,{ 3 },0x0,0x0) =3D 1 (0x1)
> > sendto(3,"l\0\0\0\0\0\0\0\0\0\0B\0\0\0\0\0"...,85,0,NULL,0) =3D 85
> > (0x55) select(4,{ 3 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(3,"l\0\0\^A\0\0\0\0\0\0\0h\0\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(4,{ 3 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(3,"\^F\a\0\b\0\0\0\0\0\0\0\0\0\0\0"...,104,0,NULL,0x0) =3D 104
> > (0x68) select(4,{ 3 },0x0,0x0,0x0) =3D 1 (0x1)
> >
> recvmsg(3,{NULL,0,[{"\0",1}],1,{{level=3DSOL_SOCKET,type=3DSCM_RIGHTS,dat=
a=3D{0x04,0x00,0x00,0x00}}},24,0x40000},0x40000)
> > =3D 1 (0x1)
> > fcntl(4,F_GETFL,) =3D 6 (0x6)
> > close(5) =3D 0 (0x0)
> > close(3) =3D 0 (0x0)
> > select(5,0x0,{ 4 },0x0,0x0) =3D 1 (0x1)
> > sendto(4,"l\0\0\0\0\0\0\0\0\0\0!\0\0\0\0\0"...,52,0,NULL,0) =3D 52
> > (0x34) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"l\0\0\0\0\0\0\0\0\0\0;\0\0\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"\^A\a\0\0\0\0\0\0\0\0\0\0\0\0\0"...,59,0,NULL,0x0) =3D 59
> > (0x3b) select(5,0x0,{ 4 },0x0,0x0) =3D 1 (0x1)
> > sendto(4,"l\0\0\0\0\0\0\0\0\0\0\M-(\0\0\0"...,187,0,NULL,0) =3D 187
> > (0xbb) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"l\0\0\0\0\0\0\0\0\0\0!\0\0\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"\^C\^F\0\b\0\0\0\0\0\0\0\0\0\0\0"...,33,0,NULL,0x0) =3D 33
> > (0x21) select(5,0x0,{ 4 },0x0,0x0) =3D 1 (0x1)
> > sendto(4,"l\0\0\0\0\0\0\0\0\0\0!\0\0\0\0\0"...,52,0,NULL,0) =3D 52
> > (0x34) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"l\0\0\0\0\0\0\0\0\0\0\M-(\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"\^E\a\0z\0\0\0\0\0\0\0\0\0\0\0\0"...,168,0,NULL,0x0) =3D 16=
8
> > (0xa8)
> > select(5,0x0,{ 4 },0x0,0x0) =3D 1 (0x1)
> > sendto(4,"l\0\0\0\0\0\0\0\0\0\0\M-K\0\0\0"...,222,0,NULL,0) =3D 222
> > (0xde) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"l\0\0\0\0\0\0\0\0\0\0!\0\0\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"\^C\^F\0\b\0\0\0\0\0\0\0\0\0\0\0"...,33,0,NULL,0x0) =3D 33
> > (0x21) select(5,0x0,{ 4 },0x0,0x0) =3D 1 (0x1)
> > sendto(4,"l\0\0\0\0\0\0\0\0\0\0\M-}\0\0\0"...,272,0,NULL,0) =3D 272
> > (0x110) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"l\0\0\0\0\0\0\0\0\0\0]\^A\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"\^E\^E\0001\^A\0\0\0\0\0\0\0\0\0"...,349,0,NULL,0x0) =3D 34=
9
> > (0x15d)
> > socket(PF_INET6,SOCK_RAW,IPPROTO_ICMPV6) =3D 3 (0x3)
> > socket(PF_INET6,SOCK_RAW,IPPROTO_ICMPV6) =3D 5 (0x5)
> > getuid() =3D 0 (0x0)
> > seteuid(0x0) =3D 0 (0x0)
> > getuid() =3D 0 (0x0)
> > setuid(0x0) =3D 0 (0x0)
> > getpid() =3D 1476 (0x5c4)
> > mmap(0x0,1112,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) =3D
> > 34362171392 (0x800252000)
> > minherit(0x800252000,1112,INHERIT_ZERO) =3D 0 (0x0)
> > getrandom("m\M^X\^U\M-I\M^XP\M-e^\M-R\^UE"...,40,0) =3D 40 (0x28)
> > setsockopt(3,IPPROTO_IPV6,IPV6_USE_MIN_MTU,0x7fffffffe944,4) =3D 0 (0x0=
)
> > setsockopt(5,IPPROTO_ICMPV6,18,0x7fffffffbad0,32) =3D 0 (0x0)
> > select(5,0x0,{ 4 },0x0,0x0) =3D 1 (0x1)
> > sendto(4,"l\0\0\0\0\0\0\0\0\0\0!\0\0\0\0\0"...,52,0,NULL,0) =3D 52
> > (0x34) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"l\0\0\0\0\0\0\0\0\0\0\M-K\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"\^E\a\0\M^]\0\0\0\0\0\0\0\0\0\0"...,203,0,NULL,0x0) =3D 203
> > (0xcb) select(5,0x0,{ 4 },0x0,0x0) =3D 1 (0x1)
> > sendto(4,"l\0\0\0\0\0\0\0\0\0\0\M-(\0\0\0"...,187,0,NULL,0) =3D 187
> > (0xbb) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"l\0\0\0\0\0\0\0\0\0\0!\0\0\0\0\0"...,19,0,NULL,0x0) =3D 19
> > (0x13) select(5,{ 4 },0x0,0x0,0x0) =3D 1 (0x1)
> > recvfrom(4,"\^C\^F\0\b\0\0\0\0\0\0\0\0\0\0\0"...,33,0,NULL,0x0) =3D 33
> > (0x21) socket(PF_INET6,SOCK_DGRAM,0) =3D 6 (0x6)
> > connect(6,{ AF_INET6 [2a00:1450:4006:802::2004]:10101 },28) ERR#65 'No
> > route to host'
> > ping: write(2,"ping: ",6) =3D 6 (0x6)
> > UDP connectwrite(2,"UDP connect",11) =3D 11 (0xb)
> > : write(2,": ",2) =3D 2 (0x2)
> > fstatat(AT_FDCWD,"/usr/share/nls/C/libc.cat",0x7fffffffb7f0,0x0)
> > ERR#2 'No such file or directory'
> > fstatat(AT_FDCWD,"/usr/share/nls/libc/C",0x7fffffffb7f0,0x0) ERR#2
> > 'No such file or directory'
> > fstatat(AT_FDCWD,"/usr/local/share/nls/C/libc.cat",0x7fffffffb7f0,0x0)
> > ERR#2 'No such file or directory'
> > fstatat(AT_FDCWD,"/usr/local/share/nls/libc/C",0x7fffffffb7f0,0x0)
> > ERR#2 'No such file or directory'
> > No route to host
> > write(2,"No route to host\n",17) =3D 17 (0x11)
> > exit(0x1)
> > process exit, rval =3D 1
> >
> > On Mon, Apr 12, 2021 at 1:53 PM Michael Gmelin <freebsd@grem.de>
> > wrote:
> >
> > >
> > >
> > > On Sun, 11 Apr 2021 07:42:23 +0300
> > > =C3=96zkan KIRIK <ozkan.kirik@gmail.com> wrote:
> > >
> > > > Hello,
> > > >
> > > >
> > > > root@f13:~ # jexec client ping www.google.com
> > > > ping: UDP connect: No route to host
> > > >
> > > > root@f13:~ # jexec client ping -4 -c 2 www.google.com
> > > > PING www.google.com (216.58.212.100): 56 data bytes
> > > > 64 bytes from 216.58.212.100: icmp_seq=3D0 ttl=3D128 time=3D85.487 =
ms
> > > > 64 bytes from 216.58.212.100: icmp_seq=3D1 ttl=3D128 time=3D90.243 =
ms
> > > >
> > > > --- www.google.com ping statistics ---
> > > > 2 packets transmitted, 2 packets received, 0.0% packet loss
> > > > round-trip min/avg/max/stddev =3D 85.487/87.865/90.243/2.378 ms
> > > > root@f13:~ #
> > >
> > > That's interesting - ping6 was merged into ping last year, the basic
> > > logic of deciding which AF to use is here:
> > >
> > > https://cgit.freebsd.org/src/tree/sbin/ping/main.c#n128
> > >
> > > Essentially it does:
> > >
> > > 1. IPv6 disabled? Use IPv4
> > > else
> > > 2. IPv4 disabled? Use IPv6
> > > else
> > > 3. do hostname lookup and decide based on the AF of the first
> > > result.
> > >
> > > As far as I can tell, the result of 3. is not used for the ping
> > > though, but only to decide if ping6 or ping should be done. I
> > > wonder if this is actually a good idea - gut feeling-wise I would
> > > prefer only one lookup to take place when calling ping.
> > >
> > > That said, what happens if you call:
> > >
> > >   jexec client ping -6 -c 2 www.google.com
> > >
> > > I assume that should give you some output (including an IP address),
> > > even though the ping6 itself will fail.
> > >
> > > Also, what is your /etc/resolv.conf inside the jail?
> > >
> > > I suspect that the problem is caused by the gethostbyaddr call in 3.
> > > and is not directly IPv6 related - if I compare the code used by
> > > ping.c and ping6.c (including capsicum support) with what 3. does,
> > > we might have a bigger problem here.
> > >
> > > Best,
> > > Michael
> > >
> > > > _______________________________________________
> > > > freebsd-net@freebsd.org mailing list
> > > > https://lists.freebsd.org/mailman/listinfo/freebsd-net
> > > > To unsubscribe, send any mail to
> > > > "freebsd-net-unsubscribe@freebsd.org"
> > >
> > >
> > >
> > > --
> > > Michael Gmelin
> > >
> > _______________________________________________
> > freebsd-net@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-net
> > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>
>
>
> --
> Michael Gmelin
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAcX-AEuOr6OsxDOPmUVf=6AP-E6zipqzepszvV7Ku1_d033Mw>