Help! - DNS seg faults, can't ping non-numeric IPs

From: Matt Newsome <Matt.at.Newsome.dot.com_at_seville.screaming.net>
Date: Thu, 23 Aug 2001 12:29:17 +0100 (BST)

Hi Yusuke,

Thanks for replying so quickly:

> I need more description.

Sure.

> 1. Do you use DHCP/pump?

Not at this stage. Both set to "n"/'n' in /etc/network.opts (see that
file at the end of this message). I'm setting everything up in my
small LAN to start with, where IPs are statically allocated. When I
install it for real in the lab, it'll be in a DHCP LAN.

> 2. If not, what did you wrote in resolv.conf. Please send it as-is
> if possible.

I wrote nothing, but network.opts has:

  DNS_1="194.168.4.100"
  DNS_2="194.168.8.100"

(see full scp'd network.opts and resolv.conf at the end of this
message).

And after the interface comes up, resolv.conf therefore has:

  domain network
  nameserver 194.168.4.100
  nameserver 194.168.8.100

The "domain" field is an arbitrary one; it's a private LAN. It
doesn't seem to make any difference if I take this out or leave it in.

> 3. you say ping fails -- how? host not found or just blocks up?

Worse: segfault:

  # ping foo
  Segmentation fault

Same behaviour for the web browser when it tries to resolve IPs from
names.

> 4. If you can, use tcpdump to see if (and how) the resolver works.
> you may set 'port = 53 and host = [handheld's ip address]' to see
> what's going on.

I can't get the port going, but tcpdump host 192.168.1.30 (all ports
on the iPAQ IP) gives the following (abbreviated) for "ping
192.168.1.5" (working linux box):

  [sev/SU/12:17:38/matt]$ /usr/sbin/tcpdump host 192.168.1.30
  tcpdump: listening on eth0
  12:19:50.147933 arp who-has seville tell 192.168.1.30
  12:19:50.148015 arp reply seville is-at 0:c0:4f:a7:c2:81
  12:19:50.150930 192.168.1.30 > seville: icmp: echo request (DF)
  12:19:50.151017 seville > 192.168.1.30: icmp: echo reply
  ...
  12:19:55.143860 arp who-has 192.168.1.30 tell seville
  12:19:55.146675 arp reply 192.168.1.30 is-at 0:2:2d:7:a3:59
  12:19:55.148106 192.168.1.30 > seville: icmp: echo request (DF)
  12:19:55.148171 seville > 192.168.1.30: icmp: echo reply
  ...
  56 packets received by filter
  0 packets dropped by kernel

By comparison, "ping www.yahoo.co.uk" gives the following tcpdump
output:

  [sev/SU/12:20:15/matt]$ /usr/sbin/tcpdump host 192.168.1.30
  tcpdump: listening on eth0

  0 packets received by filter
  0 packets dropped by kernel

i.e. it's seemingly segfault'ing before even reaching the network.

Interestingly, with nothing in /etc/resolv.conf and no eth0 device in
ifconfig, "ping foo" still segfaults.

> 5. Try the same resolv.conf on another host and see what's happen.

The resolv.conf on my trusty RH6.0 linux box is right now set to:

  search
  nameserver
  nameserver 194.168.4.100
  nameserver 194.168.8.100

and that's what I'm using to send this message, so it definitely
works. I've tried adding the first two options (search and
nameserver) but they made no difference.

Is there some way I can test the integrity of my libraries, etc? I'm
starting to wonder if my install is corrupted in some way (though
everything else works perfectly AFAIK).

Thanks in advance for further advice,

--
Matt Newsome
-- /etc/pcmcia/network.opts -----------------------------------
# Network adapter configuration
#
# The address format is "scheme,socket,instance,hwaddr".
#
# Note: the "network address" here is NOT the same as the IP address.
# See the Networking HOWTO.  In short, the network address is the IP
# address masked by the netmask.
#
case "$ADDRESS" in
*,*,*,*)
    INFO="Sample private network setup"
    # Transceiver selection, for some cards -- see 'man ifport'
    IF_PORT=""
    # Use BOOTP (via /sbin/bootpc, or /sbin/pump)? [y/n]
    BOOTP="n"
    # Use DHCP (via /sbin/dhcpcd, /sbin/dhclient, or /sbin/pump)? [y/n]
    DHCP="n"
    PUMP='n'
    # If you need to explicitly specify a hostname for DHCP requests
    DHCP_HOSTNAME=""
    # Host's IP address, netmask, network address, broadcast address
    IPADDR="192.168.1.30"
    NETMASK="255.255.255.0"
    NETWORK="192.168.1.0"
    BROADCAST="192.168.1.255"
    # Gateway address for static routing
    GATEWAY="192.168.1.5"
    # Things to add to /etc/resolv.conf for this interface
    DOMAIN="network"
    SEARCH=""
    DNS_1="194.168.4.100"
    DNS_2="194.168.8.100"
    DNS_3=""
    # NFS mounts, should be listed in /etc/fstab
    MOUNTS=""
    # If you need to override the interface's MTU...
    MTU=""
    # For IPX interfaces, the frame type and network number
    IPX_FRAME=""
    IPX_NETNUM=""
    # Extra stuff to do after setting up the interface
    start_fn () { return; }
    # Extra stuff to do before shutting down the interface
    stop_fn () { return; }
    # Card eject policy options
    NO_CHECK=n
    NO_FUSER=n
    ;;
esac
-- /etc/resolv.conf -----------------------------------
# eth0 begin
domain network
nameserver 194.168.4.100
nameserver 194.168.8.100
# eth0 end
Received on Thu Aug 23 2001 - 04:19:24 EDT

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:12:33 EDT