Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/netinet



Jun-ichiro itojun Hagino <itojun%NetBSD.org@localhost> writes:

> Module Name:  src
> Committed By: itojun
> Date:         Fri Jun 25 15:43:00 UTC 2004
> 
> Modified Files:
>       src/sys/netinet: ip_icmp.c
> 
> Log Message:
> icmp_reflect: check if m_pkthdr.rcvif is non-NULL before touching it.
> icmp_reflect could be called from the output path, so m_pkthdr.rcvif may not
> be set.  (found by panic when PF is configured "block return all")
> 
> 
> To generate a diff of this commit:
> cvs rdiff -r1.85 -r1.86 src/sys/netinet/ip_icmp.c

Below is a part of above change but the added test will be always
evaluated to true, won't it?

enami.

Index: src/sys/netinet/ip_icmp.c
diff -u src/sys/netinet/ip_icmp.c:1.85 src/sys/netinet/ip_icmp.c:1.86
--- src/sys/netinet/ip_icmp.c:1.85      Fri Jun 25 15:24:41 2004
+++ src/sys/netinet/ip_icmp.c   Fri Jun 25 15:43:00 2004

                :

@@ -836,7 +836,8 @@
        /*      
         * Clear any in-bound checksum flags for this packet.
         */
-       m->m_pkthdr.csum_flags = 0;
+       if (m->m_flags & M_PKTHDR)
+               m->m_pkthdr.csum_flags = 0;
 
        icmp_send(m, opts);
 done:



Home | Main Index | Thread Index | Old Index