Hi list, We run Direct Admin in a jailed setup on FreeBSD 7.2 (last supported release for Direct Admin). We have a problem retrieving the correct ip address of the jail which makes Direct Admin misbehave.
I've written a small c program which does an ioctl call to get the ip
address for a given interface which I attached. If I run this on FreeBSD
<7.2 in a jail it will give me the ip address of the master server. On
FreeBSD 7.2> it gives me the ip address of the jail (as Direct Admin
expects).
This is what happens:
fmh236# gcc ioctl.c
fmh236# ./a.out bce0
found ip address 212.61.32.234 on interface bce0
^^^^^^^^^^^^^
fmh236# ifconfig bce0 | grep inet
inet 212.61.32.236 netmask 0xffffffff broadcast 212.61.32.236
^^^^^^^^^^^^^
On FreeBSD 7.2> (test):
mh008# jail /home/via/jail-test test 212.61.33.7 /bin/csh
%./a.out bce0
found ip address 212.61.33.7 on interface bce0
%ifconfig bce0 | grep inet
inet 212.61.33.7 netmask 0xffffffff broadcast 212.61.33.7
Would it be trivial to backport just the changes which changed this
behaviour and if so how can I get a patch for the changes to
7.2-RELEASE?
I've read that under FreeBSD it's better to use getifaddrs(3) but we
can't change the ioctl call.
Kind regards,
--
Axel L.C.M.C. Scheepers
Systems & Network Engineer
[email protected]
Tel +31 40 2393393
Fax +31 40 2393310
Mob +31 6 46382759
Claranet Benelux BV
Science park 5630
5692 EN Son
Nederland
http://www.nl.clara.net
ioctl.c
Description: ioctl.c
pgpIuXon2P96m.pgp
Description: PGP signature
