#3945 closed bug (fixed)
getaddrinfo() issue
Reported by: | kaliber | Owned by: | anevilyak |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/Network Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #6200 | |
Platform: | All |
Description
Samba daamon (smbd) doesn't work because of broken getaddrinfo(). The function return an error if a hint AI_GETADDRINFO is passed. I've made investigation and realized that AI_MASK in netdb.h is incorrect.
Please look at: http://dev.haiku-os.org/browser/haiku/trunk/src/kits/network/dns/irs/getaddrinfo.c#L336 and http://dev.haiku-os.org/browser/haiku/trunk/headers/posix/netdb.h#L206
In my opinion AI_MASK should be defined as follow:
#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_ADDRCONFIG)
Change History (9)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
First of all it should be AI_ADDRCONFIG instead of AI_GETADDRINFO.
V, search in samba sources for AI_ADDRCONFIG. I can't remember the correct place.
comment:3 by , 15 years ago
One place it can be found is in source3/libsmb/namequery.c, but there are more.
getaddrinfo() in the Haiku source already checks for the presence of AI_ADDRCONFIG, so perhaps adding AI_ADDRCONFIG to the AI_MASK definition is enough for the mentioned samba issue.
BTW, this getaddrinfo spec suggests a few more flags: AI_NUMERICSERV, AI_V4MAPPED and AI_ALL
comment:5 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
Version: | R1/pre-alpha1 → R1/Development |
Can you check with hrev37266?
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
comment:8 by , 14 years ago
Nice - just thinking that some optional packages might be broken now without a recompile?
comment:9 by , 14 years ago
Just for completeness: our libbind comes straight from the latest ISC version. But since I manually updated the headers, I must have missed the changes made to netdb.h - I also completely missed this ticket, sorry!
Do you have a link to the offending line in smbd?