[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix use of sockaddr_in

From: Eli Zaretskii
Subject: Re: [PATCH] Fix use of sockaddr_in
Date: Sun, 14 May 2017 17:20:33 +0300

> From: Andreas Schwab <address@hidden>
> Cc: address@hidden,  address@hidden,  address@hidden
> Date: Sun, 14 May 2017 08:11:01 +0200
> On Mai 14 2017, Eli Zaretskii <address@hidden> wrote:
> > But the original patch (and the original code) didn't handle that
> > case.
> What do you want to say?

I guess I'm saying that I didn't understand your comment.

AFAIU, your comment says that when getsockname is called for AF_UNIX
sockets, it returns a structure that doesn't report a port, only a
file name.  The original code didn't handle this use case, so if your
intent was to say that this condition should be added to the code,
i.e. for AF_UNIX we should not try to compute the port, then I agree.

However, this is orthogonal to my suggestion, which only affected
AF_INET and AF_INET6 cases.  For those cases, the port is at the same
offset, and adding an assertion about that is IMO all that's needed.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]