IS2: Use explicit IS2 config for uplink setup

This commit is contained in:
Heikki Hannikainen 2013-06-28 08:10:50 +03:00
parent 573a71dfe1
commit 2fc95e7e1c
3 changed files with 6 additions and 2 deletions

View File

@ -49,7 +49,7 @@ int is2_out_server_signature(struct worker_t *self, struct client_t *c)
buf = is2_allocate_buffer(len);
is2_message__pack(&m, buf + IS2_HEAD_LEN);
c->write(self, c, "#IS2\n", 5);
//c->write(self, c, "#IS2\n", 5); /* not a good idea after all */
c->write(self, c, buf, len + IS2_HEAD_LEN + IS2_TAIL_LEN);
hfree(buf);

View File

@ -768,7 +768,9 @@ int do_uplink(struct uplink_config_t **lq, int argc, char **argv)
l->state = UPLINK_ST_UNKNOWN;
for (i = 6; i < argc; i++) {
if (strcasecmp(argv[i], "tlskey") == 0 || strcasecmp(argv[i], "sslkey") == 0) {
if (strcasecmp(argv[i], "is2") == 0) {
l->client_flags |= CLFLAGS_IS2;
} else if (strcasecmp(argv[i], "tlskey") == 0 || strcasecmp(argv[i], "sslkey") == 0) {
if (config_uplink_tls(argv, argc, &i, "tlskey", (char **)&l->keyfile)) {
free_uplink_config(&l);
return -2;

View File

@ -312,11 +312,13 @@ int uplink_login_handler(struct worker_t *self, struct client_t *c, int l4proto,
}
#endif
/* Might not be a good idea after all.
if (len >= 4 && memcmp(s, "#IS2", 4) == 0) {
hlog_packet(LOG_INFO, s, len, "%s: Uplink server talks IS2, switching: ", c->addr_rem);
c->handler_consume_input = &is2_deframe_input;
return 0;
}
*/
hlog_packet(LOG_INFO, s, len, "%s: Uplink server software: ", c->addr_rem);