From owner-freebsd-bugs Thu Jun 7 10:50:18 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3652337B407 for ; Thu, 7 Jun 2001 10:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f57Ho1i96754; Thu, 7 Jun 2001 10:50:01 -0700 (PDT) (envelope-from gnats) Received: from mail11.disney.com (mail11.disney.com [208.246.35.55]) by hub.freebsd.org (Postfix) with ESMTP id 2BD4437B407 for ; Thu, 7 Jun 2001 10:43:34 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from pain.corp.disney.com (pain.corp.disney.com [153.7.231.100]) by mail11.disney.com (Switch-2.0.1/Switch-2.0.1) with SMTP id f57I67t24962 for ; Thu, 7 Jun 2001 11:06:07 -0700 (PDT) Received: from [172.30.50.86] by pain.corp.disney.com with ESMTP for FreeBSD-gnats-submit@freebsd.org; Thu, 7 Jun 2001 10:42:53 -0700 Received: from plio.fan.fa.disney.com (plio.fan.fa.disney.com [153.7.118.2]) by louie.fa.disney.com (8.9.2/8.9.2) with ESMTP id KAA12052 for ; Thu, 7 Jun 2001 10:42:02 -0700 (PDT) (envelope-from Jim.Pirzyk@fa.disney.com) Received: from snoopy.fan.fa.disney.com (snoopy.fan.fa.disney.com [153.7.117.170]) by plio.fan.fa.disney.com (8.9.2/8.9.2) with ESMTP id KAA14633 for ; Thu, 7 Jun 2001 10:42:01 -0700 (PDT) (envelope-from Jim.Pirzyk@mailhost) Received: (from Jim.Pirzyk@localhost) by snoopy.fan.fa.disney.com (8.11.3/8.11.3) id f57Hg1D18663; Thu, 7 Jun 2001 10:42:01 -0700 (PDT) (envelope-from Jim.Pirzyk) Message-Id: <200106071742.f57Hg1D18663@snoopy.fan.fa.disney.com> Date: Thu, 7 Jun 2001 10:42:01 -0700 (PDT) From: Jim.Pirzyk@disney.com Reply-To: Jim.Pirzyk@disney.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/27939: rlogin uses wrong IP address for remote host. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 27939 >Category: bin >Synopsis: rlogin uses wrong IP address for remote host >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 07 10:50:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jim Pirzk >Release: FreeBSD 4.3-RELEASE i386 >Organization: >Environment: System: FreeBSD snoopy 4.3-RELEASE FreeBSD 4.3-RELEASE #6: Tue May 29 10:01:46 PDT 2001 root@snoopy:/auto/roy/dist/pub/FreeBSD/4.3-RELEASE/sys/compile/UP_WORKSTATION i386 >Description: We have two hosts that are both multi homed. Snoopy and quasar. Snoopy is a FreeBSD 4.3-RELEASE system and quasar is a Sun Solaris 8 system. Snoopy has IPs 172.30.228.110, 153.7.117.170, quasar has 172.30.28.114, 153.7.117.112 /etc/resolv.conf looks like this: search fan.fa.disney.com fas.fa.disney.com fa.disney.com faf.fa.disney.com fap.fa.disney.com dqimages.com sortlist 153.7.112.0/255.255.248.0 172.30.224.0/255.255.248.0 172.30.0.0/255.255.128.0 157.23.0.0 nameserver 172.30.224.2 nameserver 172.30.224.6 nameserver 172.30.50.1 So we want to use the 153.7 subnet to communicate between the two machines (since 153.7 is atm, the 172.30.228 subnet is 100Mb enet and the 172.30.28 subnet is 10Mb enet). Snoopy's routing has this: Jim.Pirzyk@snoopy:~ 72>netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 172.30.231.254 UGSc 3 180 xl0 127.0.0.1 127.0.0.1 UH 5 28634 lo0 153.7.112/21 153.7.117.170 Uc 10 9 fa0 172.30.224/21 link#1 UC 0 0 xl0 => quasar's has this: Jim.Pirzyk@quasar:~ 1>netstat -rnnetstat -rn Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 172.30.28.0 172.30.28.114 U 1 7 hme0 153.7.112.0 153.7.117.112 U 1 22 fa0 224.0.0.0 172.30.28.114 U 1 0 hme0 default 172.30.28.254 UG 1 6 127.0.0.1 127.0.0.1 UH 16 3653 lo0 But when rlogin'g to quasar from snoopy, it uses the 172.30 subnets, ignoring the sortlist in the /etc/resolv.conf file. This is because the DNS server is sending out the 172.30 subnets first, but we have a subnet in common that should be used. Ping does work correctly though and uses the 153.7 subnet: Jim.Pirzyk@snoopy:~ 74>ping quasar PING quasar.fan.fa.disney.com (153.7.117.112): 56 data bytes 64 bytes from 153.7.117.112: icmp_seq=0 ttl=255 time=0.288 ms >How-To-Repeat: have a site similar to above and then do this rsh quasar netstat | grep snoopy # to get port number netstat -n | grep # check to see which subnet is being used. >Fix: use gethostsbyname2 instead of getaddrinfo in rcmd_af. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message