Skip to content

Commit c819814

Browse files
authored
Merge pull request #5476 from willmmiles/ipv6-filter-oops
Fix leak in blockRouterAdvertisements
2 parents 51862e3 + 0ef5ee7 commit c819814

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

wled00/network.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ bool isWiFiConfigured() {
377377
static u8_t blockRouterAdvertisements(void* arg, struct raw_pcb* pcb, struct pbuf* p, const ip_addr_t* addr) {
378378
// ICMPv6 type is the first byte of the payload, so we skip the header
379379
if (p->len > 0 && (pbuf_get_at(p, sizeof(struct ip6_hdr)) == ICMP6_TYPE_RA)) {
380+
pbuf_free(p);
380381
return 1; // claim the packet — lwIP will not pass it further
381382
}
382383
return 0; // not consumed, pass it on

0 commit comments

Comments
 (0)