@@ -1859,16 +1859,21 @@ static void ws_rpl_prefix_callback(prefix_entry_t *prefix, void *handle, uint8_t
1859
1859
* from a prefix advertised by a parent.
1860
1860
*/
1861
1861
if (prefix -> options & PIO_A ) {
1862
- if (icmpv6_slaac_prefix_update (cur , prefix -> prefix , prefix -> prefix_len , prefix -> lifetime , prefix -> preftime ) != 0 ) {
1863
- ipv6_interface_slaac_handler (cur , prefix -> prefix , prefix -> prefix_len , prefix -> lifetime , prefix -> preftime );
1864
- /*
1865
- * Give SLAAC addresses a different label and low precedence to indicate that
1866
- * they probably shouldn't be used for external traffic. SLAAC use in Wi-SUN is non-standard,
1867
- * and we use it for mesh-local traffic we should prefer any DHCP-assigned addresses
1868
- * for talking to the outside world
1869
- *
1870
- */
1871
- addr_policy_table_add_entry (prefix -> prefix , prefix -> prefix_len , 2 , WS_NON_PREFFRED_LABEL );
1862
+
1863
+ if (parent_link_local ) {
1864
+ if (icmpv6_slaac_prefix_update (cur , prefix -> prefix , prefix -> prefix_len , prefix -> lifetime , prefix -> preftime ) != 0 ) {
1865
+ ipv6_interface_slaac_handler (cur , prefix -> prefix , prefix -> prefix_len , prefix -> lifetime , prefix -> preftime );
1866
+ /*
1867
+ * Give SLAAC addresses a different label and low precedence to indicate that
1868
+ * they probably shouldn't be used for external traffic. SLAAC use in Wi-SUN is non-standard,
1869
+ * and we use it for mesh-local traffic we should prefer any DHCP-assigned addresses
1870
+ * for talking to the outside world
1871
+ *
1872
+ */
1873
+ addr_policy_table_add_entry (prefix -> prefix , prefix -> prefix_len , 2 , WS_NON_PREFFRED_LABEL );
1874
+ }
1875
+ } else {
1876
+ icmpv6_slaac_prefix_update (cur , prefix -> prefix , prefix -> prefix_len , 0 , 0 );
1872
1877
}
1873
1878
} else if (prefix -> prefix_len ) {
1874
1879
// Create new address using DHCP
0 commit comments