public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/10559] New: getaddrinfo() calls unnecessarily connect()
@ 2009-08-25 17:23 miika at iki dot fi
  2009-10-30  4:46 ` [Bug libc/10559] " drepper at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: miika at iki dot fi @ 2009-08-25 17:23 UTC (permalink / raw)
  To: glibc-bugs

Background: I am a developer in hipl.hiit.fi project which develops Linux-based
IPsec key and mobility management daemon for Host Identity Protocol (HIP). The
daemon stores its keys in DNS according to RFC5206 and uses a local DNS proxy to
returns hashes of public keys to application from the DNS. The daemon calls also
getaddrinfo() to resolve identifiers from the DNS when using registration
extensions defined in RFC5204.

The problem: it appears that calling getaddrinfo() also calls connect() with the
given IP address, UDP protocol and port 0. This a problem in the IPsec key
management daemon because it calls also getaddrinfo and this triggers a
Diffie-Hellman based key exchange (which is a costly operation)

Is it really necessary to call connect() in getaddrinfo() or is there some other
way around this? Currently it's not possible to filter requests to trigger key
exchange with UDP port zero in IPsec key managers because Linux XFRM does not
support it.

-- 
           Summary: getaddrinfo() calls unnecessarily connect()
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: miika at iki dot fi
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10559

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libc/10559] getaddrinfo() calls unnecessarily connect()
  2009-08-25 17:23 [Bug libc/10559] New: getaddrinfo() calls unnecessarily connect() miika at iki dot fi
@ 2009-10-30  4:46 ` drepper at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: drepper at redhat dot com @ 2009-10-30  4:46 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2009-10-30 04:46 -------
Yes, the connect calls are  necessary because there is no other way to determine
the source address.  If you don't like this implement something in the kernel to
get the source address in another way.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://sourceware.org/bugzilla/show_bug.cgi?id=10559

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-30  4:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-25 17:23 [Bug libc/10559] New: getaddrinfo() calls unnecessarily connect() miika at iki dot fi
2009-10-30  4:46 ` [Bug libc/10559] " drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).