From 68b4090f3ee1e313ae6beb590608f257687e03f2 Mon Sep 17 00:00:00 2001 From: Runar Borge Date: Fri, 3 Apr 2020 14:53:38 +0200 Subject: vrf: T31: Allow vrf name to look more like interface name Fix the regex to allow vrf instances like "eth0vrf" but not to allow "eth0" --- src/validators/vrf-name | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/validators/vrf-name b/src/validators/vrf-name index b1a2527d8..11c453f4d 100755 --- a/src/validators/vrf-name +++ b/src/validators/vrf-name @@ -33,7 +33,7 @@ if len(argv) == 2: # VRF instances should not be named after regular interface names like bond0, # br10 and so on - this can cause a lot of confusion/trouble pattern = "^(?!(bond|br|dum|eth|lan|eno|ens|enp|enx|gnv|ipoe|l2tp|l2tpeth|" \ - "vtun|ppp|pppoe|peth|tun|vti|vxlan|wg|wlan|wlm)[0-9]+).*$" + "vtun|ppp|pppoe|peth|tun|vti|vxlan|wg|wlan|wlm)\d+(\.\d+(v.+)?)?$).*$" if re.match(pattern, argv[1]): exit(0) -- cgit v1.2.3