Diff

Differences From Artifact [b750f5ace4]:

To Artifact [41938c6e31]:


71
72
73
74
75
76
77




78
79
80
81
82
83
84
85
86
87
88
89
	if (ghbn_ret == NULL) {
		return(-1);
	}

	if (ghbn_ret->h_length != 4) {
		return(-1);
	}





	memcpy(data, ghbn_ret->h_addr_list[0], sizeof(*data));

	*data = ntohl(*data);

	return(0);
}

static int lc_process_var_hostname6(void *data, const char *value, const char **endptr) {
	return(-1);
}








>
>
>
>



<
<







71
72
73
74
75
76
77
78
79
80
81
82
83
84


85
86
87
88
89
90
91
	if (ghbn_ret == NULL) {
		return(-1);
	}

	if (ghbn_ret->h_length != 4) {
		return(-1);
	}

	if (ghbn_ret->h_addr_list[0] == 0) {
		return(-1);
	}

	memcpy(data, ghbn_ret->h_addr_list[0], sizeof(*data));



	return(0);
}

static int lc_process_var_hostname6(void *data, const char *value, const char **endptr) {
	return(-1);
}

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117



118
119
120
121
122
123
124
125
126
127
128
129




130
131
132
133
134
135
136
137
138
139
140
				}

				if (curr_ipval > 255) {
					retval = -1;
					break;
				}

				ipval <<= 8;
				ipval |= curr_ipval;
				curr_ipval = 0;

				/* For lists */
				if (*valptr == ',') {
					break;
				}




				continue;
			} else {
				retval = -1;
				break;
			}
		}

		curr_ipval *= 10;
		curr_ipval += *valptr - '0';
	}





	if (retval == 0) {
		ipval <<= 8;
		ipval |= curr_ipval;

		*data = ipval;
	}

	return(retval);
}

static int lc_process_var_ip6(void *data, const char *value, const char **endptr) {







<
<
<
<




>
>
>












>
>
>
>

<
|
<







105
106
107
108
109
110
111




112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

136

137
138
139
140
141
142
143
				}

				if (curr_ipval > 255) {
					retval = -1;
					break;
				}





				/* For lists */
				if (*valptr == ',') {
					break;
				}

				ipval |= curr_ipval << ((dotcount - 1) * 8);
				curr_ipval = 0;

				continue;
			} else {
				retval = -1;
				break;
			}
		}

		curr_ipval *= 10;
		curr_ipval += *valptr - '0';
	}

	if (curr_ipval > 255) {
		retval = -1;
	}

	if (retval == 0) {

		ipval |= curr_ipval << 24;

		*data = ipval;
	}

	return(retval);
}

static int lc_process_var_ip6(void *data, const char *value, const char **endptr) {