Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#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


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: and

In my opinion AI_MASK should be defined as follow:


Change History (9)

comment:1 by v, 13 years ago

Do you have a link to the offending line in smbd?

comment:2 by kaliber, 13 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 v, 13 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:4 by anevilyak, 12 years ago

Blocking: 6200 added

(In #6200) Didn't see that one, thanks.

comment:5 by anevilyak, 12 years ago

Owner: changed from axeld to anevilyak
Status: newin-progress
Version: R1/pre-alpha1R1/Development

Can you check with hrev37266?

comment:6 by kaliber, 12 years ago

Smbd works now. Thanks!

comment:7 by anevilyak, 12 years ago

Resolution: fixed
Status: in-progressclosed

comment:8 by stippi, 12 years ago

Nice - just thinking that some optional packages might be broken now without a recompile?

comment:9 by axeld, 12 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!

Note: See TracTickets for help on using tickets.