/*
* Cut off the snapshot length to the end of the IP payload.
*/
- nd_push_snapend(ndo, bp + len);
+ if (!nd_push_snaplen(ndo, bp, len)) {
+ (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC,
+ "%s: can't push snaplen on buffer stack", __func__);
+ }
cp = (const u_char *)ip6;
advance = sizeof(struct ip6_hdr);
if (length < len)
ND_PRINT("truncated-ip6 - %u bytes missing!",
len - length);
- nd_change_snapend(ndo, bp + len);
+ nd_change_snaplen(ndo, bp, len);
/*
* Now subtract the length of the IPv6
* accordingly.
*/
len = sizeof(struct ip6_hdr);
- nd_change_snapend(ndo, bp + len);
+ nd_change_snaplen(ndo, bp, len);
/*
* Now subtract the length of