VirtualBox

儲存庫 vbox 的更動 17145


忽略:
時間撮記:
2009-2-26 上午09:11:32 (16 年 以前)
作者:
vboxsync
訊息:

NAT: preventing attempt of double ICMP packet sends, causing crash.

位置:
trunk/src/VBox/Devices/Network/slirp
檔案:
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Network/slirp/ip_icmp.c

    r16653 r17145  
    252252    if (found == 1 && icm == NULL)
    253253    {
     254        if (so->so_state == SS_NOFDREF)
     255        {
     256            /* socket is shutdowning we've already sent ICMP on it.*/
     257            LogRel(("NAT: Received icmp on shutdowning socket (probably corresponding ICMP socket has been already sent)\n"));
     258            return NULL;
     259        }
    254260        icm = RTMemAlloc(sizeof(struct icmp_msg));
    255261        icm->im_m = so->so_m;
     
    390396                                    errno, strerror(errno)));
    391397                        icmp_error(pData, m, ICMP_UNREACH,ICMP_UNREACH_NET, 0, strerror(errno));
    392                         m_free(pData, m);
    393398                    }
    394399                }
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r16816 r17145  
    550550            Log2((dfd," rx error, tx icmp ICMP_UNREACH:%i\n", code));
    551551            icmp_error(pData, so->so_m, ICMP_UNREACH,code, 0,strerror(errno));
     552            so->so_m = NULL;
    552553            m_free(pData, m);
    553554        }
     
    10131014                code = (code != ~0 ? code : ICMP_UNREACH_PORT);
    10141015                icmp_error(pData, so->so_m, ICMP_UNREACH, code, 0, "Error occurred!!!");
     1016                so->so_m = NULL;
    10151017                break;
    10161018            case IP_SUCCESS: /* echo replied */
     
    10971099                    errno,strerror(errno)));
    10981100        icmp_error(pData, so->so_m, ICMP_UNREACH,code, 0,strerror(errno));
     1101        so->so_m = NULL;
    10991102    }
    11001103    else
  • trunk/src/VBox/Devices/Network/slirp/tcp_input.c

    r16450 r17145  
    762762                    *ip = save_ip;
    763763                    icmp_error(pData, m, ICMP_UNREACH,code, 0,strerror(errno));
     764                    tp->t_socket->so_m = NULL;
    764765                }
    765766                tp = tcp_close(pData, tp);
  • trunk/src/VBox/Devices/Network/slirp/udp.c

    r17056 r17145  
    252252        DEBUG_MISC((dfd,"udp tx errno = %d-%s\n", errno, strerror(errno)));
    253253        icmp_error(pData, m, ICMP_UNREACH,ICMP_UNREACH_NET, 0, strerror(errno));
     254        /* in case we receive ICMP on this socket we'll aware that ICMP has been already sent to host*/
     255        so->so_m = NULL;
    254256    }
    255257
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette