summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_esp_new.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-09-28 22:57:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-09-28 22:57:53 +0000
commitf63706bd1cf47e17c8e7342d056f58913a793f93 (patch)
tree4dbf5cb91c5f7517539c49c4bf5aded927bfac6d /sys/netinet/ip_esp_new.c
parent034ca25af4edc1172a6b59c0632fbc78c5e9e940 (diff)
log() needs a \n
Diffstat (limited to 'sys/netinet/ip_esp_new.c')
-rw-r--r--sys/netinet/ip_esp_new.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/sys/netinet/ip_esp_new.c b/sys/netinet/ip_esp_new.c
index cf34d6b85ef..3df20e5d4fc 100644
--- a/sys/netinet/ip_esp_new.c
+++ b/sys/netinet/ip_esp_new.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp_new.c,v 1.5 1997/09/24 18:39:40 angelos Exp $ */
+/* $OpenBSD: ip_esp_new.c,v 1.6 1997/09/28 22:57:47 deraadt Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -112,7 +112,7 @@ esp_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m)
em = mtod(m, struct encap_msghdr *);
if (em->em_msglen - EMT_SETSPI_FLEN <= ESP_NEW_XENCAP_LEN)
{
- log(LOG_WARNING, "esp_new_init(): initialization failed");
+ log(LOG_WARNING, "esp_new_init(): initialization failed\n");
return EINVAL;
}
@@ -132,7 +132,7 @@ esp_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m)
break;
default:
- log(LOG_WARNING, "esp_new_init(): unsupported encryption algorithm %d specified", txd.edx_enc_algorithm);
+ log(LOG_WARNING, "esp_new_init(): unsupported encryption algorithm %d specified\n", txd.edx_enc_algorithm);
return EINVAL;
}
@@ -150,14 +150,14 @@ esp_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m)
break;
default:
- log(LOG_WARNING, "esp_new_init(): unsupported authentication algorithm %d specified", txd.edx_enc_algorithm);
+ log(LOG_WARNING, "esp_new_init(): unsupported authentication algorithm %d specified\n", txd.edx_enc_algorithm);
return EINVAL;
}
if (txd.edx_ivlen + txd.edx_keylen + EMT_SETSPI_FLEN + ESP_NEW_XENCAP_LEN
!= em->em_msglen)
{
- log(LOG_WARNING, "esp_new_init(): message length (%d) doesn't match",
+ log(LOG_WARNING, "esp_new_init(): message length (%d) doesn't match\n",
em->em_msglen);
return EINVAL;
}
@@ -167,14 +167,14 @@ esp_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m)
case ALG_ENC_DES:
if ((txd.edx_ivlen != 0) && (txd.edx_ivlen != 8))
{
- log(LOG_WARNING, "esp_new_init(): unsupported IV length %d",
+ log(LOG_WARNING, "esp_new_init(): unsupported IV length %d\n",
txd.edx_ivlen);
return EINVAL;
}
if (txd.edx_keylen < 8)
{
- log(LOG_WARNING, "esp_new_init(): bad key length",
+ log(LOG_WARNING, "esp_new_init(): bad key length\n",
txd.edx_keylen);
return EINVAL;
}
@@ -185,14 +185,14 @@ esp_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m)
case ALG_ENC_3DES:
if ((txd.edx_ivlen != 0) && (txd.edx_ivlen != 8))
{
- log(LOG_WARNING, "esp_new_init(): unsupported IV length %d",
+ log(LOG_WARNING, "esp_new_init(): unsupported IV length %d\n",
txd.edx_ivlen);
return EINVAL;
}
if (txd.edx_keylen < 24)
{
- log(LOG_WARNING, "esp_new_init(): bad key length",
+ log(LOG_WARNING, "esp_new_init(): bad key length\n",
txd.edx_keylen);
return EINVAL;
}
@@ -391,7 +391,7 @@ esp_new_input(struct mbuf *m, struct tdb *tdb)
default:
log(LOG_ALERT,
- "esp_new_input(): unsupported algorithm %d in SA %x/%08x",
+ "esp_new_input(): unsupported algorithm %d in SA %x/%08x\n",
xd->edx_enc_algorithm, tdb->tdb_dst, ntohl(tdb->tdb_spi));
m_freem(m);
return NULL;
@@ -407,9 +407,7 @@ esp_new_input(struct mbuf *m, struct tdb *tdb)
break;
default:
- log(LOG_ALERT,
- "esp_new_input(): unsupported algorithm %d in SA %x/%08x",
- xd->edx_hash_algorithm, tdb->tdb_dst,
+ log(LOG_ALERT, "esp_new_input(): unsupported algorithm %d in SA %x/%08x\n", xd->edx_hash_algorithm, tdb->tdb_dst,
ntohl(tdb->tdb_spi));
m_freem(m);
return NULL;
@@ -480,7 +478,7 @@ esp_new_input(struct mbuf *m, struct tdb *tdb)
case 2:
case 3:
- log(LOG_WARNING, "esp_new_input(): duplicate packet received, %x->%x spi %08x", ip->ip_src, ip->ip_dst, ntohl(esp->esp_spi));
+ log(LOG_WARNING, "esp_new_input(): duplicate packet received, %x->%x spi %08x\n", ip->ip_src, ip->ip_dst, ntohl(esp->esp_spi));
espstat.esps_replay++;
break;
}
@@ -593,7 +591,7 @@ esp_new_input(struct mbuf *m, struct tdb *tdb)
if (bcmp(buf2, buf, AH_HMAC_HASHLEN))
{
log(LOG_ALERT,
- "esp_new_input(): authentication failed for packet from %x to %x, spi %08x", ip->ip_src, ip->ip_dst, ntohl(esp->esp_spi));
+ "esp_new_input(): authentication failed for packet from %x to %x, spi %08x\n", ip->ip_src, ip->ip_dst, ntohl(esp->esp_spi));
espstat.esps_badauth++;
m_freem(m);
return NULL;
@@ -848,7 +846,7 @@ esp_new_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
default:
log(LOG_ALERT,
- "esp_new_output(): unsupported algorithm %d in SA %x/%08x",
+ "esp_new_output(): unsupported algorithm %d in SA %x/%08x\n",
xd->edx_enc_algorithm, tdb->tdb_dst, ntohl(tdb->tdb_spi));
m_freem(m);
return NULL;
@@ -869,9 +867,7 @@ esp_new_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
break;
default:
- log(LOG_ALERT,
- "esp_new_output(): unsupported algorithm %d in SA %x/%08x",
- xd->edx_hash_algorithm, tdb->tdb_dst, ntohl(tdb->tdb_spi));
+ log(LOG_ALERT, "esp_new_output(): unsupported algorithm %d in SA %x/%08x\n", xd->edx_hash_algorithm, tdb->tdb_dst, ntohl(tdb->tdb_spi));
m_freem(m);
return NULL;
}
@@ -894,7 +890,7 @@ esp_new_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb,
if (xd->edx_rpl == 0)
{
- log(LOG_ALERT, "esp_new_output(): SA %x/%0x8 should have expired",
+ log(LOG_ALERT, "esp_new_output(): SA %x/%0x8 should have expired\n",
tdb->tdb_dst, ntohl(tdb->tdb_spi));
m_freem(m);
espstat.esps_wrap++;