X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=telnet.c;h=fe6f5cf94507ab8c600c9cab3f01c0071563a832;hb=df913d00360aea784521662ad42c11e3933bb6f8;hp=54b9a7c7db875fc1d6dd207acd97ff5275da159b;hpb=b36d32b88169ca3f155d0d3f8e4cf7bb3f7b60fa;p=PuTTY.git diff --git a/telnet.c b/telnet.c index 54b9a7c7..fe6f5cf9 100644 --- a/telnet.c +++ b/telnet.c @@ -394,9 +394,12 @@ static void proc_rec_opt(Telnet telnet, int cmd, int option) } /* * If we reach here, the option was one we weren't prepared to - * cope with. So send a negative ack. + * cope with. If the request was positive (WILL or DO), we send + * a negative ack to indicate refusal. If the request was + * negative (WONT / DONT), we must do nothing. */ - send_opt(telnet, (cmd == WILL ? DONT : WONT), option); + if (cmd == WILL || cmd == DO) + send_opt(telnet, (cmd == WILL ? DONT : WONT), option); } static void process_subneg(Telnet telnet)