Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/netinet Pull up revision 1.106 (via patch, requeste...



details:   https://anonhg.NetBSD.org/src/rev/cf9302b7d385
branches:  netbsd-1-5
changeset: 491199:cf9302b7d385
user:      he <he%NetBSD.org@localhost>
date:      Fri Apr 06 00:26:34 2001 +0000

description:
Pull up revision 1.106 (via patch, requested by itojun):
  Record IPsec packet history in m_aux structure.  Let ipfilter
  look at wire-format packet only (not the decapsulated ones), so
  that VPN setting can work with NAT/ipfilter settings.

diffstat:

 sys/netinet/tcp_subr.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r a1346e2d2640 -r cf9302b7d385 sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c    Fri Apr 06 00:26:13 2001 +0000
+++ b/sys/netinet/tcp_subr.c    Fri Apr 06 00:26:34 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_subr.c,v 1.91.4.3 2000/10/17 00:48:30 tv Exp $     */
+/*     $NetBSD: tcp_subr.c,v 1.91.4.4 2001/04/06 00:26:34 he Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -618,7 +618,7 @@
        }
 
 #ifdef IPSEC
-       ipsec_setsocket(m, NULL);
+       (void)ipsec_setsocket(m, NULL);
 #endif /*IPSEC*/
 
        /*
@@ -632,7 +632,10 @@
        if (tp != NULL && tp->t_inpcb != NULL) {
                ro = &tp->t_inpcb->inp_route;
 #ifdef IPSEC
-               ipsec_setsocket(m, tp->t_inpcb->inp_socket);
+               if (ipsec_setsocket(m, tp->t_inpcb->inp_socket) != 0) {
+                       m_freem(m);
+                       return ENOBUFS;
+               }
 #endif
 #ifdef DIAGNOSTIC
                if (family != AF_INET)
@@ -648,7 +651,10 @@
        else if (tp != NULL && tp->t_in6pcb != NULL) {
                ro = (struct route *)&tp->t_in6pcb->in6p_route;
 #ifdef IPSEC
-               ipsec_setsocket(m, tp->t_in6pcb->in6p_socket);
+               if (ipsec_setsocket(m, tp->t_in6pcb->in6p_socket) != 0) {
+                       m_freem(m);
+                       return ENOBUFS;
+               }
 #endif
 #ifdef DIAGNOSTIC
                if (family == AF_INET) {



Home | Main Index | Thread Index | Old Index