--- In milter-greylist@yahoogroups.com, Matthias Scheler <tron@z...>
wrote:
> On Thu, Dec 16, 2004 at 05:16:57AM +0000, Matthias Scheler wrote:
> > > Could you please provide output from "truss -f" for this bug?
> > Better make that "truss -v all -o trussfile -f ...".
>
> Here is the output which Fredrik kindly provided:
>
> 7906/4: so_socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP, "", 1) = 8
> 7906/4: bind(8, 0x000632E8, 16, 3)
Err#126 EADDRNOTAVAIL
> 7906/4: AF_INET name = 151.156.192.100 port = 0
>
> So bind() worked as expected. The question is why errno got overwritten.
> Looking at the code the code in "sync.c" ...
>
> if (bind(sfd, sa, salen) == -1) {
> if (errno != EADDRNOTAVAIL) {
> syslog(LOG_ERR, "local_addr: bind failed: %s\n",
> strerror(errno));
> islocal = -1;
> } else {
> islocal = 0;
> }
> } else {
> islocal = 1;
> }
>
> ... I cannot see why it was overwritten unless this code has been
> interrupted by a signal handler.
Could it be due to lack of some #define that would make errno
thread-safe? Just a wild guess...
BTW, 'syslog(LOG_ERR, "local_addr: bind failed: %m")' is a bit shorter :)
EugeneMessage
Re: milter-greylist 1.6rc1 and Solaris 9 (sparc)
2004-12-16 by egcrosser
Attachments
- No local attachments were found for this message.