summaryrefslogtreecommitdiff
path: root/src/validators/ipv6-eui64-prefix
blob: d7f262633541cdfe70e1443972c6bf3072c268fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

# Validator used to check if given IPv6 prefix is of size /64 required by EUI64

from sys import argv
from sys import exit

if __name__ == '__main__':
    if len(argv) != 2:
        exit(1)

    prefix = argv[1]
    if prefix.split('/')[1] == '64':
        exit(0)

    exit(1)