optionlist manualroute_router_options[] = {
{ "host_all_ignored", opt_stringptr,
optionlist manualroute_router_options[] = {
{ "host_all_ignored", opt_stringptr,
if (Ustrcmp(ob->host_find_failed, hff_names[i]) == 0)
{
ob->hff_code = hff_codes[i];
break;
}
if (Ustrcmp(ob->host_find_failed, hff_names[i]) == 0)
{
ob->hff_code = hff_codes[i];
break;
}
if (ob->hff_code < 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n "
"unrecognized setting for host_find_failed option", rblock->name);
if (ob->hff_code < 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n "
"unrecognized setting for host_find_failed option", rblock->name);
if (Ustrcmp(ob->host_all_ignored, hff_names[i]) == 0)
{
ob->hai_code = hff_codes[i];
break;
}
if (Ustrcmp(ob->host_all_ignored, hff_names[i]) == 0)
{
ob->hai_code = hff_codes[i];
break;
}
if (ob->hai_code < 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n "
"unrecognized setting for host_all_ignored option", rblock->name);
if (ob->hai_code < 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n "
"unrecognized setting for host_all_ignored option", rblock->name);
- route_item = rf_expand_data(addr, ob->route_data, &rc);
- if (route_item == NULL) return rc;
+ if (!(route_item = rf_expand_data(addr, ob->route_data, &rc)))
+ return rc;
(void) parse_route_item(route_item, NULL, &hostlist, &options);
(void) parse_route_item(route_item, NULL, &hostlist, &options);
}
/* Expand the hostlist item. It may then pointing to an empty string, or to a
single host or a list of hosts; options is pointing to the rest of the
routelist item, which is either empty or contains various option words. */
}
/* Expand the hostlist item. It may then pointing to an empty string, or to a
single host or a list of hosts; options is pointing to the rest of the
routelist item, which is either empty or contains various option words. */
/* If the expansion was forced to fail, just decline. Otherwise there is a
configuration problem. */
/* If the expansion was forced to fail, just decline. Otherwise there is a
configuration problem. */
{
if (f.expand_string_forcedfail) return DECLINE;
addr->message = string_sprintf("%s router: failed to expand \"%s\": %s",
{
if (f.expand_string_forcedfail) return DECLINE;
addr->message = string_sprintf("%s router: failed to expand \"%s\": %s",
rc = rf_get_errors_address(addr, rblock, verify, &addr->prop.errors_address);
if (rc != OK) return rc;
rc = rf_get_errors_address(addr, rblock, verify, &addr->prop.errors_address);
if (rc != OK) return rc;
rc = rf_get_munge_headers(addr, rblock, &addr->prop.extra_headers,
&addr->prop.remove_headers);
rc = rf_get_munge_headers(addr, rblock, &addr->prop.extra_headers,
&addr->prop.remove_headers);
list is mandatory in either case, except when verifying, in which case the
address is just accepted. */
list is mandatory in either case, except when verifying, in which case the
address is just accepted. */
{
if (verify != v_none) goto ROUTED;
addr->message = string_sprintf("error in %s router: no host(s) specified "
{
if (verify != v_none) goto ROUTED;
addr->message = string_sprintf("error in %s router: no host(s) specified "
/* Otherwise we finish the routing here by building a chain of host items
for the list of configured hosts, and then finding their addresses. */
/* Otherwise we finish the routing here by building a chain of host items
for the list of configured hosts, and then finding their addresses. */
rc = rf_lookup_hostlist(rblock, addr, rblock->ignore_target_hosts, lookup_type,
ob->hff_code, addr_new);
if (rc != OK) return rc;
rc = rf_lookup_hostlist(rblock, addr, rblock->ignore_target_hosts, lookup_type,
ob->hff_code, addr_new);
if (rc != OK) return rc;