Page MenuHomeFreeBSD

Add baud rate support to telnet(1)
AbandonedPublic

Authored by ngie on Oct 23 2014, 12:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 16, 9:07 AM
Unknown Object (File)
Aug 31 2025, 11:52 AM
Unknown Object (File)
Aug 31 2025, 1:12 AM
Unknown Object (File)
Aug 29 2025, 6:39 PM
Unknown Object (File)
Aug 29 2025, 6:00 PM
Unknown Object (File)
Aug 29 2025, 12:38 PM
Unknown Object (File)
Aug 21 2025, 3:47 AM
Unknown Object (File)
Aug 19 2025, 9:28 AM

Details

Reviewers
markj
Summary

Add baud rate support to telnet(1)

This implements part of RFC-2217

It's based off a patch originally written by Sujal Patel at Isilon, and
contributions from other Isilon employees.

PR: 173728
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ngie retitled this revision from to Add baud rate support to telnet(1).
ngie updated this object.
ngie added subscribers: bdrewery, markj, markm.
markj requested changes to this revision.Oct 23 2014, 12:35 AM
markj added a reviewer: markj.
markj added inline comments.
contrib/telnet/telnet/telnet.c
217

baudrate should be a uint32_t.

220

Error checking...

223

Looks like this assignment is redundant?

227

So we just silently do nothing if the specified baudrate isn't found?

232

It seems like this should be NETROOM() < len.

245

Looks like we leak memory allocated by asprintf here. (Why not just allocate 10 bytes on the stack and use snprintf?)

This revision now requires changes to proceed.Oct 23 2014, 12:35 AM

It seems markj said it all!

I could have complained about ordering lists, but I think that is the style of the whole thing so I won't.

ngie edited edge metadata.

I can't find anything to complain about.

contrib/telnet/telnet/telnet.c
220

Fixed!

223

Yes, very.

232–240

I doublechecked this before I committed it, and it doesn't work. Need to figure out why..

ngie edited edge metadata.

Fix the code so it actually works by doing the memcpy/snprintf operations separately, like before

contrib/telnet/telnet/telnet.c
237

snprintf will always null-terminate the string, so this will truncate the last byte since sizeof(temp2) == 10 and you're trying to write 10 bytes.

241

temp2 isn't a very good variable name.

  • Fix buffer size issues by NUL terminating the command buffer.
  • Give the command buffer variable a more intuitive name.

Committed in r274364 -- thank you for the review!