From d349bebd90d420eb80abcabb14d41b32eb7694ff Mon Sep 17 00:00:00 2001
From: David Schmitz <schmitz@lrz.de>
Date: Fri, 19 May 2023 13:41:40 +0000
Subject: [PATCH] fix/checksync: ipv6 support fix

---
 utils/jncdevice.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/utils/jncdevice.py b/utils/jncdevice.py
index ad10a412..571d92de 100644
--- a/utils/jncdevice.py
+++ b/utils/jncdevice.py
@@ -542,6 +542,12 @@ class Route(object):
                 grandChildName_ = Tag_pattern_.match(grandChild_.tag).groups()[-1]
                 grandChildText = grandChild_.text
                 grandChildText = re_.sub(STRING_CLEANUP_PAT, " ", grandChildText).strip()
+                if grandChildText=="" and (grandChildName_=="destination" or grandChildName_=="source"):
+                   for grandgrandChild_ in grandChild_:
+                     grandgrandChildName_ = Tag_pattern_.match(grandgrandChild_.tag).groups()[-1]
+                     if grandgrandChildName_=="prefix":
+                        grandChildText = grandgrandChild_.text
+                        grandChildText = re_.sub(STRING_CLEANUP_PAT, " ", grandChildText).strip()
                 self.match[grandChildName_].append(grandChildText)
         elif nodeName_ == 'then':
             for grandChild_ in child_:
-- 
GitLab