diff --git a/src/include/netif/etharp.h b/src/include/netif/etharp.h index ae12726f..83a722f0 100644 --- a/src/include/netif/etharp.h +++ b/src/include/netif/etharp.h @@ -95,8 +95,8 @@ struct ethip_hdr { void etharp_init(void); void etharp_tmr(void); -struct pbuf *etharp_ip_input(struct netif *netif, struct pbuf *p); -struct pbuf *etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, +void etharp_ip_input(struct netif *netif, struct pbuf *p); +void etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p); struct pbuf *etharp_output(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q); diff --git a/src/netif/etharp.c b/src/netif/etharp.c index e6675c08..985d978d 100644 --- a/src/netif/etharp.c +++ b/src/netif/etharp.c @@ -356,7 +356,7 @@ update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *e * * @see pbuf_free() */ -struct pbuf * +void etharp_ip_input(struct netif *netif, struct pbuf *p) { struct ethip_hdr *hdr; @@ -367,13 +367,12 @@ etharp_ip_input(struct netif *netif, struct pbuf *p) /* source is on local network? */ if (!ip_addr_maskcmp(&(hdr->ip.src), &(netif->ip_addr), &(netif->netmask))) { /* do nothing */ - return NULL; + return; } LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_ip_input: updating ETHARP table.\n")); /* update ARP table, ask to insert entry */ update_arp_entry(netif, &(hdr->ip.src), &(hdr->eth.src), ARP_INSERT_FLAG); - return NULL; } @@ -392,7 +391,7 @@ etharp_ip_input(struct netif *netif, struct pbuf *p) * * @see pbuf_free() */ -struct pbuf * +void etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p) { struct etharp_hdr *hdr; @@ -405,7 +404,7 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p) if (p->tot_len < sizeof(struct etharp_hdr)) { LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE | 1, ("etharp_arp_input: packet dropped, too short (%d/%d)\n", p->tot_len, sizeof(struct etharp_hdr))); pbuf_free(p); - return NULL; + return; } hdr = p->payload; @@ -492,9 +491,6 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p) } /* free ARP packet */ pbuf_free(p); - p = NULL; - /* nothing to send, we did it! */ - return NULL; } /**