summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_esp.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-07-18 18:09:58 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-07-18 18:09:58 +0000
commit5c841e2e44dee0e75bec0ca258f8235459b24571 (patch)
tree5d7918172e3eb7c581a2c3d22d2f7d023243e0a7 /sys/netinet/ip_esp.c
parent5a2ebd803573a4dc2e2db4e00d5beb1a99884efd (diff)
enablespi/disablespi in encap + print spi's in hostorder
Diffstat (limited to 'sys/netinet/ip_esp.c')
-rw-r--r--sys/netinet/ip_esp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c
index 064e49e5999..d7cac3c9359 100644
--- a/sys/netinet/ip_esp.c
+++ b/sys/netinet/ip_esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.c,v 1.8 1997/07/11 23:37:56 provos Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.9 1997/07/18 18:09:54 provos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -108,7 +108,7 @@ esp_input(register struct mbuf *m, int iphlen)
tdbp = gettdb(spi, ipo->ip_dst, IPPROTO_ESP);
if (tdbp == NULL)
{
- log(LOG_ERR, "esp_input(): could not find SA for ESP packet from %x to %x, spi %08x", ipo->ip_src, ipo->ip_dst, spi);
+ log(LOG_ERR, "esp_input(): could not find SA for ESP packet from %x to %x, spi %08x", ipo->ip_src, ipo->ip_dst, ntohl(spi));
m_freem(m);
espstat.esps_notdb++;
return;
@@ -118,7 +118,7 @@ esp_input(register struct mbuf *m, int iphlen)
{
log(LOG_ALERT,
"esp_input(): attempted to use invalid ESP SA %08x, packet %x->%x",
- spi, ipo->ip_src, ipo->ip_dst);
+ ntohl(spi), ipo->ip_src, ipo->ip_dst);
m_freem(m);
espstat.esps_invalid++;
return;
@@ -126,7 +126,7 @@ esp_input(register struct mbuf *m, int iphlen)
if (tdbp->tdb_xform == NULL)
{
- log(LOG_ALERT, "esp_input(): attempted to use uninitialized ESP SA %08x, packet from %x to %x", spi, ipo->ip_src, ipo->ip_dst);
+ log(LOG_ALERT, "esp_input(): attempted to use uninitialized ESP SA %08x, packet from %x to %x", ntohl(spi), ipo->ip_src, ipo->ip_dst);
m_freem(m);
espstat.esps_noxform++;
return;
@@ -144,7 +144,7 @@ esp_input(register struct mbuf *m, int iphlen)
if (m == NULL)
{
- log(LOG_ALERT, "esp_input(): processing failed for ESP packet from %x to %x, spi %08x", ipn.ip_src, ipn.ip_dst, spi);
+ log(LOG_ALERT, "esp_input(): processing failed for ESP packet from %x to %x, spi %08x", ipn.ip_src, ipn.ip_dst, ntohl(spi));
espstat.esps_badkcr++;
return;
}