Opened 15 years ago

Closed 14 years ago

Last modified 14 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

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 v, 15 years ago

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

comment:2 by kaliber, 14 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, 14 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, 14 years ago

Blocking: 6200 added

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

comment:5 by anevilyak, 14 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, 14 years ago

Smbd works now. Thanks!

comment:7 by anevilyak, 14 years ago

Resolution: fixed
Status: in-progressclosed

comment:8 by stippi, 14 years ago

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

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

Note: See TracTickets for help on using tickets.