summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ah_output.c
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2007-06-17 04:12:21 +0000
committermjacob <mjacob@FreeBSD.org>2007-06-17 04:12:21 +0000
commit1ca1128922e891421b42e7ef9089277e1b32222b (patch)
treef5a103e42834ce77a28471ba3b82aebc272fd51a /sys/netinet6/ah_output.c
parentcd743f496af2c7882d684c7fe617cf928a93aa18 (diff)
downloadFreeBSD-src-1ca1128922e891421b42e7ef9089277e1b32222b.zip
FreeBSD-src-1ca1128922e891421b42e7ef9089277e1b32222b.tar.gz
gcc4.2 somehow doesn't believe that finaldst can stay stable between
where it's initialized and where it's checked twice such that the origingal destination address is saved. Make it happier and trim things down a bit.
Diffstat (limited to 'sys/netinet6/ah_output.c')
-rw-r--r--sys/netinet6/ah_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/ah_output.c b/sys/netinet6/ah_output.c
index ae688bc..c58ca0e 100644
--- a/sys/netinet6/ah_output.c
+++ b/sys/netinet6/ah_output.c
@@ -153,7 +153,7 @@ ah4_output(m, isr)
size_t plen = 0; /* AH payload size in bytes */
size_t ahlen = 0; /* plen + sizeof(ah) */
struct ip *ip;
- struct in_addr dst;
+ in_addr_t saveaddr = { 0 };
struct in_addr *finaldst;
int error;
@@ -294,7 +294,7 @@ ah4_output(m, isr)
*/
finaldst = ah4_finaldst(m);
if (finaldst) {
- dst.s_addr = ip->ip_dst.s_addr;
+ saveaddr = ip->ip_dst.s_addr;
ip->ip_dst.s_addr = finaldst->s_addr;
}
@@ -314,7 +314,7 @@ ah4_output(m, isr)
if (finaldst) {
ip = mtod(m, struct ip *); /* just to make sure */
- ip->ip_dst.s_addr = dst.s_addr;
+ ip->ip_dst.s_addr = saveaddr;
}
ipsecstat.out_success++;
ipsecstat.out_ahhist[sav->alg_auth]++;
OpenPOWER on IntegriCloud