diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-12-01 13:41:56 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-12-01 13:48:44 +0200 |
commit | 2d83770e46cee7501972d768da95b46dcc5d0460 (patch) | |
tree | 2c822d95af84dc385c6f5257999a335eb650d5df /src/nssync.h | |
parent | 7817c61276f2402488c1450d6df03c12a97b8af5 (diff) | |
download | nssync-2d83770e46cee7501972d768da95b46dcc5d0460.tar.gz nssync-2d83770e46cee7501972d768da95b46dcc5d0460.tar.bz2 |
Optionally select only zones which list the current machine as one of their NSs.
* src/iflist.c: New file.
* src/Makefile.am (nssync_SOURCES): Add iflist.c
* src/config.c: New configuration statement "check-ns".
* src/nssync.c (main): Call get_host_addresses if check-ns is
requested.
* src/nssync.h (check_ns): New extern.
(get_host_addresses, is_my_sockaddr): New protos.
(nsdef): New struct.
(nssync) <nsdef_head, nsdef_tail>
<myzone>: New members.
* src/output.c (format_ns_record): Remove.
(save_ns_record): New function. Replaces format_ns_record.
(format_soa_record): Don't create zone file if myzone is false.
* NEWS: Document check-ns
* doc/nssync.8: Likewise.
* doc/nssync.texi: Likewise.
Diffstat (limited to 'src/nssync.h')
-rw-r--r-- | src/nssync.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nssync.h b/src/nssync.h index fc7ef0c..69149e8 100644 --- a/src/nssync.h +++ b/src/nssync.h @@ -37,6 +37,7 @@ extern char *pidfile; extern char *tempdir; extern char *compare_command; extern char *reload_command; +extern int check_ns; extern unsigned changed_zones; @@ -88,6 +89,16 @@ int sql_do_query(const char *query, int (*fun)(MYSQL_ROW, unsigned, void*), void *data); int sql_get_slave_status(char **pfile, char **poff); +void get_host_addresses(void); +struct sockaddr_in; +int is_my_sockaddr(struct sockaddr_in *s); + +struct nsdef { + struct nsdef *next; + char *type; + char *data; +}; + struct nssync { char *tag; char *zone_conf_file; @@ -99,6 +110,9 @@ struct nssync { char *rr_query; char *rev_rr_query; char *ns_query; + + struct nsdef *nsdef_head, *nsdef_tail; + int myzone; char *file_name; char *temp_file_name; |