Page MenuHomeFreeBSD

D61509.1794700533.diff
No OneTemporary

Authored By
Unknown
Size
929 B
Referenced Files
None
Subscribers
None

D61509.1794700533.diff

diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -253,6 +253,7 @@
if (inzone != outzone) {
IP6STAT_INC(ip6s_cantforward);
IP6STAT_INC(ip6s_badscope);
+ m_freem(mcopy);
goto bad;
}
@@ -362,7 +363,7 @@
m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
#endif
error = netisr_queue(NETISR_IPV6, m);
- goto out;
+ goto freecopy;
}
/* Or forward to some other address? */
if ((m->m_flags & M_IP6_NEXTHOP) &&
@@ -400,8 +401,11 @@
~nh->nh_ifp->if_hwassist)) {
int offset = ip6_lasthdr(m, 0, IPPROTO_IPV6, NULL);
- if (offset < sizeof(struct ip6_hdr) || offset > m->m_pkthdr.len)
+ if (offset < sizeof(struct ip6_hdr) ||
+ offset > m->m_pkthdr.len) {
+ m_freem(mcopy);
goto bad;
+ }
in6_delayed_cksum(m, m->m_pkthdr.len - offset, offset);
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 14, 11:55 PM (19 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41725769
Default Alt Text
D61509.1794700533.diff (929 B)

Event Timeline