Skip to content

Commit a3bc93d

Browse files
author
steve
committed
Add '*' wildcard to 'notify-source'.
And finally, start highlighting all things ERROR in bright red at statement-level, firstly.
1 parent 01c82b3 commit a3bc93d

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

syntax/bind-named.vim

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,9 @@ syn match named_E_SuffixDomain_SC contained /\<[0-9A-Za-z\._\-]{1,1023}[A-Za-z\.
946946
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
947947
" Nesting of PATTERNS
948948
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
949+
hi link namedStmtKeywordUnknown namedHL_Error
950+
syn match namedStmtKeywordUnknown /\<\S\{1,1111}\>/
951+
949952

950953
hi link namedInclude namedHL_Include
951954
syn match namedInclude /\_s*include/
@@ -2881,9 +2884,9 @@ syn keyword namedOS_Boolean_Group contained
28812884
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
28822885
hi link namedOSV_UdpSize namedHL_Option
28832886
syn keyword namedOSV_UdpSize contained
2884-
\ skipwhite skipnl skipempty
28852887
\ edns-udp-size
28862888
\ max-udp-size
2889+
\ skipwhite skipnl skipempty
28872890
\ nextgroup=named_Number_UdpSize
28882891

28892892
" query-source [address]
@@ -5405,6 +5408,10 @@ hi link namedOSVZ_NotifySource_Port namedHL_Option
54055408
syn keyword namedOSVZ_NotifySource_Port contained port skipwhite
54065409
\ nextgroup=namedOSVZ_NotifySource_PortValue
54075410

5411+
hi link namedOSVZ_NotifySource_Wildcard namedHL_Builtin
5412+
syn match namedOSVZ_NotifySource_Wildcard contained "\*" skipwhite
5413+
\ nextgroup=namedOSVZ_NotifySource_Port
5414+
54085415
hi link namedOSVZ_NotifySource_IP4Addr namedHL_Number
54095416
syn match namedOSVZ_NotifySource_IP4Addr contained /\<\%(\%(25[0-5]\|\%(2[0-4]\|1\{0,1}[0-9]\)\{0,1}[0-9]\)\.\)\{3,3}\%(25[0-5]\|\%(2[0-4]\|1\{0,1}[0-9]\)\{0,1}[0-9]\)/
54105417
\ skipwhite
@@ -5414,11 +5421,13 @@ syn match namedOSVZ_NotifySource_IP4Addr contained /\<\%(\%(25[0-5]\|\%(2[0-4]\|
54145421
\ namedSemicolon
54155422

54165423
hi link namedOSVZ_NotifySource namedHL_Option
5417-
syn keyword namedOSVZ_NotifySource contained skipwhite
5424+
syn keyword namedOSVZ_NotifySource contained
54185425
\ notify-source
5426+
\ skipwhite skipnl skipempty
54195427
\ nextgroup=
54205428
\ namedOSVZ_NotifySource_IP4Addr,
5421-
\ namedOSVZ_NotifySource_Port
5429+
\ namedOSVZ_NotifySource_IP6Addr,
5430+
\ namedOSVZ_NotifySource_Wildcard
54225431

54235432
" notify-source-v6 [address]
54245433
" ( * | <ip6_addr> )
@@ -6046,9 +6055,6 @@ syn match namedStmt_ZoneNameIdentifier contained /\S\+/
60466055
" Top-level statment (formerly clause) keywords
60476056
" 'uncontained' statements are the ones used GLOBALLY
60486057
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
6049-
hi link namedStmtKeywordUnknown namedHL_Error
6050-
syn match namedStmtKeywordUnknown /\<\S\*\>/
6051-
60526058
hi link namedStmtKeyword namedHL_Statement
60536059
syn match namedStmtKeyword /\_^\s*\<acl\>/
60546060
\ skipwhite skipnl skipempty

test/example-9.16-named.conf

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,8 +1026,6 @@ trusted-keys { example.invalid 3 0 1 12397123987123987123971239879; };
10261026

10271027
view empty { };
10281028

1029-
asdfasddfasddf;
1030-
10311029
view redview {
10321030
/* help */ allow-new-zones yes;
10331031
allow-notify { 1.1.1.1; };
@@ -1193,6 +1191,9 @@ view redview {
11931191
notify explicit;
11941192
notify-source 1.1.1.1 port * dscp 53;
11951193
notify-source-v6 1:: port * dscp 53;
1194+
notify-source * port * dscp 63; // moved to server/options
1195+
notify-source 1.1.1.1 port * dscp 63; // moved to server/options
1196+
notify-source-v6 fe08::1.1.1.1 port * dscp 63; // moved to server/options
11961197
notify-to-soa yes;
11971198
nta-lifetime 53;
11981199
nta-recheck 53;
@@ -1245,7 +1246,7 @@ view redview {
12451246
edns yes;
12461247
edns-version 15;
12471248
keys key_id;
1248-
max-udp-size 15;
1249+
max-udp-size 4096;
12491250
notify-source 1.1.1.1 port * dscp 53;
12501251
notify-source-v6 fe08:1::1.1.1.1 port * dscp 53;
12511252
padding 1490;
@@ -1394,6 +1395,9 @@ zone zone-red {
13941395
multi-master no;
13951396
notify explicit;
13961397
notify-delay 53;
1398+
notify-source * port * dscp 63; // moved to server/options
1399+
notify-source 1.1.1.1 port * dscp 63; // moved to server/options
1400+
notify-source-v6 fe08::1.1.1.1 port * dscp 63; // moved to server/options
13971401
notify-to-soa yes;
13981402
request-expire no;
13991403
request-ixfr no;
@@ -1417,8 +1421,6 @@ zone zone-red {
14171421
use-alt-transfer-source yes;
14181422
zero-no-soa-ttl yes;
14191423
zone-statistics full;
1420-
notify-source { 1.1.1.1 port * dscp 63; }; // moved to server/options
1421-
notify-source-v6 { fe08::1.1.1.1 port * dscp 63; }; // moved to server/options
14221424
};
14231425

14241426
zone "127.In-addr.ARPA" { type master; file "ARPA.In-addr.127"; };
@@ -1477,7 +1479,13 @@ zone "_._._._.0.0.4.0.8.1.6.0.1.0.0.2.IP6.INT" {
14771479
// purposely invalid syntax - begins
14781480
///////////////////////////////////////////////////////////////////////
14791481
// purposely invalid syntax
1482+
1;
1483+
oopsie ;
1484+
a;
1485+
no_such_keyword;
1486+
aasdfasddfasdfasddfsadff;
14801487
acl // this is invalid
1488+
14811489
x acl; // this is invalid
14821490
acl ; // this is invalid
14831491
acl{} // this is invalid

0 commit comments

Comments
 (0)