@@ -904,9 +904,9 @@ int community_list_set(struct community_list_handler *ch, const char *name,
904
904
}
905
905
906
906
/* Unset community-list */
907
- int community_list_unset (struct community_list_handler * ch , const char * name ,
908
- const char * str , const char * seq , int direct ,
909
- int style )
907
+ void community_list_unset (struct community_list_handler * ch , const char * name ,
908
+ const char * str , const char * seq , int direct ,
909
+ int style )
910
910
{
911
911
struct community_list_master * cm = NULL ;
912
912
struct community_entry * entry = NULL ;
@@ -916,14 +916,14 @@ int community_list_unset(struct community_list_handler *ch, const char *name,
916
916
/* Lookup community list. */
917
917
list = community_list_lookup (ch , name , 0 , COMMUNITY_LIST_MASTER );
918
918
if (list == NULL )
919
- return COMMUNITY_LIST_ERR_CANT_FIND_LIST ;
919
+ return ;
920
920
921
921
cm = community_list_master_lookup (ch , COMMUNITY_LIST_MASTER );
922
922
/* Delete all of entry belongs to this community-list. */
923
923
if (!str ) {
924
924
community_list_delete (cm , list );
925
925
route_map_notify_dependencies (name , RMAP_EVENT_CLIST_DELETED );
926
- return 0 ;
926
+ return ;
927
927
}
928
928
929
929
if (style == COMMUNITY_LIST_STANDARD )
@@ -936,12 +936,10 @@ int community_list_unset(struct community_list_handler *ch, const char *name,
936
936
entry = community_list_entry_lookup (list , str , direct );
937
937
938
938
if (!entry )
939
- return COMMUNITY_LIST_ERR_CANT_FIND_LIST ;
939
+ return ;
940
940
941
941
community_list_entry_delete (cm , list , entry );
942
942
route_map_notify_dependencies (name , RMAP_EVENT_CLIST_DELETED );
943
-
944
- return 0 ;
945
943
}
946
944
947
945
bool lcommunity_list_any_match (struct lcommunity * lcom ,
@@ -1172,9 +1170,9 @@ int lcommunity_list_set(struct community_list_handler *ch, const char *name,
1172
1170
1173
1171
/* Unset community-list. When str is NULL, delete all of
1174
1172
community-list entry belongs to the specified name. */
1175
- int lcommunity_list_unset (struct community_list_handler * ch , const char * name ,
1176
- const char * str , const char * seq , int direct ,
1177
- int style )
1173
+ void lcommunity_list_unset (struct community_list_handler * ch , const char * name ,
1174
+ const char * str , const char * seq , int direct ,
1175
+ int style )
1178
1176
{
1179
1177
struct community_list_master * cm = NULL ;
1180
1178
struct community_entry * entry = NULL ;
@@ -1185,14 +1183,14 @@ int lcommunity_list_unset(struct community_list_handler *ch, const char *name,
1185
1183
/* Lookup community list. */
1186
1184
list = community_list_lookup (ch , name , 0 , LARGE_COMMUNITY_LIST_MASTER );
1187
1185
if (list == NULL )
1188
- return COMMUNITY_LIST_ERR_CANT_FIND_LIST ;
1186
+ return ;
1189
1187
1190
1188
cm = community_list_master_lookup (ch , LARGE_COMMUNITY_LIST_MASTER );
1191
1189
/* Delete all of entry belongs to this community-list. */
1192
1190
if (!str ) {
1193
1191
community_list_delete (cm , list );
1194
1192
route_map_notify_dependencies (name , RMAP_EVENT_LLIST_DELETED );
1195
- return 0 ;
1193
+ return ;
1196
1194
}
1197
1195
1198
1196
if (style == LARGE_COMMUNITY_LIST_STANDARD )
@@ -1201,7 +1199,7 @@ int lcommunity_list_unset(struct community_list_handler *ch, const char *name,
1201
1199
regex = bgp_regcomp (str );
1202
1200
1203
1201
if (!lcom && !regex )
1204
- return COMMUNITY_LIST_ERR_MALFORMED_VAL ;
1202
+ return ;
1205
1203
1206
1204
if (lcom )
1207
1205
entry = community_list_entry_lookup (list , lcom , direct );
@@ -1214,12 +1212,10 @@ int lcommunity_list_unset(struct community_list_handler *ch, const char *name,
1214
1212
bgp_regex_free (regex );
1215
1213
1216
1214
if (!entry )
1217
- return COMMUNITY_LIST_ERR_CANT_FIND_LIST ;
1215
+ return ;
1218
1216
1219
1217
community_list_entry_delete (cm , list , entry );
1220
1218
route_map_notify_dependencies (name , RMAP_EVENT_LLIST_DELETED );
1221
-
1222
- return 0 ;
1223
1219
}
1224
1220
1225
1221
/* Set extcommunity-list. */
@@ -1299,9 +1295,9 @@ int extcommunity_list_set(struct community_list_handler *ch, const char *name,
1299
1295
* When str is NULL, delete all extcommunity-list entries belonging to the
1300
1296
* specified name.
1301
1297
*/
1302
- int extcommunity_list_unset (struct community_list_handler * ch , const char * name ,
1303
- const char * str , const char * seq , int direct ,
1304
- int style )
1298
+ void extcommunity_list_unset (struct community_list_handler * ch ,
1299
+ const char * name , const char * str , const char * seq ,
1300
+ int direct , int style )
1305
1301
{
1306
1302
struct community_list_master * cm = NULL ;
1307
1303
struct community_entry * entry = NULL ;
@@ -1311,14 +1307,14 @@ int extcommunity_list_unset(struct community_list_handler *ch, const char *name,
1311
1307
/* Lookup extcommunity list. */
1312
1308
list = community_list_lookup (ch , name , 0 , EXTCOMMUNITY_LIST_MASTER );
1313
1309
if (list == NULL )
1314
- return COMMUNITY_LIST_ERR_CANT_FIND_LIST ;
1310
+ return ;
1315
1311
1316
1312
cm = community_list_master_lookup (ch , EXTCOMMUNITY_LIST_MASTER );
1317
1313
/* Delete all of entry belongs to this extcommunity-list. */
1318
1314
if (!str ) {
1319
1315
community_list_delete (cm , list );
1320
1316
route_map_notify_dependencies (name , RMAP_EVENT_ECLIST_DELETED );
1321
- return 0 ;
1317
+ return ;
1322
1318
}
1323
1319
1324
1320
if (style == EXTCOMMUNITY_LIST_STANDARD )
@@ -1331,12 +1327,10 @@ int extcommunity_list_unset(struct community_list_handler *ch, const char *name,
1331
1327
entry = community_list_entry_lookup (list , str , direct );
1332
1328
1333
1329
if (!entry )
1334
- return COMMUNITY_LIST_ERR_CANT_FIND_LIST ;
1330
+ return ;
1335
1331
1336
1332
community_list_entry_delete (cm , list , entry );
1337
1333
route_map_notify_dependencies (name , RMAP_EVENT_ECLIST_DELETED );
1338
-
1339
- return 0 ;
1340
1334
}
1341
1335
1342
1336
/* Initializa community-list. Return community-list handler. */
0 commit comments