| | 869 | | | | | 870 | | while (*p == '&' || *p == '$') { | | | 871 | | if (*p == '&') | | | 872 | | hp->hd_flag |= HF_NOSTART;
| | | 873 | | if (*p == '$') | | hp <= 4095 | 874 | | hp->hd_flag |= HF_OVERLOAD;
| | | 875 | | p++; | | | 876 | | } | | | 877 | | | | | 878 | | if (parsehost(p, hp)) { | | | 879 | | pvmlogprintf("readhostfile() %s %d: errors\n", fn, lnum); | | | 880 | | err++; | | | 881 | | goto badline; | | | 882 | | } | | | 883 | | | | | 884 | | | | | 885 | | | | | 886 | | | | | 887 | | | | | 888 | | | | | 889 | | if (!strcmp(hp->hd_name, "*")) { | | | 890 | | if (defaults) | | | 891 | | hd_unref(defaults); | | | 892 | | defaults = hp; | | | 893 | | continue; | | | 894 | | } | | | 895 | | | | | 896 | | | | | 897 | | | | | 898 | | if (defaults) | | | 899 | | applydefaults(hp, defaults); | | | 900 | | | | | 901 | | | | | 902 | | | | | 903 | | if (!(he = gethostbyname(hp->hd_aname ? hp->hd_aname : hp->hd_name))) { | | | 904 | | pvmlogprintf("readhostfile() %s %d: %s: can't gethostbyname\n", | | | 905 | | fn, lnum, hp->hd_name); | | | 906 | | err++; | | | 907 | | goto badline; | | | 908 | | } | | | 909 | | BCOPY(he->h_addr_list[0], (char*)&hp->hd_sad.sin_addr,
| | | 910 | | sizeof(struct in_addr)); | | | 911 | | | | | 912 | | | | | 913 | | | | | 914 | | if (!(hp->hd_flag & HF_OVERLOAD))
| | | 915 | | for (i = num_addrs; i-- > 0; ) { | | | 916 | | if (BCMP((char*)&my_in_addrs[i], (char*)&hp->hd_sad.sin_addr,
| | | 917 | | sizeof(struct in_addr)) == 0) { | | | 918 | | hp->hd_flag |= HF_NOSTART;
| | | 919 | | break; | | | 920 | | } | | | 921 | | } | | | 922 | | | | | 923 | | ht_insert(htp, hp); | | | 924 | | hd_unref(hp); | | | 925 | | continue; | | | 926 | | | | | 927 | | badline: | | | 928 | | hd_unref(hp); |
|