File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -715,7 +715,7 @@ fn rss_config_text<'a>(
715715 rack_network_config. as_ref ( ) . map_or ( "" . into ( ) , |c| {
716716 match c. rack_subnet_address {
717717 Some ( v) => v. to_string ( ) ,
718- None => "" . to_string ( ) ,
718+ None => "(will be chosen randomly) " . to_string ( ) ,
719719 }
720720 . into ( )
721721 } ) ,
Original file line number Diff line number Diff line change @@ -714,6 +714,11 @@ pub fn validate_rack_subnet(
714714 return Err ( "rack number (seventh octet) cannot be 0" . into ( ) ) ;
715715 } ;
716716
717+ // Do not allow addresses more specific than /56
718+ if rack_subnet_address. octets ( ) [ 7 ..] . iter ( ) . any ( |x| * x != 0x00 ) {
719+ return Err ( "rack subnet address is /56, but a more specific prefix was provided" . into ( ) ) ;
720+ } ;
721+
717722 Ipv6Net :: new ( rack_subnet_address, 56 ) . map_err ( |e| e. to_string ( ) )
718723}
719724
You can’t perform that action at this time.
0 commit comments