diff options
| author | Daniil Baturin <daniil@baturin.org> | 2018-11-13 20:14:24 +0100 |
|---|---|---|
| committer | Daniil Baturin <daniil@baturin.org> | 2018-11-13 20:14:24 +0100 |
| commit | 21c0775c51da1ca3d4ef6506fca82bce5b334c79 (patch) | |
| tree | 5714631020a86cc588f5c7a04dbd81fccb33b71f /src/ipaddrcheck.c | |
| parent | abfa2002ea585abbeda6b0a00abacc578b5d9186 (diff) | |
| download | ipaddrcheck-21c0775c51da1ca3d4ef6506fca82bce5b334c79.tar.gz ipaddrcheck-21c0775c51da1ca3d4ef6506fca82bce5b334c79.zip | |
T816: disallow duplicate double semicolons.
Diffstat (limited to 'src/ipaddrcheck.c')
| -rw-r--r-- | src/ipaddrcheck.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ipaddrcheck.c b/src/ipaddrcheck.c index 5e3243e..1bf889e 100644 --- a/src/ipaddrcheck.c +++ b/src/ipaddrcheck.c @@ -256,6 +256,14 @@ int main(int argc, char* argv[]) } return(EXIT_FAILURE); } + + /* FIXUP: libcidr allows more than one double semicolon, but the RFC does not! */ + if( duplicate_double_semicolons(address_str) ) { + if( verbose ) { + printf("More than one \"::\" is not allowed in IPv6 addresses\n"); + } + return(EXIT_FAILURE); + } /* no else needed, the rest is one big else */ while( (action_count >= 0) && (result == RESULT_SUCCESS) ) |
