From 45451927ecc2c23ed0130c34c5065c02de60c4d7 Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 10 Apr 2002 09:18:57 +0000 Subject: [PATCH] correct variable initialization. reported by fujitsu folks --- sys/netinet/ip_ecn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_ecn.c b/sys/netinet/ip_ecn.c index 23777bac28e3..4565bab426ca 100644 --- a/sys/netinet/ip_ecn.c +++ b/sys/netinet/ip_ecn.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_ecn.c,v 1.11 2001/11/13 00:32:36 lukem Exp $ */ +/* $NetBSD: ip_ecn.c,v 1.12 2002/04/10 09:18:57 itojun Exp $ */ /* $KAME: ip_ecn.c,v 1.11 2001/05/03 16:09:29 itojun Exp $ */ /* @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_ecn.c,v 1.11 2001/11/13 00:32:36 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_ecn.c,v 1.12 2002/04/10 09:18:57 itojun Exp $"); #include "opt_inet.h" @@ -115,6 +115,7 @@ ip6_ecn_ingress(mode, outer, inner) if (!outer || !inner) panic("NULL pointer passed to ip6_ecn_ingress"); + outer8 = (ntohl(*outer) >> 20) & 0xff; inner8 = (ntohl(*inner) >> 20) & 0xff; ip_ecn_ingress(mode, &outer8, &inner8); *outer &= ~htonl(0xff << 20); @@ -133,6 +134,7 @@ ip6_ecn_egress(mode, outer, inner) panic("NULL pointer passed to ip6_ecn_egress"); outer8 = (ntohl(*outer) >> 20) & 0xff; + inner8 = (ntohl(*inner) >> 20) & 0xff; ip_ecn_egress(mode, &outer8, &inner8); *inner &= ~htonl(0xff << 20); *inner |= htonl((u_int32_t)inner8 << 20);