File tree 1 file changed +10
-1
lines changed
connectivity/nanostack/sal-stack-nanostack/source/Core
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1570,8 +1570,17 @@ struct protocol_interface_info_entry *socket_interface_determine(const socket_t
1570
1570
}
1571
1571
}
1572
1572
1573
- /* Try a routing table entry for greater-than-realm scope */
1573
+ /* For greater-than-realm scope, use default interface if a default interface ID */
1574
+ /* has been set (e.g. using setsockopt), else try a routing table entry */
1574
1575
if (addr_ipv6_scope (buf -> dst_sa .address , NULL ) > IPV6_SCOPE_REALM_LOCAL ) {
1576
+ if (socket_ptr -> default_interface_id != -1 ) {
1577
+ cur_interface = protocol_stack_interface_info_get_by_id (socket_ptr -> default_interface_id );
1578
+ if (cur_interface ) {
1579
+ return cur_interface ;
1580
+ } else {
1581
+ return NULL ;
1582
+ }
1583
+ }
1575
1584
if (ipv6_buffer_route (buf )) {
1576
1585
return buf -> interface ;
1577
1586
}
You can’t perform that action at this time.
0 commit comments