- Timestamp:
- 11/25/20 10:49:10 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bind-import
r813 r814 108 108 my ($name) = /^([\w\@_.-]+)\s/; 109 109 110 print "$i ($_)\n\t$name";111 110 # foo IN A 1.2.3.4 112 111 # IN A 2.3.4.5 … … 115 114 # foo.zone. IN A 2.3.4.5 116 115 116 # "empty" label records inherit the previous label 117 # RRs start in the first column by definition, so leading whitespace indicates an inherited label 118 if (/^\s+/) { 119 # fatal error. if there is no previous label, we can by definition not set 120 # the current label based on it. this can only happen on the very first 121 # record, following records will *ALWAYS* have a previous label 122 die "bad first record ($_): no previous label\n" if !$prevlabel; 123 $name = $prevlabel; 124 } 125 126 print "$i ($_)\n\t$name"; 117 127 118 128 # magic name! 119 129 $name = $zname if $name eq '@'; 130 131 120 132 121 133 # append zone name to record name if missing AND not dot-terminated; … … 130 142 } 131 143 132 # fatal error. if there is no previous label, we can by definition not set 133 # the current label based on it. this can only happen on the very first 134 # record, following records will *ALWAYS* have a previous label 135 if (/^\s+[A-Z]/) { 136 die "bad first record ($_): no previous label\n" if !$prevlabel; 137 $name = $prevlabel; 138 } 139 140 last if $i > 2; 144 145 last if $i > 5; 141 146 142 147 s/^([\w\@_.-]+)\s+//; 143 148 149 ##fixme: drop curlabel? not sure it's needed 150 $curlabel = $name; 144 151 $prevlabel = $curlabel; 152 ##todo: BIND conflates a repeated label with repeating the TTL too. Matter of opinion whether that's really correct or not. 153 154 145 155 # by convention the optional TTL leads the optional class, but they're apparently swappable. 146 156 my ($ttl) = /^(\d+)?\s/;
Note:
See TracChangeset
for help on using the changeset viewer.