Commit 672eda8397a3453000e8eac156d349e9c3ad179a

support IPv6 clients

Commit diff

script/git-daemon

 
7979 rescue Exception
8080 end
8181 pid = Process.pid
82 domain, port, name, ip = session.addr
82 ip_family, port, name, ip = session.peeraddr
8383 log(pid, "Connection from #{ip}")
8484
8585 $stdout.reopen(session)
8787 session.close
8888
8989 if repository
90 localization = @geoip.country(ip)
91 repository.cloned_from(ip, localization[3], localization[5])
90 if ip_family == "AF_INET6"
91 repository.cloned_from(ip)
92 else
93 localization = @geoip.country(ip)
94 repository.cloned_from(ip, localization[3], localization[5])
95 end
9296 else
9397 log(pid, "Cannot find repository: #{path}")
9498 end
toggle raw diff