[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: system/1877: Reverse DNS query code in /sbin/rtquery is broken



You wrote:
>> Make sure you are trying to look up subnets that don't lie on an octet
>> boundary.  The code works for /24 subnets, but fails for /25 and /26
>> subnets.
>
>Works perfectly on my /29 boundary too.

Hmm, interesting.  I haven't tried for netmasks other than /24, /25, and /26.
Here's another relevant piece of info:  When I query w/RIPv1, the reverse
lookups are fine:

bogus <7> rtquery -1 comix
comix.cs.colorado.edu (128.138.192.239): RIPv1 404 bytes
  128.138.192.0      metric  3 woz-net.cs.colorado.edu
  128.138.192.64     metric  3 drag-net.cs.colorado.edu
  128.138.192.192    metric  1 csops-net.cs.colorado.edu
  128.138.193.0      metric  2 bcrg-net.cs.colorado.edu
  128.138.199.0      metric  2 db-net.cs.colorado.edu
  128.138.205.0      metric  2 grad-net.cs.colorado.edu
  128.138.236.0      metric  5 admin-net.cs.colorado.edu
  128.138.241.0      metric  2 srl-net.cs.colorado.edu
  128.138.241.64     metric  2 esl-net.cs.colorado.edu
  128.138.242.0      metric  2 capp-net.cs.colorado.edu
  128.138.242.64     metric  2 serl-net.cs.colorado.edu
  128.138.242.128    metric  2 csl-net.cs.colorado.edu
  128.138.242.192    metric  2 fs-net.cs.colorado.edu
  128.138.243.0      metric  2 xs-net.cs.colorado.edu
  128.138.243.64     metric  2 intra-net.cs.colorado.edu
  128.138.243.128    metric  5 servers-net.cs.colorado.edu
  128.138.244.0      metric  2 enterprise-net.cs.colorado.edu
  128.138.244.64     metric  2 as-net.cs.colorado.edu
  204.228.69.0       metric  3 mcbryan-net.cs.colorado.edu
  0.0.0.0            metric  3 default   

Making the same query with RIPv2 shows the problem:

bogus <8> rtquery comix
comix.cs.colorado.edu (128.138.192.239): RIPv2 184 bytes
  128.138.192.192/26 metric  1           
  128.138.193.0/26   metric  2            nhop=cs-gw3-csops.cs.colorado.edu
  128.138.199.0/26   metric  2            nhop=cs-gw3-csops.cs.colorado.edu
  128.138.205.0/26   metric  2            nhop=cs-gw3-csops.cs.colorado.edu
  128.138.241.0/25   metric  2            nhop=cs-gw3-csops.cs.colorado.edu
  128.138.243.0/25   metric  2            nhop=cs-gw3-csops.cs.colorado.edu
  128.138.242.0/24   metric  2 capp-net.cs.colorado.edu nhop=cs-gw3-csops.cs.colorado.edu
  128.138.244.0/25   metric  2            nhop=cs-gw3-csops.cs.colorado.edu
  0.0.0.0            metric  3 default   

Both bogus and comix are OpenBSD systems runinng 2.9
--
Sean McCreary                                                 mccreary@pch.net