From f97144259335102c3d96b232cbb0af4970120d62 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Mon, 10 Jan 2022 23:24:50 +0100 Subject: validators: T4144: Add error messages to the majority of IP validators --- src/validators/ipv4-prefix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/validators/ipv4-prefix') diff --git a/src/validators/ipv4-prefix b/src/validators/ipv4-prefix index 8ec8a2c45..7e1e0e8dd 100755 --- a/src/validators/ipv4-prefix +++ b/src/validators/ipv4-prefix @@ -1,3 +1,10 @@ #!/bin/sh ipaddrcheck --is-ipv4-net $1 + +if [ $? -gt 0 ]; then + echo "Error: $1 is not a valid IPv4 prefix" + exit 1 +fi + +exit 0 \ No newline at end of file -- cgit v1.2.3