if_stf: Free entire mbuf chain on failure
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: markj, bz, kp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57476
This commit is contained in:
+2
-2
@@ -801,13 +801,13 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg)
|
||||
*/
|
||||
nh = fib6_lookup(sc->sc_fibnum, &ip6->ip6_dst, 0, 0, 0);
|
||||
if (nh == NULL) {
|
||||
m_free(m);
|
||||
m_freem(m);
|
||||
SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__);
|
||||
return (IPPROTO_DONE);
|
||||
}
|
||||
if ((nh->nh_ifp == ifp) &&
|
||||
(!IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &nh->gw6_sa.sin6_addr))) {
|
||||
m_free(m);
|
||||
m_freem(m);
|
||||
SDT_PROBE2(if_stf, , stf_input, out, IPPROTO_DONE, __LINE__);
|
||||
return (IPPROTO_DONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user