| Summary: | [ipfw] [ipv6] ICMPv6 echo replies incorrectly matched by kernel ipfw | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Eugene Grosbein <eugen> | ||||
| Component: | kern | Assignee: | Andrey V. Elsukov <ae> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Some People | CC: | ae, glebius, ipfw | ||||
| Priority: | --- | ||||||
| Version: | 11.1-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Eugene Grosbein
2018-04-21 18:34:26 UTC
Created attachment 192745 [details]
Proposed patch
(In reply to Andrey V. Elsukov from comment #1) It works, thanks! Please commit. A commit references this bug: Author: ae Date: Mon Apr 23 12:20:08 UTC 2018 New revision: 332886 URL: https://svnweb.freebsd.org/changeset/base/332886 Log: icmp6_reflect() sends ICMPv6 message with new IPv6 header. So, it is considered as originated by our host packet. And thus rcvif should be NULL, since it is used by ipfw(4) to determine that packet was originated from this host. Some of icmp6_reflect() consumers reuse mbuf and m_pkthdr without resetting rcvif pointer. To avoid this always reset m_pkthdr.rcvif pointer to NULL in icmp6_reflect(). Also remove such line and comment describing this from icmp6_error(), since it does not longer matters. PR: 227674 Reported by: eugen MFC after: 1 week Changes: head/sys/netinet6/icmp6.c A commit references this bug: Author: ae Date: Thu May 3 08:15:32 UTC 2018 New revision: 333206 URL: https://svnweb.freebsd.org/changeset/base/333206 Log: MFC r332886: icmp6_reflect() sends ICMPv6 message with new IPv6 header. So, it is considered as originated by our host packet. And thus rcvif should be NULL, since it is used by ipfw(4) to determine that packet was originated from this host. Some of icmp6_reflect() consumers reuse mbuf and m_pkthdr without resetting rcvif pointer. To avoid this always reset m_pkthdr.rcvif pointer to NULL in icmp6_reflect(). Also remove such line and comment describing this from icmp6_error(), since it does not longer matters. PR: 227674 Changes: _U stable/11/ stable/11/sys/netinet6/icmp6.c (In reply to Andrey V. Elsukov from comment #1) Have you any plans to merge this to stable/10 ? (In reply to Eugene Grosbein from comment #5) > (In reply to Andrey V. Elsukov from comment #1) > > Have you any plans to merge this to stable/10 ? If you are able to test it on stable/10, feel free to commit it. |