diff options
author | ume <ume@FreeBSD.org> | 2004-02-03 18:20:55 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2004-02-03 18:20:55 +0000 |
commit | de3407d02868da17b84be20a37bee2f9d4b5ad99 (patch) | |
tree | d4a15c08d97fd84eaa902735fd317261af259609 /sys/netinet/ip_output.c | |
parent | 509193a62ff6f66dabb660a8509266c59d098ce9 (diff) | |
download | FreeBSD-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.c | 10 |
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++; |