While digging on the mentioned earlier amd64 route-to/reply-to issue, I 
came up with two small patches; hope they are not too stupid. The first 
patch is about unneeded operation - the "if" clause above already makes 
sure that m->m_pkthdr.csum_flags does not have M_IPV4_CSUM_IN_OK flag 
set. The second one says its all.

-- 
  Best wishes,
    Vadim Zhukov

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?


Index: netinet/ip_input.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.171
diff -u -p -r1.171 ip_input.c
--- netinet/ip_input.c  23 Aug 2009 20:06:25 -0000      1.171
+++ netinet/ip_input.c  17 Sep 2009 23:52:37 -0000
@@ -319,10 +319,8 @@ ipv4_input(m)
                        ipstat.ips_badsum++;
                        goto bad;
                }
-       } else {
-               m->m_pkthdr.csum_flags &= ~M_IPV4_CSUM_IN_OK;
+       } else
                ipstat.ips_inhwcsum++;
-       }
 
        /* Retrieve the packet length. */
        len = ntohs(ip->ip_len);
Index: net/pf.c
===================================================================
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.660
diff -u -p -r1.660 pf.c
--- net/pf.c    8 Sep 2009 17:52:17 -0000       1.660
+++ net/pf.c    17 Sep 2009 23:52:38 -0000
@@ -5356,7 +5356,7 @@ pf_test(int dir, struct ifnet *ifp, stru
        if (!pf_status.running)
                return (PF_PASS);
 
-       memset(&pd, 0, sizeof(pd));
+       bzero(&pd, sizeof(pd));
        if (ifp->if_type == IFT_CARP && ifp->if_carpdev)
                kif = (struct pfi_kif *)ifp->if_carpdev->if_pf_kif;
        else

Reply via email to