hello,

fyi,
if the first line of a file used to feed a table is @list, then
it forces parsing to consider content as a serie of values, not
a serie of key-value.

gilles



December 14, 2023 11:33 PM, "Omar Polo" <o...@omarpolo.com> wrote:

> On 2023/12/14 21:36:44 +0100, Kirill Miazine <k...@krot.org> wrote:
> 
>> [...]
>> cvs checkout took looong time, so I took src.tar.gz from 7.4, applied
>> patch there.
>> 
>> diff worked for static maps, at least. tested on this config:
> 
> thanks for testing the diff
> 
>> [...]
>> 
>> but didn't work with "table helo-names file:/etc/mail/helo-names",
>> however, which contained:
>> 
>> 127.0.0.1 localhost1
>> ::1 localhost2
>> [::1] localhost3
>> ipv6:::1 localhost4
> 
> Unfortunately this is expected, see table_static.c around line 172.
> File tables are split on ":" too so "::1 localhost2" becomes
> "" -> ":1 localhost2"
> 
> It's not clearly documented, but table(5) says
> 
> : A file table can be converted to a Berkeley database using the makemap(8)
> : utility with no syntax change.
> 
> and makemap(8) then specifies
> 
> : The database key and value may optionally be separated by the colon
> : character.
> 
> It sucks, it should be documented in table(5) too at least. (and even
> then, I'm failing to see the value of splitting on : too given that it
> breaks ipv6 addresses.)
> 
> After a closer look I noticed that there might be something wrong with
> my diff, tracing table_static_priv_add() i noticed a weird 'pattern':
> 
> : adding [fe80::fce1:baff:fed3:6e35%tap0] -> (null)
> : adding [[fe80::fce1:baff:fed3:6e35%tap0]] -> (null)
> : adding [ipv6:[fe80::fce1:baff:fed3:6e35%tap0]] -> (null)
> 
> that I'm not sure was present also before, so I'll have to take a closer
> look.

Reply via email to