Module: sip-router Branch: master Commit: ec79c28a238fa8e66823161daa7994a679ef56f2 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ec79c28a...
Author: Miklos Tirpak miklos@iptel.org Committer: Miklos Tirpak miklos@iptel.org Date: Wed Jun 16 15:49:24 2010 +0200
dns_cache: added support for permanent entries
Permanent entries are intended to be used for management purposes, i.e. they are useful if there is no DNS server available for instance. Such entries never expire, and overwrite any existing entry that was added by the resolver. They can be added to the cache from modules or over the RPC calls dns.add_a, dns.add_aaaa and dns.add_srv with the flag value of 2. (or 3 in case of negative permanent entry)
- err_flags in struct dns_hash_entry is changed to be a general purpose flag, and renamed to ent_flag. - DNS_BAD_NAME is renamed to DNS_FLAG_BAD_NAME - DNS_FLAG_PERMANENT value is added. - new rpc call to force deleting the permanent entries from the cache: dns.delete_all_force. (dns.delete_all deletes only the non-permanent entries.)
---
core_cmd.c | 10 ++++- dns_cache.c | 143 +++++++++++++++++++++++++++++++++++++++++++---------------- dns_cache.h | 23 +++++++-- 3 files changed, 131 insertions(+), 45 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=ec79...