95 |
{ |
{ |
96 |
if(ip_reasstmr > 1) { |
if(ip_reasstmr > 1) { |
97 |
ip_reasstmr--; |
ip_reasstmr--; |
98 |
sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL); |
sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL); |
99 |
} else if(ip_reasstmr == 1) |
} else if(ip_reasstmr == 1) |
100 |
ip_reasstmr = 0; |
ip_reasstmr = 0; |
101 |
} |
} |
121 |
DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n")); |
DEBUGF(IP_REASS_DEBUG, ("ip_reass: new packet\n")); |
122 |
memcpy(iphdr, fraghdr, IP_HLEN); |
memcpy(iphdr, fraghdr, IP_HLEN); |
123 |
ip_reasstmr = IP_REASS_MAXAGE; |
ip_reasstmr = IP_REASS_MAXAGE; |
124 |
sys_timeout(IP_REASS_TMO, (sys_timeout_handler) ip_reass_timer, NULL); |
sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL); |
125 |
ip_reassflags = 0; |
ip_reassflags = 0; |
126 |
/* Clear the bitmap. */ |
/* Clear the bitmap. */ |
127 |
memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap)); |
memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap)); |
148 |
DEBUGF(IP_REASS_DEBUG, |
DEBUGF(IP_REASS_DEBUG, |
149 |
("ip_reass: fragment outside of buffer (%d:%d/%d).\n", offset, |
("ip_reass: fragment outside of buffer (%d:%d/%d).\n", offset, |
150 |
offset + len, IP_REASS_BUFSIZE)); |
offset + len, IP_REASS_BUFSIZE)); |
151 |
sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL); |
sys_untimeout(ip_reass_timer, NULL); |
152 |
ip_reasstmr = 0; |
ip_reasstmr = 0; |
153 |
goto nullreturn; |
goto nullreturn; |
154 |
} |
} |
236 |
/* If we have come this far, we have a full packet in the |
/* If we have come this far, we have a full packet in the |
237 |
buffer, so we allocate a pbuf and copy the packet into it. We |
buffer, so we allocate a pbuf and copy the packet into it. We |
238 |
also reset the timer. */ |
also reset the timer. */ |
239 |
sys_timeout_remove((sys_timeout_handler) ip_reass_timer, NULL); |
sys_untimeout(ip_reass_timer, NULL); |
240 |
ip_reasstmr = 0; |
ip_reasstmr = 0; |
241 |
pbuf_free(p); |
pbuf_free(p); |
242 |
p = pbuf_alloc(PBUF_LINK, ip_reasslen, PBUF_POOL); |
p = pbuf_alloc(PBUF_LINK, ip_reasslen, PBUF_POOL); |