diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1997-07-18 18:09:58 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1997-07-18 18:09:58 +0000 |
commit | 5c841e2e44dee0e75bec0ca258f8235459b24571 (patch) | |
tree | 5d7918172e3eb7c581a2c3d22d2f7d023243e0a7 /sys/netinet/ip_output.c | |
parent | 5a2ebd803573a4dc2e2db4e00d5beb1a99884efd (diff) |
enablespi/disablespi in encap + print spi's in hostorder
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 680ef7efdbd..2b155ffde0d 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.17 1997/07/14 08:45:55 provos Exp $ */ +/* $OpenBSD: ip_output.c,v 1.18 1997/07/18 18:09:57 provos Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -227,6 +227,13 @@ ip_output(m0, va_alist) tdb = (struct tdb *) gettdb(gw->sen_ipsp_spi, gw->sen_ipsp_dst, gw->sen_ipsp_sproto); +#ifdef ENCDEBUG + if (encdebug && (tdb == NULL)) + printf("ip_output(): non-existant TDB for SA %08x/%x/%d\n", + ntohl(gw->sen_ipsp_spi), gw->sen_ipsp_dst, + gw->sen_ipsp_sproto); +#endif ENCDEBUG + /* Fix the ip_src field if necessary */ if ((ip->ip_src.s_addr == INADDR_ANY) && tdb) ip->ip_src = tdb->tdb_src; @@ -244,7 +251,7 @@ ip_output(m0, va_alist) /* Check if the SPI is invalid */ if (tdb->tdb_flags & TDBF_INVALID) { - log(LOG_ALERT, "ip_output(): attempt to use invalid SA %x/%08x/%x", tdb->tdb_dst, tdb->tdb_spi, tdb->tdb_sproto); + log(LOG_ALERT, "ip_output(): attempt to use invalid SA %08x/%x/%x", ntohl(tdb->tdb_spi), tdb->tdb_dst, tdb->tdb_sproto); m_freem(m); RTFREE(re->re_rt); return ENXIO; |