aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-03-22 08:59:58 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-03-22 09:00:28 +0100
commit58a42f4ece0c73471a8c3ce6a6c87f9f3f08adf1 (patch)
tree83af36aed78d1594acfc1850d08d289fbddaff25
parent6e8c98e43d6f69882a3472416a1c2d08672aa9fa (diff)
ipsec-to-dns: match comment on beginning of line
-rw-r--r--ipsec-to-dns.rsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipsec-to-dns.rsc b/ipsec-to-dns.rsc
index a81a23c..a476e74 100644
--- a/ipsec-to-dns.rsc
+++ b/ipsec-to-dns.rsc
@@ -33,7 +33,7 @@
}
:local PlaceBefore ([ /ip/dns/static/find where (name=$CommentString or (comment=$CommentString and name=-)) type=NXDOMAIN disabled ]->0);
-:foreach DnsRecord in=[ /ip/dns/static/find where comment ~ $CommentPrefix ] do={
+:foreach DnsRecord in=[ /ip/dns/static/find where comment~("^" . $CommentPrefix) ] do={
:local DnsRecordVal [ /ip/dns/static/get $DnsRecord ];
:local PeerId [ $CharacterReplace ($DnsRecordVal->"comment") $CommentPrefix "" ];
:if ([ :len [ /ip/ipsec/active-peers/find where id~("^(CN=)?" . [ $EscapeForRegEx $PeerId ] . "\$") \