<div dir="ltr"><div dir="ltr"><div dir="ltr">also one example of same IPv6 addresses<br>fe80::1:2:3:4 and fe80::1:02:003:0004</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 23, 2019 at 9:01 PM Juha Heinanen <<a href="mailto:jh@tutpro.com">jh@tutpro.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Daniel-Constantin Mierla writes:<br>
<br>
> Can you try without hard coding the IP address there, but use the value<br>
> from the listen address? That will show if works properly with the<br>
> config based values.<br>
<br>
I tried like this:<br>
<br>
  addr->sin6.sin6_scope_id =<br>
    ipv6_get_netif_scope(sock_info->address_str.s);<br>
<br>
and it failed:<br>
<br>
Apr 23 20:45:12 salmon /usr/bin/sip-proxy[12701]: ERROR: <core> [core/udp_server.c:400]: udp_init(): bind(8, 0x7f88340f6fe4, 28) on FE80:0:0:0:6E29:95FF:FE7D:37E6: Invalid argument<br>
<br>
Then I went and tried all these:<br>
<br>
                addr->sin6.sin6_scope_id =<br>
//                      ipv6_get_netif_scope(sock_info->address_str.s);<br>
//                      ipv6_get_netif_scope("fe80::6e29:95ff:fe7d:37e6");<br>
//                      ipv6_get_netif_scope("fe80:0:0:0:6e29:95ff:fe7d:37e6");<br>
                        ipv6_get_netif_scope("fe80::6e29:95ff:fe7d:37e6");<br>
//                      ipv6_get_netif_scope("FE80::6E29:95FF:FE7D:37E6");<br>
<br>
The only version that worked is the one not commented out.  So the<br>
address needs to be exactly as shown by 'ip addr':<br>
<br>
2: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000<br>
    link/ether 6c:29:95:7d:37:e6 brd ff:ff:ff:ff:ff:ff<br>
    inet <a href="http://192.168.43.98/24" rel="noreferrer" target="_blank">192.168.43.98/24</a> brd 192.168.43.255 scope global wlp1s0<br>
       valid_lft forever preferred_lft forever<br>
    inet6 fe80::6e29:95ff:fe7d:37e6/64 scope link <br>
       valid_lft forever preferred_lft forever<br>
<br>
i.e., same case and omitting of zero fields.<br>
<br>
It would be better to use the name of the interface (in above wlp1s0)<br>
with call if_nametoindex(ifname).  Is the name available?<br>
<br>
-- Juha<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>