# File lib/chef/provider/route.rb, line 87
    def load_current_resource
      self.is_running = false

      # cidr or quad dot mask
      if @new_resource.netmask
        new_ip = IPAddr.new("#{@new_resource.target}/#{@new_resource.netmask}")
      else
        new_ip = IPAddr.new(@new_resource.target)
      end

      # For linux, we use /proc/net/route file to read proc table info
      if node[:os] == "linux"
        route_file = ::File.open("/proc/net/route", "r")

        # Read all routes
        while (line = route_file.gets)
          # Get all the fields for a route
          iface,destination,gateway,flags,refcnt,use,metric,mask,mtu,window,irtt = line.split

          # Convert hex-encoded values to quad-dotted notation (e.g. 0064A8C0 => 192.168.100.0)
          destination = hex2ip(destination)
          gateway = hex2ip(gateway)
          mask = hex2ip(mask)

          # Skip formatting lines (header, etc)
          next unless destination && gateway && mask
          Chef::Log.debug("#{@new_resource} system has route: dest=#{destination} mask=#{mask} gw=#{gateway}")

          # check if what were trying to configure is already there
          # use an ipaddr object with ip/mask this way we can have
          # a new resource be in cidr format (i don't feel like
          # expanding bitmask by hand.
          #
          running_ip = IPAddr.new("#{destination}/#{mask}")
          Chef::Log.debug("#{@new_resource} new ip: #{new_ip.inspect} running ip: #{running_ip.inspect}")
          self.is_running = true if running_ip == new_ip && gateway == @new_resource.gateway
        end

        route_file.close
      end
    end