} else if (strcmp(proto, "tcp") == 0) {
sock->proto = IPPROTO_TCP;
- /*
- * Add support for http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
- */
- rcode = cf_item_parse(cs, "proxy_protocol", FR_ITEM_POINTER(PW_TYPE_BOOLEAN, &this->proxy_protocol), NULL);
- if (rcode < 0) return -1;
} else {
cf_log_err_cs(cs,
"Unknown proto name \"%s\"", proto);
return -1;
}
+ /*
+ * Add support for http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
+ */
+ rcode = cf_item_parse(cs, "proxy_protocol", FR_ITEM_POINTER(PW_TYPE_BOOLEAN, &this->proxy_protocol), NULL);
+ if (rcode < 0) return -1;
+
/*
* If unset, set to default.
*/