|
ru.unix.bsd- RU.UNIX.BSD ------------------------------------------------------------------ From : Alexey G. Misyurenko 2:5020/400 26 Aug 2005 23:50:01 To : Alex Semenyaka Subject : Re: Passive FTP -------------------------------------------------------------------------------- Alex Semenyaka wrote: > Hello Alexey! > > 26 Aug 05 15:39, you wrote to me: > > >> 1) А по какой спецификации при получении ACK вместо SYN+ACK система > >> должна отослать новый SYN? По-моему, она должна такой ACK полностью > AM> Отсылкой ACK мы добьемся получения RST , от инициатора соединения > > Выкачал tcp_input.c фришкин, проверил. Там написано: > А я RFC /цитата ниже/%) > > Ты получишь RST, если будешь подтверждать что попало. Если будешь подтверждать Hу зачем все что попало %) RFC: 793 Цитата с 34й страницы Assume that two user processes A and B are communicating with one another when a crash occurs causing loss of memory to A's TCP. Depending on the operating system supporting A's TCP, it is likely that some error recovery mechanism exists. When the TCP is up again, A is likely to start again from the beginning or from a recovery point. As a result, A will probably try to OPEN the connection again or try to SEND on the connection it believes open. In the latter case, it receives the error message "connection not open" from the local (A's) TCP. In an attempt to establish the connection, A's TCP will send a segment containing SYN. This scenario leads to the example shown in figure 10. After TCP A crashes, the user attempts to re-open the connection. TCP B, in the meantime, thinks the connection is open. TCP A TCP B 1. (CRASH) (send 300,receive 100) 2. CLOSED ESTABLISHED 3. SYN-SENT --> <SEQ=400><CTL=SYN> --> (??) 4. (!!) <-- <SEQ=300><ACK=100><CTL=ACK> <-- ESTABLISHED 5. SYN-SENT --> <SEQ=100><CTL=RST> --> (Abort!!) 6. SYN-SENT CLOSED 7. SYN-SENT --> <SEQ=400><CTL=SYN> --> Half-Open Connection Discovery Figure 10. When the SYN arrives at line 3, TCP B, being in a synchronized state, and the incoming segment outside the window, responds with an acknowledgment indicating what sequence it next expects to hear (ACK 100). TCP A sees that this segment does not acknowledge anything it sent and, being unsynchronized, sends a reset (RST) because it has detected a half-open connection. TCP B aborts at line 5. TCP A will continue to try to establish the connection; the problem is now reduced to the basic 3-way handshake of figure 7. --- ifmail v.2.15dev5.3 * Origin: ISP Caravan(http://www.caravan.ru) News Server (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.unix.bsd/104330134bd9c.html, оценка из 5, голосов 10
|