Skip to content
  • David Goulet's avatar
    addr: Safeguard last resolved address index access · 5895aafe
    David Goulet authored
    
    
    The last resolved address cache uses an index that is mapped to an address
    family (AF_INET and AF_INET6).
    
    This commit adds a conversion function from af to index and change the code to
    use that all the time only.
    
    In the process, this commit fixes a bug that the last resolved address
    accessors were using the af value insted of the index.
    
    Spotted by nickm during review
    
    Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
    5895aafe