summaryrefslogtreecommitdiff
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-03-05 03:38:39 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-03-05 03:38:39 +0000
commit35d1bea9909efe0d68b5369e8bf2ddb433b1c554 (patch)
treedd5b60621c63c4f02d683ab44c4af39760fa7863 /sys/net/if_bridge.c
parented85b29b205624f339c58c7a206c00d21ff93a75 (diff)
Clear ip_sum before calculating IP checksum (closes PR 1667)
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 8b2eba659ad..32f64ae0a8b 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.50 2001/02/06 06:48:08 mickey Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.51 2001/03/05 03:38:38 angelos Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -1929,6 +1929,7 @@ bridge_filter(sc, ifp, eh, m)
ip = mtod(m, struct ip *);
}
+ ip->ip_sum = 0;
if ((ip->ip_sum = in_cksum(m, hlen)) != 0)
goto dropit;
@@ -1961,6 +1962,7 @@ bridge_filter(sc, ifp, eh, m)
HTONS(ip->ip_len);
HTONS(ip->ip_id);
HTONS(ip->ip_off);
+ ip->ip_sum = 0;
ip->ip_sum = in_cksum(m, hlen);
/* Reattach SNAP header */