No, the issue is somewhere else.
if hostname is not resolvable but has no bad symbol, dns for my domain records 
is still returning blackhole A record, but ping is not crashing...resolv.conf 
has no domain key.
#ping nomatchinghostPING nomatchinghost.(mypublicdomain).ru (x.x.x.x)...
tcpdump 1242 1/4/0 nomatchinghost.(mypublicdomain).ru. A x.x.x.x

Чтв 16 Окт 2014 16:17:09 +0400, def  написал:
Just tried a trick with no domain in resolv.conf
#ping aa/a.google.com
out > 36248+ A? aa/a.google.com.(mypublicdomain).ru.in > 36248 1/4/0 
aa/a.google.(mypublicdomain).ru. A x.x.x.x (137)
It seems that if there is bad symbol, lookup logic cant catch parts between 
dots properly and still attempting to make lookup in my domain by query 
nameserver...man resolv.confIf no  domain entry is present, the domain is 
determined from thelocal host name returned by gethostname(3) - the domain 
partis taken to be everything after the first dot.
Чтв 16 Окт 2014 16:10:32 +0400, def  написал:
Hi!

Got it!

My initial setup was with resolv.conf with only one nameserver record, hosts is 
default.
So, it was lookup to default local domain, which is my real domain. 

And as hostname "aa/a or bb#b" was not resolved by 'nameserver', 
then query somehow appeared on dns server who keeps my domain records, 
after our dns server answered to me A record with IP x.x.x.x, which is actually 
blackhole IP in our subnet.
out > 31981+ A? aa/a.(publicdomain).ru. (28) (ttl 64, id 3215, len 56)
in > 31981 1/4/0 aa/a.(publicdomain).ru. A x.x.x.x (137) (ttl 63, id 59308, len 
165)

Now, when i set domain .ru to avoid my domain lookup, the things works good,
and ping answers 'unknown domain' as it should
out > 33277+ A? aa/a.ru. (25) (ttl 64, id 41427, len 53)
in  > 33277 NXDomain 0/1/0 (86) (ttl 63, id 59309, len 114)

PS: I said that with 5.4 ping is ok, and it is, because there is no name server 
querying,
tcpdump shows nothing, it seems that gethostbyname() catch such hostnames by 
itself
and return 'unknown host' too. resolv.conf containing only one nameserver, 
hosts is default.

Чтв 16 Окт 2014 15:30:57 +0400, Daniel Dickman  написал:
> On Thu, Oct 16, 2014 at 7:00 AM, Stuart Henderson  wrote:
> > On 2014/10/16 09:47, Eric Faurot wrote:
> >> On Wed, Oct 15, 2014 at 11:31:12PM -0400, Daniel Dickman wrote:
> >> > > ping hostname which has slash in the name causes seg fault
> >> > >
> >> > > # ping a/aa
> >> > > Segmentation fault
> >> > >
> >> > > ping6 seems to be ok reporting no address associated with name
> >> > > 5.4 ping is reporting unknown host - ok
> >> > >
> >> >
> >> > Thanks for reporting. Confirmed on -current i386. ping crashes when
> >> > calling gethostbyname("a/aa"). backtrace below.
> >> >
> >> > I'm cc'ing eric@ if he has any thoughts.
> >> >
> >> > Program received signal SIGSEGV, Segmentation fault.
> >> > strlcpy (dst=0x3c0081ac "", src=0x0, siz=4084) at
> >> > /usr/src/lib/libc/string/strlcpy.c:37
> >> > 37                              if ((*d++ = *s++) == '\0')
> >> > (gdb) bt
> >> > #0  strlcpy (dst=0x3c0081ac "", src=0x0, siz=4084) at
> >> > /usr/src/lib/libc/string/strlcpy.c:37
> >> > #1  0x1c005089 in _fillhostent (h=0x81274000, r=0x3c008180,
> >> > buf=Variable "buf" is not available.
> >> > ) at /usr/src/lib/libc/asr/gethostnamadr.c:73
> >> > #2  0x1c005320 in gethostbyname2 (name=0xcfbd9404 "a/aa", af=2) at
> >> > /usr/src/lib/libc/asr/gethostnamadr.c:125
> >> > #3  0x1c005400 in gethostbyname (name=0xcfbd9404 "a/aa") at
> >> > /usr/src/lib/libc/asr/gethostnamadr.c:142
> >> > #4  0x1c002ea3 in main (argc=Variable "argc" is not available.
> >> > ) at /usr/src/sbin/ping/ping.c:356
> >>
> >> Weird... I can't reproduce it here on i386 on a snapshot from sep25.
> >> And no asr diff was commited in between...
> >> Can you give more info about your setup? /etc/resolv.conf, /etc/hosts
> >>
> >> Eric.
> >>
> >
> > I can't reproduce on -current i386, self-built on Tuesday.
> > I've tried with+without domain/search, single/multiple nameserver
> > entries.
> >
> 
> oh, that's very strange. maybe i messed something up on my end. i'll
> do a clean reinstall to see if i can reproduce. in the meantime here's
> what I have in those files. let me know if you want me to try anything
> else before i reinstall.
> 
> [/etc/resolv.conf]
> # Generated by re0 dhclient
> search home
> nameserver 192.168.1.1
> lookup file bind
> 
> [/etc/hosts]
> 127.0.0.1       localhost
> ::1             localhost

--

--

--

--

Reply via email to