Bug #518

Name resolution from a jail

Added by qhwt+dfly almost 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hello.
ISTR posting a similar report a half year ago, but I'm not sure
if it's related or not... This occurs on -DEVELOPMENT, not on
1.6.1-RELEASE (but I haven't tried 1.6.2 yet).
I just did a `make DESTDIR=/path/to/jail installworld' in advance
to make sure that the jail is up-to-date with the jail host.

Depending the program, the source address of UDP packets from the
DNS query shows up corrupted in netstat -anfinet output:

$ cat /etc/resolv.conf
domain .
nameserver 192.168.2.175

$ w
6:13PM up 2:52, 1 user, load averages: 0.19, 0.25, 0.13
USER TTY FROM LOGIN@ IDLE WHAT
(press control+Z here, as it's stuck on reverse name resolution)
$ netstat -anfinet |fgrep .53
udp4 0 0 64.125.66.215.1119 192.168.2.175.53
~~~~~~~~~~~~~
this address doesn't belong to our network.

$ host 192.168.2.251
251.2.168.192.in-addr.arpa has no PTR record

Same thing happens to sshd, so I need to set `UseDNS no' in sshd_config
or I can't slogin to the jail(but even with this option, sshd tries
a reverse name lookup and fails). So it seems that `host' command is
using a different resolver library from `w' or `sshd' (if it's a library
problem).

The same problem doesn't happen on the jail host.

The jail node is assigned an IP address 192.168.2.251/32 which is an
alias address of the jail host, which has 192.168.2.250/24.

Regards.

jail-fixaddr.diff Magnifier (11.7 KB) corecode, 01/17/2007 03:43 PM

History

#1 Updated by corecode almost 8 years ago

This is a multi-part message in MIME format.
--------------000808030508040705030804
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

I found a stack reference bug and took the chance to clean up the code. =
Please have a look at attached patch. If victor agrees, I'll commit this=
=2E

cheers
simon

--=20
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low =E2=82=AC=E2=82=AC=E2=82=AC NOW!1 +++=
Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \

--------------000808030508040705030804
Content-Type: text/plain;
name="jail-fixaddr.diff"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="jail-fixaddr.diff"

SW5kZXg6IHN5cy9qYWlsLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2hvbWUvZGN2cy9z
cmMvc3lzL3N5cy9qYWlsLmgsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuOQpkaWZmIC11IC1w
IC1yMS45IGphaWwuaAotLS0gc3lzL2phaWwuaAkyOSBEZWMgMjAwNiAxODowMjo1NiAtMDAw
MAkxLjkKKysrIHN5cy9qYWlsLmgJMTcgSmFuIDIwMDcgMTI6NDU6NDcgLTAwMDAKQEAgLTY4
LDggKzY4LDggQEAgTUFMTE9DX0RFQ0xBUkUoTV9QUklTT04pOwogLyogVXNlZCB0byBzdG9y
ZSB0aGUgSVBzIG9mIHRoZSBqYWlsICovCiAKIHN0cnVjdCBqYWlsX2lwX3N0b3JhZ2Ugewot
CVNMSVNUX0VOVFJZKGphaWxfaXBfc3RvcmFnZSkgZW50cmllczsKIAlzdHJ1Y3Qgc29ja2Fk
ZHJfc3RvcmFnZSBpcDsKKwlTTElTVF9FTlRSWShqYWlsX2lwX3N0b3JhZ2UpIGVudHJpZXM7
CiB9OwogCiAvKgpAQCAtODUsMTAgKzg1LDEwIEBAIHN0cnVjdCBwcmlzb24gewogCXN0cnVj
dCBuY2hhbmRsZSBwcl9yb290OwkJCS8qIG5hbWVjYWNoZSBlbnRyeSBvZiByb290ICovCiAJ
Y2hhciAJCXByX2hvc3RbTUFYSE9TVE5BTUVMRU5dOwkvKiBob3N0IG5hbWUgKi8KIAlTTElT
VF9IRUFEKGlwbGlzdCwgamFpbF9pcF9zdG9yYWdlKSBwcl9pcHM7CS8qIGxpc3Qgb2YgSVAg
YWRkcmVzc2VzICovCi0Jc3RydWN0IHNvY2thZGRyX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JuIChFQUREUk5PVEFWQUlMKTsK
IAkJfSBlbHNlIHsKIAkJCSpwbG9jYWxfc2luID0gJmlhLT5pYV9hZGRyOwogCQl9Cg==
--------------000808030508040705030804--

#2 Updated by corecode almost 8 years ago

sorry for the broken MIME. My enigmail from cvs seems to be quite broken. patch attached again.

somebody please commit this if it works.

cheers
simon

#3 Updated by victor almost 8 years ago

The patch looks good to me.

I'll commit it when yonetani reports if it's working for him.

#4 Updated by qhwt+dfly almost 8 years ago

It's working for me! I've seen no problem so far during building packages.

Thanks.

#5 Updated by victor almost 8 years ago

Fix commited.

Also available in: Atom PDF