summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_esp_old.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-22 01:23:34 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-22 01:23:34 +0000
commit8b617ad77948342faf0917e268e4d001047fec35 (patch)
treedd116cd81cb2f451314a8140d49159b494396619 /sys/netinet/ip_esp_old.c
parentd14a3197eff39aeb2d1cf2c146a4a56ae0087f59 (diff)
Changes made for GCC 2.8 -Wall pleasures
Diffstat (limited to 'sys/netinet/ip_esp_old.c')
-rw-r--r--sys/netinet/ip_esp_old.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/netinet/ip_esp_old.c b/sys/netinet/ip_esp_old.c
index 7c4466bb09a..4a131b284f8 100644
--- a/sys/netinet/ip_esp_old.c
+++ b/sys/netinet/ip_esp_old.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp_old.c,v 1.13 1998/02/03 19:06:29 deraadt Exp $ */
+/* $OpenBSD: ip_esp_old.c,v 1.14 1998/02/22 01:23:32 niklas Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -501,6 +501,7 @@ esp_old_input(struct mbuf *m, struct tdb *tdb)
/* Notify on expiration */
if (tdb->tdb_flags & TDBF_SOFT_PACKETS)
+ {
if (tdb->tdb_cur_packets >= tdb->tdb_soft_packets)
{
encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
@@ -513,8 +514,10 @@ esp_old_input(struct mbuf *m, struct tdb *tdb)
encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
tdb->tdb_flags &= ~TDBF_SOFT_BYTES;
}
-
+ }
+
if (tdb->tdb_flags & TDBF_PACKETS)
+ {
if (tdb->tdb_cur_packets >= tdb->tdb_exp_packets)
{
encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
@@ -527,7 +530,8 @@ esp_old_input(struct mbuf *m, struct tdb *tdb)
encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
tdb_delete(tdb, 0);
}
-
+ }
+
return m;
}
@@ -750,6 +754,7 @@ esp_old_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
/* Notify on expiration */
if (tdb->tdb_flags & TDBF_SOFT_PACKETS)
+ {
if (tdb->tdb_cur_packets >= tdb->tdb_soft_packets)
{
encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
@@ -762,8 +767,10 @@ esp_old_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
encap_sendnotify(NOTIFY_SOFT_EXPIRE, tdb);
tdb->tdb_flags &= ~TDBF_SOFT_BYTES;
}
-
+ }
+
if (tdb->tdb_flags & TDBF_PACKETS)
+ {
if (tdb->tdb_cur_packets >= tdb->tdb_exp_packets)
{
encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
@@ -776,6 +783,7 @@ esp_old_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
encap_sendnotify(NOTIFY_HARD_EXPIRE, tdb);
tdb_delete(tdb, 0);
}
+ }
return 0;
}