diff --git a/src/core/ipv4/ip4_frag.c b/src/core/ipv4/ip4_frag.c index 50edd121..8f65b736 100644 --- a/src/core/ipv4/ip4_frag.c +++ b/src/core/ipv4/ip4_frag.c @@ -160,7 +160,7 @@ static int ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev) { u16_t pbufs_freed = 0; - u8_t clen; + u16_t clen; struct pbuf *p; struct ip_reass_helper *iprh; @@ -487,8 +487,7 @@ ip4_reass(struct pbuf *p) struct ip_hdr *fraghdr; struct ip_reassdata *ipr; struct ip_reass_helper *iprh; - u16_t offset, len; - u8_t clen; + u16_t offset, len, clen; IPFRAG_STATS_INC(ip_frag.recv); MIB2_STATS_INC(mib2.ipreasmreqds); diff --git a/src/core/ipv6/ip6_frag.c b/src/core/ipv6/ip6_frag.c index f41d167f..a7e88e4f 100644 --- a/src/core/ipv6/ip6_frag.c +++ b/src/core/ipv6/ip6_frag.c @@ -147,7 +147,7 @@ ip6_reass_free_complete_datagram(struct ip6_reassdata *ipr) { struct ip6_reassdata *prev; u16_t pbufs_freed = 0; - u8_t clen; + u16_t clen; struct pbuf *p; struct ip6_reass_helper *iprh; @@ -262,7 +262,8 @@ ip6_reass(struct pbuf *p) struct ip6_reass_helper *iprh, *iprh_tmp, *iprh_prev=NULL; struct ip6_frag_hdr *frag_hdr; u16_t offset, len; - u8_t clen, valid = 1; + u16_t clen; + u8_t valid = 1; struct pbuf *q; IP6_FRAG_STATS_INC(ip6_frag.recv); diff --git a/src/core/netif.c b/src/core/netif.c index 3f074813..9bbd8246 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -791,7 +791,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p) err_t err; struct pbuf *last; #if LWIP_LOOPBACK_MAX_PBUFS - u8_t clen = 0; + u16_t clen = 0; #endif /* LWIP_LOOPBACK_MAX_PBUFS */ /* If we have a loopif, SNMP counters are adjusted for it, * if not they are adjusted for 'netif'. */ diff --git a/src/core/pbuf.c b/src/core/pbuf.c index a145dffc..b45ea8c9 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -779,10 +779,10 @@ pbuf_free(struct pbuf *p) * @param p first pbuf of chain * @return the number of pbufs in a chain */ -u8_t +u16_t pbuf_clen(struct pbuf *p) { - u8_t len; + u16_t len; len = 0; while (p != NULL) { diff --git a/src/include/lwip/pbuf.h b/src/include/lwip/pbuf.h index bc7296e0..d79d1717 100644 --- a/src/include/lwip/pbuf.h +++ b/src/include/lwip/pbuf.h @@ -231,7 +231,7 @@ u8_t pbuf_header(struct pbuf *p, s16_t header_size); u8_t pbuf_header_force(struct pbuf *p, s16_t header_size); void pbuf_ref(struct pbuf *p); u8_t pbuf_free(struct pbuf *p); -u8_t pbuf_clen(struct pbuf *p); +u16_t pbuf_clen(struct pbuf *p); void pbuf_cat(struct pbuf *head, struct pbuf *tail); void pbuf_chain(struct pbuf *head, struct pbuf *tail); struct pbuf *pbuf_dechain(struct pbuf *p);