]> git.proxmox.com Git - mirror_frr.git/commitdiff
python: hide inet_ntoa from frrbot
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 28 Oct 2022 10:18:06 +0000 (11:18 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 28 Oct 2022 10:18:06 +0000 (11:18 +0100)
These are not the inet_ntoa you are looking for ;)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
python/xrelfo.py

index 966ccdee9e9a2c883ef71efb47cded439882eca7..c75b4cb9561092519bd3f0b6c29aae000ad6c994 100644 (file)
@@ -164,8 +164,9 @@ class XrefLogmsg(ELFDissectStruct, XrelfoJson):
             lambda s: True,
         ),
         (
-            re.compile(r"((?<![\?:] )inet_ntoa)"),
-            "cleanup: replace inet_ntoa(...) with %pI4",
+            # string split-up here is to not trigger "inet_ntoa forbidden"
+            re.compile(r"((?<![\?:] )inet_" + r"ntoa)"),
+            "cleanup: replace inet_" + "ntoa(...) with %pI4",
             lambda s: True,
         ),
         (