diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2012-11-01 07:55:57 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2012-11-01 07:55:57 +0000 |
commit | 3e894385f9270ed9b5e48e20e90bb2039e96480b (patch) | |
tree | 95d1f777b809073048e099140897afb666a2fe8f /sys/netinet/ip_input.c | |
parent | 8b9044e72499aee42f7fe82a72015b3e02b99652 (diff) |
redo most of the protocol (tcp/udp/...) checksum handling
-assume we have hardware checksum offloading. stop mucking with the
checksum in most of the stack
-stop checksum mucking in pf, just set a "needs checksumming" flag if needed
-in all output pathes, very late, if we figure out the outbound interface
doesn't have hw cksum offloading, do the cksum in software. this especially
makes the bridge path behave like a regular output path
-little special casing for bridge still required until the broadcast path
loses its disgusting shortcut hacks, but at least it's in one place now
and not all over the stack
in6_proto_cksum_out mostly written by krw@
started at k2k11 in iceland more than 1.5 years ago - yes it took that
long, this stuff is everything but easy.
this happens to fix the infamous pf rdr bug that made us turn off proto
cksum offloading on almost all interface drivers.
ok camield sthen claudio, testing by many, thanks!
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 94cc70b060e..efaa96609bc 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.198 2012/09/18 12:35:51 blambert Exp $ */ +/* $OpenBSD: ip_input.c,v 1.199 2012/11/01 07:55:56 henning Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -500,6 +500,9 @@ ipv4_input(struct mbuf *m) return; ours: + /* pf might have modified stuff, might have to chksum */ + in_proto_cksum_out(m, NULL); + /* * If offset or IP_MF are set, must reassemble. * Otherwise, nothing need be done. |