diff --git a/main.cpp b/main.cpp index c325255..3f3a913 100755 --- a/main.cpp +++ b/main.cpp @@ -402,7 +402,8 @@ struct conn_manager_t } else { - assert(erase_it->second==0); + assert(erase_it->second->anti_replay==0); + assert(erase_it->second->conv_manager==0); assert(erase_it->second->timer_fd ==0); assert(erase_it->second->oppsite_const_id==0); } @@ -1547,7 +1548,7 @@ int server_on_raw_pre_ready(conn_info_t &conn_info,char * data,int data_len) //mylog(log_debug,"!!!\n"); - if(data_len<=int(sizeof(id_t)*3)) + if(data_lenid = htonl (ip_id++); //Id of this packet // iph->id = 0; //Id of this packet ,kernel will auto fill this if id is zero iph->frag_off = htons(0x4000); //DF set,others are zero + // iph->frag_off = htons(0x0000); //DF set,others are zero iph->ttl = 64; iph->protocol = send_info.protocol; iph->check = 0; //Set to 0 before calculating checksum @@ -290,6 +291,7 @@ int send_raw_ip(raw_info_t &raw_info,const char * payload,int payloadlen) if(ret==-1) { mylog(log_debug,"sendto failed\n"); + //perror("why?"); return -1; } return 0;