Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netipsec/ipsec_output.c
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | #endif /* INET6 */ | ||||
} | } | ||||
tdbi = (struct tdb_ident *)(mtag + 1); | tdbi = (struct tdb_ident *)(mtag + 1); | ||||
tdbi->dst = saidx->dst; | tdbi->dst = saidx->dst; | ||||
tdbi->proto = saidx->proto; | tdbi->proto = saidx->proto; | ||||
tdbi->spi = sav->spi; | tdbi->spi = sav->spi; | ||||
m_tag_prepend(m, mtag); | m_tag_prepend(m, mtag); | ||||
key_sa_recordxfer(sav, m); /* record data transfer */ | |||||
/* | /* | ||||
* If there's another (bundled) SA to apply, do so. | * If there's another (bundled) SA to apply, do so. | ||||
* Note that this puts a burden on the kernel stack size. | * Note that this puts a burden on the kernel stack size. | ||||
* If this is a problem we'll need to introduce a queue | * If this is a problem we'll need to introduce a queue | ||||
* to set the packet on so we can unwind the stack before | * to set the packet on so we can unwind the stack before | ||||
* doing further processing. | * doing further processing. | ||||
* | * | ||||
* If ipsec[46]_process_packet() will successfully queue | * If ipsec[46]_process_packet() will successfully queue | ||||
Show All 28 Lines | |||||
#endif | #endif | ||||
default: | default: | ||||
DPRINTF(("%s: unknown protocol family %u\n", __func__, | DPRINTF(("%s: unknown protocol family %u\n", __func__, | ||||
saidx->dst.sa.sa_family)); | saidx->dst.sa.sa_family)); | ||||
error = ENXIO; | error = ENXIO; | ||||
goto bad; | goto bad; | ||||
} | } | ||||
} | } | ||||
key_sa_recordxfer(sav, m); /* record data transfer */ | |||||
/* | /* | ||||
* We're done with IPsec processing, transmit the packet using the | * We're done with IPsec processing, transmit the packet using the | ||||
* appropriate network protocol (IP or IPv6). | * appropriate network protocol (IP or IPv6). | ||||
*/ | */ | ||||
switch (saidx->dst.sa.sa_family) { | switch (saidx->dst.sa.sa_family) { | ||||
#ifdef INET | #ifdef INET | ||||
case AF_INET: | case AF_INET: | ||||
▲ Show 20 Lines • Show All 556 Lines • Show Last 20 Lines |