/[lwip]/lwip/src/core/udp.c
ViewVC logotype

Diff of /lwip/src/core/udp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by likewise, Wed Apr 16 07:39:48 2003 UTC revision 1.38 by likewise, Thu May 1 08:03:51 2003 UTC
# Line 175  udp_input(struct pbuf *p, struct netif * Line 175  udp_input(struct pbuf *p, struct netif *
175    
176    iphdr = p->payload;    iphdr = p->payload;
177    
178    pbuf_header(p, -((s16_t)(UDP_HLEN + IPH_HL(iphdr) * 4)));    if (pbuf_header(p, -((s16_t)(UDP_HLEN + IPH_HL(iphdr) * 4)))) {
179        /* drop short packets */
180              DEBUGF(UDP_DEBUG, ("udp_input: short UDP datagram (%u bytes) discarded\n", p->tot_len));
181    #ifdef UDP_STATS
182            ++lwip_stats.udp.lenerr;
183            ++lwip_stats.udp.drop;
184    #endif /* UDP_STATS */
185        snmp_inc_udpinerrors();
186            pbuf_free(p);
187            goto end;
188      }
189    
190    udphdr = (struct udp_hdr *)((u8_t *)p->payload - UDP_HLEN);    udphdr = (struct udp_hdr *)((u8_t *)p->payload - UDP_HLEN);
191        

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26