Skip to content

Commit

Permalink
Fix network reset script in static IPv6 (#6003)
Browse files Browse the repository at this point in the history
Only exits script when an error occurs when
getting the static IPv6 config info
  • Loading branch information
robhoes authored Sep 18, 2024
2 parents 739cacf + 3d02e45 commit 21620be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python3/bin/xe-reset-networking
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ if __name__ == "__main__":
if options.mode_v6 == 'static':
if options.ipv6 == '':
parser.error("if static IPv6 mode is selected, an IPv6 address needs to be specified")
elif options.ipv6.find('/') == -1:
sys.exit(1)
if options.ipv6.find('/') == -1:
parser.error("Invalid format: IPv6 must be specified with CIDR format: <IPv6>/<prefix>")
sys.exit(1)
sys.exit(1)

# Warn user
if not os.access('/tmp/fist_network_reset_no_warning', os.F_OK):
Expand Down

0 comments on commit 21620be

Please sign in to comment.