[Swan-dev] not happy due sockaddr_to_endpoint check

Andrew Cagney andrew.cagney at gmail.com
Fri Mar 6 19:01:39 UTC 2020


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.

I'm still not sure if the check is too strict though.

> I am not quite sure what this check is. May be Andrew or someone else take
> look complete the fix?
>
> the testrun that shows addconn !happy()
> https://testing.libreswan.org/v3.30-234-gc99cdc6ecb-master/addconn-05/OUTPUT/east.console.diff
>
> I committed the output with those lines temporarily removed.
>
> -antony
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev


More information about the Swan-dev mailing list