X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/6226c9390d23d6868edde63b9568891cd88631cc..5af30f3ebf24a7556520c19e63c2a99cedcb9ade:/raw.c diff --git a/raw.c b/raw.c index d64b6d7f..b2676a93 100644 --- a/raw.c +++ b/raw.c @@ -139,6 +139,22 @@ static const char *raw_init(void *frontend_handle, void **backend_handle, if ((err = sk_socket_error(raw->s)) != NULL) return err; + if (*cfg->loghost) { + char *colon; + + sfree(*realhost); + *realhost = dupstr(cfg->loghost); + colon = strrchr(*realhost, ':'); + if (colon) { + /* + * FIXME: if we ever update this aspect of ssh.c for + * IPv6 literal management, this should change in line + * with it. + */ + *colon++ = '\0'; + } + } + return NULL; } @@ -278,5 +294,7 @@ Backend raw_backend = { raw_provide_logctx, raw_unthrottle, raw_cfg_info, - 1 + "raw", + PROT_RAW, + 0 };