~ubuntu-branches/ubuntu/precise/pdnsd/precise

« back to all changes in this revision

Viewing changes to src/conf-parser.c

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-03-09 18:54:22 UTC
  • mfrom: (1.3.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110309185422-33hwmg565m18dpu4
Tags: 1.2.8-par-1
* New Maintainer. (Closes: #596302)
* New Upstream Releases. (Closes: #596302, LP: #712938)
* debian/patches/05_fix_spelling.patch: Fix spelling errors.
* debian/patches/04_ipv6_localhost.patch. Adding ipv6 in localhost.
  (Closes: #466332, #504211)
* debian/init.d:
  - Add init status. (Closes: #476538)
  - Don't says starting pdnsd if already started. (Closes: #487467)
* deban/changelog: Fix incorrect date in 1.2.7-par-1 (Closes: #527352)
* debian/control:
  - Add Vcs-Browser and Vcs-Git to alioth.
  - Bump Standards-Version to 3.9.1.
* debian/copyright: Updated as per DEP-5 specification.
* debian/pdnsd-recurse.conf:
  - Adding recurse mode. (Closes: #602262)
  - Fixing recursive neg section. (Closes: #519656)
* doc/pdnsd.conf.in: Separate ip address by new line. Thanks to
  Raphael Geissert. (Closes: #597734)
* perm_cache size set to default. (Closes: #602329)
  - doc/pdnsd.conf.in
  - debian/pdnsd.conf
  - debian/pdnsd-recurse.conf
  - debian/pdnsd-resolvconf.conf
* debian/002_NetMan_pdnsd: add compabilty with WiFi. 
  (Closes: #617373, LP: #452351)
* Ack'd NMU upload. (Closes: #548173)
* Update debconf Indonesian translations. (Closes: #610148)
* Switch to quilt system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
   This version was rewritten in C from scratch by Paul A. Rombouts
5
5
   and doesn't require (f)lex or yacc/bison.
6
6
 
7
 
   Copyright (C) 2004, 2005, 2006, 2007, 2008 Paul A. Rombouts.
 
7
   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Paul A. Rombouts.
8
8
 
9
9
  This file is part of the pdnsd package.
10
10
 
630
630
            ASSIGN_ON_OFF(global->paranoid, p,C_ON,"bad qualifier in paranoid= option.");
631
631
            break;
632
632
 
 
633
          case IGNORE_CD:
 
634
            ASSIGN_ON_OFF(global->ignore_cd, p,C_ON,"bad qualifier in ignore_cd= option.");
 
635
            break;
 
636
 
633
637
          case STATUS_CTL: {
634
638
            int cnst;
635
639
            ASSIGN_CONST(cnst, p,cnst==C_ON || cnst==C_OFF ,"bad qualifier in status_pipe= option.");
802
806
 
803
807
          case NEG_RRS_POL: {
804
808
            int cnst;
805
 
            ASSIGN_CONST(cnst,p,cnst==C_ON || cnst==C_OFF || cnst==C_AUTH,"bad qualifier in neg_rrs_pol= option.");
 
809
            ASSIGN_CONST(cnst,p,cnst==C_ON || cnst==C_OFF || cnst==C_DEFAULT || cnst==C_AUTH,
 
810
                         "bad qualifier in neg_rrs_pol= option.");
806
811
            global->neg_rrs_pol=cnst;
807
812
          }
808
813
            break;
1026
1031
            ASSIGN_ON_OFF(server.is_proxy,p,C_ON,"bad qualifier in proxy_only= option.");
1027
1032
            break;
1028
1033
 
1029
 
          case ROOT_SERVER:
1030
 
            ASSIGN_ON_OFF(server.rootserver,p,C_ON,"bad qualifier in root_server= option.");
 
1034
          case ROOT_SERVER: {
 
1035
            int cnst;
 
1036
            ASSIGN_CONST(cnst,p,cnst==C_ON || cnst==C_OFF || cnst==C_DISCOVER,"bad qualifier in root_server= option.");
 
1037
            server.rootserver= (cnst==C_DISCOVER? 2: cnst==C_ON);
 
1038
          }
1031
1039
            break;
1032
1040
 
1033
1041
          case RANDOMIZE_SERVERS:
1705
1713
    return "out of memory!";
1706
1714
  }
1707
1715
  at=&DA_LAST(*ata);
1708
 
  at->a = addr;
 
1716
  SET_PDNSD_A2(&at->a, &addr);
1709
1717
  at->is_up=0;
1710
1718
  at->i_ts=0;
1711
1719
  return NULL;
1796
1804
    for(i=0;i<n;++i) {
1797
1805
      atup_t *at=&DA_INDEX(ata,i);
1798
1806
      if(is_inaddr_any(&global.a)) {
1799
 
        if(is_local_addr(&at->a)) {
 
1807
        if(is_local_addr(PDNSD_A2_TO_A(&at->a))) {
1800
1808
          char buf[ADDRSTR_MAXLEN];
1801
1809
          fprintf(stderr,"Local name-server address \"%s\" ignored in config file.\n",
1802
 
                  pdnsd_a2str(&at->a,buf,ADDRSTR_MAXLEN));
 
1810
                  pdnsd_a2str(PDNSD_A2_TO_A(&at->a),buf,ADDRSTR_MAXLEN));
1803
1811
          continue;
1804
1812
        }
1805
1813
      }
1806
1814
      else {
1807
 
        if(ADDR_EQUIV(&global.a,&at->a)) {
 
1815
        if(equiv_inaddr2(&global.a,&at->a)) {
1808
1816
          char buf[ADDRSTR_MAXLEN];
1809
1817
          fprintf(stderr,"Ignoring name-server address \"%s\" in config file (identical to server_ip address).\n",
1810
 
                  pdnsd_a2str(&at->a,buf,ADDRSTR_MAXLEN));
 
1818
                  pdnsd_a2str(PDNSD_A2_TO_A(&at->a),buf,ADDRSTR_MAXLEN));
1811
1819
          continue;
1812
1820
        }
1813
1821
      }