Skip to content

Commit

Permalink
:peer was renamed to :remote_address
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 25, 2017
1 parent 93f04d7 commit 147f3e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/geoip-dns.rb
Expand Up @@ -58,14 +58,14 @@ class GeoIPDNS < Process::Daemon

def startup
RubyDNS.run_server(listen: INTERFACES) do
fallback_resolver_supervisor =
RubyDNS::Resolver.supervise(RubyDNS::System.nameservers)
fallback_resolver_supervisor = RubyDNS::Resolver.supervise(RubyDNS::System.nameservers)

match(//, IN::A) do |transaction|
logger.debug 'In block'

# The IP Address of the peer is stored in the transaction options
# with the key :peer
ip_address = transaction.options[:peer]
# with the key :remote_address
ip_address = transaction.options[:remote_address].ip_address
logger.debug "Looking up geographic information for peer #{ip_address}"
location = GeoIPDNS.ip_to_location(ip_address)

Expand Down

0 comments on commit 147f3e7

Please sign in to comment.