Skip to content

Commit 147f3e7

Browse files
committed
:peer was renamed to :remote_address
1 parent 93f04d7 commit 147f3e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/geoip-dns.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ class GeoIPDNS < Process::Daemon
5858

5959
def startup
6060
RubyDNS.run_server(listen: INTERFACES) do
61-
fallback_resolver_supervisor =
62-
RubyDNS::Resolver.supervise(RubyDNS::System.nameservers)
61+
fallback_resolver_supervisor = RubyDNS::Resolver.supervise(RubyDNS::System.nameservers)
62+
6363
match(//, IN::A) do |transaction|
6464
logger.debug 'In block'
6565

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

0 commit comments

Comments
 (0)