Changes in uspace/srv/net/tcp/conn.c [f597bc4:f0a2720] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/conn.c
rf597bc4 rf0a2720 36 36 37 37 #include <adt/list.h> 38 #include < stdbool.h>38 #include <bool.h> 39 39 #include <errno.h> 40 40 #include <io/log.h> … … 164 164 static void tcp_conn_free(tcp_conn_t *conn) 165 165 { 166 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_free(%p)", conn->name, conn);166 log_msg(LVL_DEBUG, "%s: tcp_conn_free(%p)", conn->name, conn); 167 167 tcp_tqueue_fini(&conn->retransmit); 168 168 … … 184 184 void tcp_conn_addref(tcp_conn_t *conn) 185 185 { 186 log_msg(L OG_DEFAULT, LVL_DEBUG2, "%s: tcp_conn_addref(%p)", conn->name, conn);186 log_msg(LVL_DEBUG2, "%s: tcp_conn_addref(%p)", conn->name, conn); 187 187 atomic_inc(&conn->refcnt); 188 188 } … … 196 196 void tcp_conn_delref(tcp_conn_t *conn) 197 197 { 198 log_msg(L OG_DEFAULT, LVL_DEBUG2, "%s: tcp_conn_delref(%p)", conn->name, conn);198 log_msg(LVL_DEBUG2, "%s: tcp_conn_delref(%p)", conn->name, conn); 199 199 200 200 if (atomic_predec(&conn->refcnt) == 0) … … 211 211 void tcp_conn_delete(tcp_conn_t *conn) 212 212 { 213 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_delete(%p)", conn->name, conn);213 log_msg(LVL_DEBUG, "%s: tcp_conn_delete(%p)", conn->name, conn); 214 214 215 215 assert(conn->deleted == false); … … 245 245 tcp_cstate_t old_state; 246 246 247 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set(%p)", conn);247 log_msg(LVL_DEBUG, "tcp_conn_state_set(%p)", conn); 248 248 249 249 old_state = conn->cstate; … … 253 253 /* Run user callback function */ 254 254 if (conn->cstate_cb != NULL) { 255 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set() - run user CB");255 log_msg(LVL_DEBUG, "tcp_conn_state_set() - run user CB"); 256 256 conn->cstate_cb(conn, conn->cstate_cb_arg); 257 257 } else { 258 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_state_set() - no user CB");258 log_msg(LVL_DEBUG, "tcp_conn_state_set() - no user CB"); 259 259 } 260 260 … … 293 293 case st_syn_received: 294 294 case st_established: 295 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: FIN sent -> Fin-Wait-1", conn->name);295 log_msg(LVL_DEBUG, "%s: FIN sent -> Fin-Wait-1", conn->name); 296 296 tcp_conn_state_set(conn, st_fin_wait_1); 297 297 break; 298 298 case st_close_wait: 299 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: FIN sent -> Last-Ack", conn->name);299 log_msg(LVL_DEBUG, "%s: FIN sent -> Last-Ack", conn->name); 300 300 tcp_conn_state_set(conn, st_last_ack); 301 301 break; 302 302 default: 303 log_msg(L OG_DEFAULT, LVL_ERROR, "%s: Connection state %d", conn->name,303 log_msg(LVL_ERROR, "%s: Connection state %d", conn->name, 304 304 conn->cstate); 305 305 assert(false); … … 312 312 static bool tcp_socket_match(tcp_sock_t *sock, tcp_sock_t *patt) 313 313 { 314 log_msg(L OG_DEFAULT, LVL_DEBUG2, "tcp_socket_match(sock=(%x,%u), pat=(%x,%u))",314 log_msg(LVL_DEBUG2, "tcp_socket_match(sock=(%x,%u), pat=(%x,%u))", 315 315 sock->addr.ipv4, sock->port, patt->addr.ipv4, patt->port); 316 316 … … 323 323 return false; 324 324 325 log_msg(L OG_DEFAULT, LVL_DEBUG2, " -> match");325 log_msg(LVL_DEBUG2, " -> match"); 326 326 327 327 return true; … … 331 331 static bool tcp_sockpair_match(tcp_sockpair_t *sp, tcp_sockpair_t *pattern) 332 332 { 333 log_msg(L OG_DEFAULT, LVL_DEBUG2, "tcp_sockpair_match(%p, %p)", sp, pattern);333 log_msg(LVL_DEBUG2, "tcp_sockpair_match(%p, %p)", sp, pattern); 334 334 335 335 if (!tcp_socket_match(&sp->local, &pattern->local)) … … 353 353 tcp_conn_t *tcp_conn_find_ref(tcp_sockpair_t *sp) 354 354 { 355 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_conn_find_ref(%p)", sp); 356 357 log_msg(LOG_DEFAULT, LVL_DEBUG2, "compare conn (f:(%x,%u), l:(%x,%u))", 358 sp->foreign.addr.ipv4, sp->foreign.port, 359 sp->local.addr.ipv4, sp->local.port); 360 355 log_msg(LVL_DEBUG, "tcp_conn_find_ref(%p)", sp); 356 361 357 fibril_mutex_lock(&conn_list_lock); 362 358 363 359 list_foreach(conn_list, link) { 364 360 tcp_conn_t *conn = list_get_instance(link, tcp_conn_t, link); 365 361 tcp_sockpair_t *csp = &conn->ident; 366 367 log_msg(LOG_DEFAULT, LVL_DEBUG2, " - with (f:(%x,%u), l:(%x,%u))", 362 log_msg(LVL_DEBUG2, "compare with conn (f:(%x,%u), l:(%x,%u))", 368 363 csp->foreign.addr.ipv4, csp->foreign.port, 369 364 csp->local.addr.ipv4, csp->local.port); 370 371 365 if (tcp_sockpair_match(sp, csp)) { 372 366 tcp_conn_addref(conn); … … 375 369 } 376 370 } 377 371 378 372 fibril_mutex_unlock(&conn_list_lock); 379 373 return NULL; … … 386 380 static void tcp_conn_reset(tcp_conn_t *conn) 387 381 { 388 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_reset()", conn->name);382 log_msg(LVL_DEBUG, "%s: tcp_conn_reset()", conn->name); 389 383 tcp_conn_state_set(conn, st_closed); 390 384 conn->reset = true; … … 404 398 { 405 399 /* TODO */ 406 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_reset_signal()", conn->name);400 log_msg(LVL_DEBUG, "%s: tcp_reset_signal()", conn->name); 407 401 } 408 402 … … 428 422 return true; 429 423 case st_closed: 430 log_msg(L OG_DEFAULT, LVL_WARN, "state=%d", (int) conn->cstate);424 log_msg(LVL_WARN, "state=%d", (int) conn->cstate); 431 425 assert(false); 432 426 } … … 442 436 static void tcp_conn_sa_listen(tcp_conn_t *conn, tcp_segment_t *seg) 443 437 { 444 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg);438 log_msg(LVL_DEBUG, "tcp_conn_sa_listen(%p, %p)", conn, seg); 445 439 446 440 if ((seg->ctrl & CTL_RST) != 0) { 447 log_msg(L OG_DEFAULT, LVL_DEBUG, "Ignoring incoming RST.");441 log_msg(LVL_DEBUG, "Ignoring incoming RST."); 448 442 return; 449 443 } 450 444 451 445 if ((seg->ctrl & CTL_ACK) != 0) { 452 log_msg(L OG_DEFAULT, LVL_DEBUG, "Incoming ACK, send acceptable RST.");446 log_msg(LVL_DEBUG, "Incoming ACK, send acceptable RST."); 453 447 tcp_reply_rst(&conn->ident, seg); 454 448 return; … … 456 450 457 451 if ((seg->ctrl & CTL_SYN) == 0) { 458 log_msg(L OG_DEFAULT, LVL_DEBUG, "SYN not present. Ignoring segment.");459 return; 460 } 461 462 log_msg(L OG_DEFAULT, LVL_DEBUG, "Got SYN, sending SYN, ACK.");452 log_msg(LVL_DEBUG, "SYN not present. Ignoring segment."); 453 return; 454 } 455 456 log_msg(LVL_DEBUG, "Got SYN, sending SYN, ACK."); 463 457 464 458 conn->rcv_nxt = seg->seq + 1; … … 466 460 467 461 468 log_msg(L OG_DEFAULT, LVL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt);462 log_msg(LVL_DEBUG, "rcv_nxt=%u", conn->rcv_nxt); 469 463 470 464 if (seg->len > 1) 471 log_msg(L OG_DEFAULT, LVL_WARN, "SYN combined with data, ignoring data.");465 log_msg(LVL_WARN, "SYN combined with data, ignoring data."); 472 466 473 467 /* XXX select ISS */ … … 499 493 static void tcp_conn_sa_syn_sent(tcp_conn_t *conn, tcp_segment_t *seg) 500 494 { 501 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg);495 log_msg(LVL_DEBUG, "tcp_conn_sa_syn_sent(%p, %p)", conn, seg); 502 496 503 497 if ((seg->ctrl & CTL_ACK) != 0) { 504 log_msg(L OG_DEFAULT, LVL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u",498 log_msg(LVL_DEBUG, "snd_una=%u, seg.ack=%u, snd_nxt=%u", 505 499 conn->snd_una, seg->ack, conn->snd_nxt); 506 500 if (!seq_no_ack_acceptable(conn, seg->ack)) { 507 501 if ((seg->ctrl & CTL_RST) == 0) { 508 log_msg(L OG_DEFAULT, LVL_WARN, "ACK not acceptable, send RST");502 log_msg(LVL_WARN, "ACK not acceptable, send RST"); 509 503 tcp_reply_rst(&conn->ident, seg); 510 504 } else { 511 log_msg(L OG_DEFAULT, LVL_WARN, "RST,ACK not acceptable, drop");505 log_msg(LVL_WARN, "RST,ACK not acceptable, drop"); 512 506 } 513 507 return; … … 518 512 /* If we get here, we have either an acceptable ACK or no ACK */ 519 513 if ((seg->ctrl & CTL_ACK) != 0) { 520 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: Connection reset. -> Closed",514 log_msg(LVL_DEBUG, "%s: Connection reset. -> Closed", 521 515 conn->name); 522 516 /* Reset connection */ … … 524 518 return; 525 519 } else { 526 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: RST without ACK, drop",520 log_msg(LVL_DEBUG, "%s: RST without ACK, drop", 527 521 conn->name); 528 522 return; … … 533 527 534 528 if ((seg->ctrl & CTL_SYN) == 0) { 535 log_msg(L OG_DEFAULT, LVL_DEBUG, "No SYN bit, ignoring segment.");529 log_msg(LVL_DEBUG, "No SYN bit, ignoring segment."); 536 530 return; 537 531 } … … 550 544 } 551 545 552 log_msg(L OG_DEFAULT, LVL_DEBUG, "Sent SYN, got SYN.");546 log_msg(LVL_DEBUG, "Sent SYN, got SYN."); 553 547 554 548 /* … … 557 551 * will always be accepted as new window setting. 558 552 */ 559 log_msg(L OG_DEFAULT, LVL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", "553 log_msg(LVL_DEBUG, "SND.WND := %" PRIu32 ", SND.WL1 := %" PRIu32 ", " 560 554 "SND.WL2 = %" PRIu32, seg->wnd, seg->seq, seg->seq); 561 555 conn->snd_wnd = seg->wnd; … … 564 558 565 559 if (seq_no_syn_acked(conn)) { 566 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: syn acked -> Established", conn->name);560 log_msg(LVL_DEBUG, "%s: syn acked -> Established", conn->name); 567 561 tcp_conn_state_set(conn, st_established); 568 562 tcp_tqueue_ctrl_seg(conn, CTL_ACK /* XXX */); 569 563 } else { 570 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: syn not acked -> Syn-Received",564 log_msg(LVL_DEBUG, "%s: syn not acked -> Syn-Received", 571 565 conn->name); 572 566 tcp_conn_state_set(conn, st_syn_received); … … 588 582 tcp_segment_t *pseg; 589 583 590 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg);584 log_msg(LVL_DEBUG, "tcp_conn_sa_seq(%p, %p)", conn, seg); 591 585 592 586 /* Discard unacceptable segments ("old duplicates") */ 593 587 if (!seq_no_segment_acceptable(conn, seg)) { 594 log_msg(L OG_DEFAULT, LVL_DEBUG, "Replying ACK to unacceptable segment.");588 log_msg(LVL_DEBUG, "Replying ACK to unacceptable segment."); 595 589 tcp_tqueue_ctrl_seg(conn, CTL_ACK); 596 590 tcp_segment_delete(seg); … … 688 682 assert(seq_no_in_rcv_wnd(conn, seg->seq)); 689 683 690 log_msg(L OG_DEFAULT, LVL_WARN, "SYN is in receive window, should send reset. XXX");684 log_msg(LVL_WARN, "SYN is in receive window, should send reset. XXX"); 691 685 692 686 /* … … 711 705 if (!seq_no_ack_acceptable(conn, seg->ack)) { 712 706 /* ACK is not acceptable, send RST. */ 713 log_msg(L OG_DEFAULT, LVL_WARN, "Segment ACK not acceptable, sending RST.");707 log_msg(LVL_WARN, "Segment ACK not acceptable, sending RST."); 714 708 tcp_reply_rst(&conn->ident, seg); 715 709 tcp_segment_delete(seg); … … 717 711 } 718 712 719 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: SYN ACKed -> Established", conn->name);713 log_msg(LVL_DEBUG, "%s: SYN ACKed -> Established", conn->name); 720 714 721 715 tcp_conn_state_set(conn, st_established); … … 736 730 static cproc_t tcp_conn_seg_proc_ack_est(tcp_conn_t *conn, tcp_segment_t *seg) 737 731 { 738 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_proc_ack_est(%p, %p)", conn, seg);739 740 log_msg(L OG_DEFAULT, LVL_DEBUG, "SEG.ACK=%u, SND.UNA=%u, SND.NXT=%u",732 log_msg(LVL_DEBUG, "tcp_conn_seg_proc_ack_est(%p, %p)", conn, seg); 733 734 log_msg(LVL_DEBUG, "SEG.ACK=%u, SND.UNA=%u, SND.NXT=%u", 741 735 (unsigned)seg->ack, (unsigned)conn->snd_una, 742 736 (unsigned)conn->snd_nxt); 743 737 744 738 if (!seq_no_ack_acceptable(conn, seg->ack)) { 745 log_msg(L OG_DEFAULT, LVL_DEBUG, "ACK not acceptable.");739 log_msg(LVL_DEBUG, "ACK not acceptable."); 746 740 if (!seq_no_ack_duplicate(conn, seg->ack)) { 747 log_msg(L OG_DEFAULT, LVL_WARN, "Not acceptable, not duplicate. "741 log_msg(LVL_WARN, "Not acceptable, not duplicate. " 748 742 "Send ACK and drop."); 749 743 /* Not acceptable, not duplicate. Send ACK and drop. */ … … 752 746 return cp_done; 753 747 } else { 754 log_msg(L OG_DEFAULT, LVL_DEBUG, "Ignoring duplicate ACK.");748 log_msg(LVL_DEBUG, "Ignoring duplicate ACK."); 755 749 } 756 750 } else { … … 764 758 conn->snd_wl2 = seg->ack; 765 759 766 log_msg(L OG_DEFAULT, LVL_DEBUG, "Updating send window, SND.WND=%" PRIu32760 log_msg(LVL_DEBUG, "Updating send window, SND.WND=%" PRIu32 767 761 ", SND.WL1=%" PRIu32 ", SND.WL2=%" PRIu32, 768 762 conn->snd_wnd, conn->snd_wl1, conn->snd_wl2); … … 791 785 792 786 if (conn->fin_is_acked) { 793 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name);787 log_msg(LVL_DEBUG, "%s: FIN acked -> Fin-Wait-2", conn->name); 794 788 tcp_conn_state_set(conn, st_fin_wait_2); 795 789 } … … 856 850 857 851 if (conn->fin_is_acked) { 858 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: FIN acked -> Closed", conn->name);852 log_msg(LVL_DEBUG, "%s: FIN acked -> Closed", conn->name); 859 853 tcp_conn_remove(conn); 860 854 tcp_conn_state_set(conn, st_closed); … … 887 881 static cproc_t tcp_conn_seg_proc_ack(tcp_conn_t *conn, tcp_segment_t *seg) 888 882 { 889 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)",883 log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_ack(%p, %p)", 890 884 conn->name, conn, seg); 891 885 892 886 if ((seg->ctrl & CTL_ACK) == 0) { 893 log_msg(L OG_DEFAULT, LVL_WARN, "Segment has no ACK. Dropping.");887 log_msg(LVL_WARN, "Segment has no ACK. Dropping."); 894 888 tcp_segment_delete(seg); 895 889 return cp_done; … … 946 940 size_t xfer_size; 947 941 948 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)",942 log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_text(%p, %p)", 949 943 conn->name, conn, seg); 950 944 … … 988 982 fibril_condvar_broadcast(&conn->rcv_buf_cv); 989 983 990 log_msg(L OG_DEFAULT, LVL_DEBUG, "Received %zu bytes of data.", xfer_size);984 log_msg(LVL_DEBUG, "Received %zu bytes of data.", xfer_size); 991 985 992 986 /* Advance RCV.NXT */ … … 1004 998 tcp_conn_trim_seg_to_wnd(conn, seg); 1005 999 } else { 1006 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: Nothing left in segment, dropping "1000 log_msg(LVL_DEBUG, "%s: Nothing left in segment, dropping " 1007 1001 "(xfer_size=%zu, SEG.LEN=%" PRIu32 ", seg->ctrl=%u)", 1008 1002 conn->name, xfer_size, seg->len, (unsigned int) seg->ctrl); … … 1024 1018 static cproc_t tcp_conn_seg_proc_fin(tcp_conn_t *conn, tcp_segment_t *seg) 1025 1019 { 1026 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)",1020 log_msg(LVL_DEBUG, "%s: tcp_conn_seg_proc_fin(%p, %p)", 1027 1021 conn->name, conn, seg); 1028 log_msg(L OG_DEFAULT, LVL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len,1022 log_msg(LVL_DEBUG, " seg->len=%zu, seg->ctl=%u", (size_t) seg->len, 1029 1023 (unsigned) seg->ctrl); 1030 1024 1031 1025 /* Only process FIN if no text is left in segment. */ 1032 1026 if (tcp_segment_text_size(seg) == 0 && (seg->ctrl & CTL_FIN) != 0) { 1033 log_msg(L OG_DEFAULT, LVL_DEBUG, " - FIN found in segment.");1027 log_msg(LVL_DEBUG, " - FIN found in segment."); 1034 1028 1035 1029 /* Send ACK */ … … 1048 1042 case st_syn_received: 1049 1043 case st_established: 1050 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Close-Wait",1044 log_msg(LVL_DEBUG, "%s: FIN received -> Close-Wait", 1051 1045 conn->name); 1052 1046 tcp_conn_state_set(conn, st_close_wait); 1053 1047 break; 1054 1048 case st_fin_wait_1: 1055 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Closing",1049 log_msg(LVL_DEBUG, "%s: FIN received -> Closing", 1056 1050 conn->name); 1057 1051 tcp_conn_state_set(conn, st_closing); 1058 1052 break; 1059 1053 case st_fin_wait_2: 1060 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: FIN received -> Time-Wait",1054 log_msg(LVL_DEBUG, "%s: FIN received -> Time-Wait", 1061 1055 conn->name); 1062 1056 tcp_conn_state_set(conn, st_time_wait); … … 1097 1091 static void tcp_conn_seg_process(tcp_conn_t *conn, tcp_segment_t *seg) 1098 1092 { 1099 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg);1093 log_msg(LVL_DEBUG, "tcp_conn_seg_process(%p, %p)", conn, seg); 1100 1094 tcp_segment_dump(seg); 1101 1095 … … 1103 1097 /* XXX Permit valid ACKs, URGs and RSTs */ 1104 1098 /* if (!seq_no_segment_acceptable(conn, seg)) { 1105 log_msg(L OG_DEFAULT, LVL_WARN, "Segment not acceptable, dropping.");1099 log_msg(LVL_WARN, "Segment not acceptable, dropping."); 1106 1100 if ((seg->ctrl & CTL_RST) == 0) { 1107 1101 tcp_tqueue_ctrl_seg(conn, CTL_ACK); … … 1137 1131 */ 1138 1132 if (seg->len > 0) { 1139 log_msg(L OG_DEFAULT, LVL_DEBUG, "Re-insert segment %p. seg->len=%zu",1133 log_msg(LVL_DEBUG, "Re-insert segment %p. seg->len=%zu", 1140 1134 seg, (size_t) seg->len); 1141 1135 tcp_iqueue_insert_seg(&conn->incoming, seg); … … 1152 1146 void tcp_conn_segment_arrived(tcp_conn_t *conn, tcp_segment_t *seg) 1153 1147 { 1154 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: tcp_conn_segment_arrived(%p)",1148 log_msg(LVL_DEBUG, "%s: tcp_conn_segment_arrived(%p)", 1155 1149 conn->name, seg); 1156 1150 … … 1171 1165 tcp_conn_sa_queue(conn, seg); break; 1172 1166 case st_closed: 1173 log_msg(L OG_DEFAULT, LVL_DEBUG, "state=%d", (int) conn->cstate);1167 log_msg(LVL_DEBUG, "state=%d", (int) conn->cstate); 1174 1168 assert(false); 1175 1169 } … … 1184 1178 tcp_conn_t *conn = (tcp_conn_t *) arg; 1185 1179 1186 log_msg(L OG_DEFAULT, LVL_DEBUG, "tw_timeout_func(%p)", conn);1180 log_msg(LVL_DEBUG, "tw_timeout_func(%p)", conn); 1187 1181 1188 1182 fibril_mutex_lock(&conn->lock); 1189 1183 1190 1184 if (conn->cstate == st_closed) { 1191 log_msg(L OG_DEFAULT, LVL_DEBUG, "Connection already closed.");1185 log_msg(LVL_DEBUG, "Connection already closed."); 1192 1186 fibril_mutex_unlock(&conn->lock); 1193 1187 tcp_conn_delref(conn); … … 1195 1189 } 1196 1190 1197 log_msg(L OG_DEFAULT, LVL_DEBUG, "%s: TW Timeout -> Closed", conn->name);1191 log_msg(LVL_DEBUG, "%s: TW Timeout -> Closed", conn->name); 1198 1192 tcp_conn_remove(conn); 1199 1193 tcp_conn_state_set(conn, st_closed); … … 1246 1240 void tcp_unexpected_segment(tcp_sockpair_t *sp, tcp_segment_t *seg) 1247 1241 { 1248 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg);1242 log_msg(LVL_DEBUG, "tcp_unexpected_segment(%p, %p)", sp, seg); 1249 1243 1250 1244 if ((seg->ctrl & CTL_RST) == 0) … … 1274 1268 tcp_segment_t *rseg; 1275 1269 1276 log_msg(L OG_DEFAULT, LVL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg);1270 log_msg(LVL_DEBUG, "tcp_reply_rst(%p, %p)", sp, seg); 1277 1271 1278 1272 rseg = tcp_segment_make_rst(seg);
Note:
See TracChangeset
for help on using the changeset viewer.