https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243675
Bug ID: 243675
Summary: IPv6 checksum is wrong in output packets with
extension headers
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Created attachment 211135
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=211135&action=edit
fix
sys/netinet6/ip6_output.c ip6_output() lines ~1000
'sw_csum &= ~CSUM_DELAY_DATA_IPV6;' does not make sense as the 'sw_csum'
variable is not used after. Obviously it should be replaced by
'm->m_pkthdr.csum_flags'.
'in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr));' plen includes the
extension headers so it should be 'plen - option', the start point should be
'sizeof(struct ip6_hdr) + option' i.e. the in6_delayed_cksum() call should be:
'in6_delayed_cksum(m, plen - optlen,
sizeof(struct ip6_hdr) + optlen);'
I suspect a similar issue with SCTP code lines ~1018
I left line 1029:
`m->m_pkthdr.csum_flags &= ifp->if_hwassist;`
which seems to have no effect (nor sense).
The in6_delayed_cksum() call line 1119 should be fixed the same way (and SCTP
code just after too).
I am attaching a diff and a small program triggering the bug (it makes checksum
errors on the target and/or tcpdump on outgoing traffic).
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"