Commit a94d4b8
Uwe Kleine-König
telnet: make rfc2217 handling more correct
This implements several things that were missing before:
- Send initial DO and WILL for COM_PORT option.
- Handle a IAC IAC sequence as single in-band '\xff'.
- Reply WILL/DO for non-COM_PORT options with DONT/WONT.
- Stop interpreting escape sequences at their end.
- Add necessary bound checks.
This closes #5. It's still not optimal though. Missing bits include for
example:
- tracking of WILL/WONT/DO/DONT
- Only start with COM_PORT subnegotiation once the other side acked.
Signed-off-by: Uwe Kleine-König <[email protected]>1 parent c173be2 commit a94d4b8
3 files changed
+280
-148
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
123 | 133 | | |
124 | | - | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| |||
0 commit comments