summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2004-02-03 18:20:55 +0000
committerume <ume@FreeBSD.org>2004-02-03 18:20:55 +0000
commitde3407d02868da17b84be20a37bee2f9d4b5ad99 (patch)
treed4a15c08d97fd84eaa902735fd317261af259609 /sys/netinet/ip_output.c
parent509193a62ff6f66dabb660a8509266c59d098ce9 (diff)
downloadFreeBSD-src-de3407d02868da17b84be20a37bee2f9d4b5ad99.zip
FreeBSD-src-de3407d02868da17b84be20a37bee2f9d4b5ad99.tar.gz
pass pcb rather than so. it is expected that per socket policy
works again.
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 733df47..a872c00 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -144,7 +144,6 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro,
struct in_addr pkt_dst;
struct route iproute;
#ifdef IPSEC
- struct socket *so;
struct secpolicy *sp = NULL;
#endif
#ifdef FAST_IPSEC
@@ -195,11 +194,6 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro,
}
m = m0;
-#ifdef IPSEC
- so = ipsec_getsocket(m);
- (void)ipsec_setsocket(m, NULL);
-#endif /*IPSEC*/
-
M_ASSERTPKTHDR(m);
if (ro == NULL) {
@@ -481,11 +475,11 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro,
sendit:
#ifdef IPSEC
/* get SP for this packet */
- if (so == NULL)
+ if (inp == NULL)
sp = ipsec4_getpolicybyaddr(m, IPSEC_DIR_OUTBOUND,
flags, &error);
else
- sp = ipsec4_getpolicybysock(m, IPSEC_DIR_OUTBOUND, so, &error);
+ sp = ipsec4_getpolicybypcb(m, IPSEC_DIR_OUTBOUND, inp, &error);
if (sp == NULL) {
ipsecstat.out_inval++;
OpenPOWER on IntegriCloud