[Swan-dev] not happy due sockaddr_to_endpoint check
Antony Antony
antony at phenome.org
Fri Mar 6 21:35:50 UTC 2020
On Fri, Mar 06, 2020 at 02:01:39PM -0500, Andrew Cagney wrote:
> Yea,
>
> On Fri, 6 Mar 2020 at 11:47, Antony Antony <antony at phenome.org> wrote:
> >
> > while fixing the bug, left=%eth1, reported in
> > https://lists.libreswan.org/pipermail/swan/2020/003458.html. I ran into a
> > !happy() and core dump. If I remove the following check the fix would work;
> > test case addconn-05
> >
> > sockaddr_to_endpoint
> > - /* XXX: to strict? */
> > - if (sa_len != sizeof(sa->sin)) {
> > - return "wrong length";
> > - }
>
> Many library calls return the size of the sockaddr (IPv4 or 6), but
> here it isn't available.
>
> I cleaned up the calling code so that it used and passed down struct
> ip_info instead of AF. This way .sockaddr_size can be passed in.
Thanks.
> I'm still not sure if the check is too strict though.
More information about the Swan-dev
mailing list