Protocol checksums have been recalculated on reinjection for a while
authorlteo <lteo@openbsd.org>
Sat, 12 Jul 2014 19:04:29 +0000 (19:04 +0000)
committerlteo <lteo@openbsd.org>
Sat, 12 Jul 2014 19:04:29 +0000 (19:04 +0000)
now, so there is no need to calculate them before sending them to
userspace.

ok henning@

sys/netinet/ip_divert.c
sys/netinet6/ip6_divert.c

index de0a4a4..d87dcd1 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: ip_divert.c,v 1.24 2014/07/12 03:27:00 lteo Exp $ */
+/*      $OpenBSD: ip_divert.c,v 1.25 2014/07/12 19:04:29 lteo Exp $ */
 
 /*
  * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -227,9 +227,6 @@ divert_packet(struct mbuf *m, int dir, u_int16_t divert_port)
                        break;
                }
        }
-       /* force checksum calculation */
-       if (dir == PF_OUT)
-               in_proto_cksum_out(m, NULL);
 
        if (inp) {
                sa = inp->inp_socket;
index c7ab5f8..5efbbd7 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: ip6_divert.c,v 1.25 2014/07/12 03:27:00 lteo Exp $ */
+/*      $OpenBSD: ip6_divert.c,v 1.26 2014/07/12 19:04:29 lteo Exp $ */
 
 /*
  * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -233,9 +233,6 @@ divert6_packet(struct mbuf *m, int dir, u_int16_t divert_port)
                        break;
                }
        }
-       /* force checksum calculation */
-       if (dir == PF_OUT)
-               in6_proto_cksum_out(m, NULL);
 
        if (inp) {
                sa = inp->inp_socket;