@@ -1078,7 +1078,16 @@ static int thread_extension_bbr_pbbr_start(thread_pbbr_t *this)
1078
1078
this -> pbbr_multicast_address [1 ] = 0x32 ; //Thread specification says p and t bits are 1
1079
1079
this -> pbbr_multicast_address [2 ] = 0x00 ; //Reserved
1080
1080
this -> pbbr_multicast_address [3 ] = 0x40 ; //Prefix length 64 bits
1081
- thread_extension_network_prefix_get (cur -> id , NULL , & this -> pbbr_multicast_address [4 ], NULL );
1081
+ if (!thread_extension_network_prefix_get (cur -> id , NULL , & this -> pbbr_multicast_address [4 ], NULL )) {
1082
+ this -> pbbr_multicast_address [4 ] = 0xfd ;
1083
+ this -> pbbr_multicast_address [5 ] = 0x00 ;
1084
+ this -> pbbr_multicast_address [6 ] = 0x7d ;
1085
+ this -> pbbr_multicast_address [7 ] = 0x03 ;
1086
+ this -> pbbr_multicast_address [8 ] = 0x7d ;
1087
+ this -> pbbr_multicast_address [9 ] = 0x03 ;
1088
+ this -> pbbr_multicast_address [10 ] = 0x7d ;
1089
+ this -> pbbr_multicast_address [11 ] = 0x03 ;
1090
+ }
1082
1091
this -> pbbr_multicast_address [15 ] = 3 ;
1083
1092
1084
1093
tr_info ("pBBR service started (Commercial network)" );
@@ -1141,16 +1150,18 @@ int8_t thread_extension_bbr_init(int8_t interface_id, int8_t backbone_interface_
1141
1150
this -> joiner_router_rloc = 0xffff ;
1142
1151
this -> coap_nmkp_virtual_service_id = -1 ;
1143
1152
this -> br_bb_service_id = -1 ;
1144
- // Default domain prefix for PBBR
1145
- this -> domain_prefix [0 ] = 0xfd ;
1146
- this -> domain_prefix [2 ] = 0x7d ;
1147
- this -> domain_prefix [3 ] = 0x03 ;
1148
- this -> domain_prefix [4 ] = 0x7d ;
1149
- this -> domain_prefix [5 ] = 0x03 ;
1150
- this -> domain_prefix [6 ] = 0x7d ;
1151
- this -> domain_prefix [7 ] = 0x03 ;
1152
-
1153
- thread_extension_network_prefix_get (interface_id , NULL , this -> domain_prefix , NULL );
1153
+ // Default domain prefix for PBBR - will be updated once domain prefix is in network data
1154
+ if (0 != thread_extension_network_prefix_get (interface_id , NULL , this -> domain_prefix , NULL )) {
1155
+ this -> domain_prefix [0 ] = 0xfd ;
1156
+ this -> domain_prefix [1 ] = 0x00 ;
1157
+ this -> domain_prefix [2 ] = 0x7d ;
1158
+ this -> domain_prefix [3 ] = 0x03 ;
1159
+ this -> domain_prefix [4 ] = 0x7d ;
1160
+ this -> domain_prefix [5 ] = 0x03 ;
1161
+ this -> domain_prefix [6 ] = 0x7d ;
1162
+ this -> domain_prefix [7 ] = 0x03 ;
1163
+ }
1164
+
1154
1165
this -> coap_service_id = coap_service_initialize (this -> interface_id , THREAD_MANAGEMENT_PORT , COAP_SERVICE_OPTIONS_NONE , NULL , NULL );
1155
1166
if (this -> coap_service_id < 0 ) {
1156
1167
tr_warn ("Thread border router coap init failed" );
0 commit comments