File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,16 @@ impl ExternalConfig {
8080 debug ! ( "Gateway {gwname} is at position {pos} of {}" , group. name( ) ) ;
8181
8282 // Get the community corresponding to the position/ordering of this gateway in the group.
83- // If no community exist for that position, fail. This may happen with large groups.
83+ // If no community exist for that position, we should fail, although we don't now since
84+ // the community table may not be populated.
8485 // To guarantee that we can always tag with a community in the set of |C| communities,
8586 // the size of a group |G| must be no larger than |C|.
86- let community = comtable. get_community ( pos) ?;
87- Ok ( Some ( community. clone ( ) ) )
87+ if let Ok ( community) = comtable. get_community ( pos) {
88+ Ok ( Some ( community. clone ( ) ) )
89+ } else {
90+ warn ! ( "No community found for preference {pos}" ) ;
91+ Ok ( None )
92+ }
8893 }
8994
9095 fn validate_peering_gw_groups ( & mut self ) -> ConfigResult {
You can’t perform that action at this time.
0 commit comments