Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177553154
D61509.1794700504.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
929 B
Referenced Files
None
Subscribers
None
D61509.1794700504.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 11:55 PM (19 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41725769
Default Alt Text
D61509.1794700504.diff (929 B)
Attached To
Mode
D61509: ip6_forward: Free the ICMPv6 copy on all error paths
Attached
Detach File
Event Timeline