Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.44 retrieving revision 1.49 diff -u -p -r1.44 -r1.49 --- src/sys/netinet/raw_ip.c 1999/07/05 07:24:38 1.44 +++ src/sys/netinet/raw_ip.c 2000/02/01 22:52:08 1.49 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.44 1999/07/05 07:24:38 darrenr Exp $ */ +/* $NetBSD: raw_ip.c,v 1.49 2000/02/01 22:52:08 thorpej Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -64,6 +64,7 @@ * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 */ +#include "opt_ipsec.h" #include "opt_mrouting.h" #include @@ -206,7 +207,8 @@ rip_input(m, va_alist) sorwakeup(last->inp_socket); } else { if (inetsw[ip_protox[ip->ip_p]].pr_input == rip_input) { - icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PROTOCOL,0,0); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PROTOCOL, + 0, 0); ipstat.ips_noproto++; ipstat.ips_delivered--; } else @@ -429,6 +431,11 @@ rip_usrreq(so, req, m, nam, control, p) return (in_control(so, (long)m, (caddr_t)nam, (struct ifnet *)control, p)); + if (req == PRU_PURGEADDR) { + in_purgeaddr((struct ifaddr *)nam, (struct ifnet *)control); + return (0); + } + s = splsoftnet(); inp = sotoinpcb(so); #ifdef DIAGNOSTIC @@ -462,7 +469,11 @@ rip_usrreq(so, req, m, nam, control, p) inp = sotoinpcb(so); inp->inp_ip.ip_p = (long)nam; #ifdef IPSEC - error = ipsec_init_policy(&inp->inp_sp); + error = ipsec_init_policy(so, &inp->inp_sp); + if (error != 0) { + in_pcbdetach(inp); + break; + } #endif /*IPSEC*/ break;