Commit Graph

17 Commits (master)

Author SHA1 Message Date
cinap_lenrek 1a900513fb libndb: open internal file-descriptors with OCEXEC flag 2020-12-07 15:15:02 +01:00
kvik a92ffdbbfb libndb: remove db file size limit
Removes the 128 kB limit for files making up the database.
We used to skip over and complain about files that exceeded
the limit, forcing the user to generate hash files.

This caused things to inexplicably stop working after a file
hit the hidden limit, which is unreasonable behaviour considering
that libndb happily, albeit slowly, works with bigger files.
2020-12-07 00:36:41 +01:00
cinap_lenrek 9ea93a5fd3 libndb: order subnets by prefix length for ndbipinfo() lookups
to reproduce:

ipnet=foo0 ip=192.168.0.0 ipmask=/16
ipnet=foo1 ip=192.168.0.0 ipmask=/24
ip=192.168.0.1 sys=foo2

% ndb/ipquery sys foo2 ipnet ipmask
ipnet=foo0 ipmask=/16

we would expect to get ipnet=foo1 here as it is more
specific subnet.

the solution is to order the subnets by prefix length
in subnet() before calling filter(), so that we process
the longest prefixes first.
2020-07-17 16:53:20 +02:00
cinap_lenrek 45213ee6c7 ip/ipconfig, ndb/dns, libndb: handle parseipmask() errors 2019-02-12 21:44:57 +01:00
cinap_lenrek a7c01127f9 libndb: provide parseipmask() v4 argument in subnet(), use snprint() instead of sprint() 2019-02-11 23:28:43 +01:00
cinap_lenrek 9d60ece816 libndb: add missing ndbdedup.c 2018-09-16 15:27:17 +02:00
cinap_lenrek a4e444f430 libndb: make ndbipinfo() walk ipnet for all matching entries, concatenate and dedup result 2018-09-16 12:39:47 +02:00
cinap_lenrek 6e284eaad5 ndb/cs: prevent deadlock with ndb/cs by mounting /srv/dns *AFTER* /net
the dnsquery() library function should not start mouting /srv/dns on
its own. this problem arrises only for ndb/cs as it is started before
ndb/dns.

the issue with mounting /srv/dns before /net is when ndb/cs attempts
to read the list of interfaces, accessing /net/ipifc, which triggers
a rpc to ndb/dns as it is ontop of the mount. this can yield a deadlock
when ndb/dns blocks its 9p loop waiting for requests to complete on
a refresh and the requests are stuck waiting for ndb/cs to translate
a dial string for announce().
2018-05-16 21:41:42 +02:00
cinap_lenrek dbfb320566 libndb: cleanup 2018-04-28 04:38:34 +02:00
cinap_lenrek 34f19570b9 libndb: retire deprecated csgetval(), ndbgetval() and ndblookval() functions 2018-01-27 23:46:48 +01:00
ftrvxmtrx ed76659c05 /sys/src/lib*: clean up 2016-11-17 22:58:16 +01:00
cinap_lenrek 4971432577 libndb: apply eriks dnsquery() ipv6 reverse lookup patch 2012-08-02 01:25:34 +02:00
cinap_lenrek a13a30e854 ndb: recognize ip6.arpa postfix in mkptrname() 2012-08-02 22:20:55 +02:00
cinap_lenrek 9840c9f18e ndb/cs: fix use after free caused by flush/clunk happening before dns lookup finishes 2012-03-23 04:02:34 +01:00
cinap_lenrek 921b81d8f8 fix cs deadlock caused by ndb trying to create hashfile for /net/ndb 2012-02-13 15:26:47 +01:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00