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.108 retrieving revision 1.113 diff -u -p -r1.108 -r1.113 --- src/sys/netinet/raw_ip.c 2008/08/06 15:01:23 1.108 +++ src/sys/netinet/raw_ip.c 2011/12/19 11:59:57 1.113 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.108 2008/08/06 15:01:23 plunky Exp $ */ +/* $NetBSD: raw_ip.c,v 1.113 2011/12/19 11:59:57 drochner Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,9 +61,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.108 2008/08/06 15:01:23 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.113 2011/12/19 11:59:57 drochner Exp $"); #include "opt_inet.h" +#include "opt_compat_netbsd.h" #include "opt_ipsec.h" #include "opt_mrouting.h" @@ -93,12 +94,10 @@ __KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1 #include #include -#include - -#ifdef IPSEC +#ifdef KAME_IPSEC #include #include -#endif /* IPSEC */ +#endif /* KAME_IPSEC */ #ifdef FAST_IPSEC #include @@ -106,6 +105,10 @@ __KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1 #include #endif /* FAST_IPSEC */ +#ifdef COMPAT_50 +#include +#endif + struct inpcbtable rawcbtable; int rip_pcbnotify(struct inpcbtable *, struct in_addr, @@ -114,6 +117,8 @@ int rip_bind(struct inpcb *, struct mbu int rip_connect(struct inpcb *, struct mbuf *); void rip_disconnect(struct inpcb *); +static void sysctl_net_inet_raw_setup(struct sysctllog **); + /* * Nominal space allocated to a raw ip socket. */ @@ -131,6 +136,7 @@ void rip_init(void) { + sysctl_net_inet_raw_setup(NULL); in_pcbinit(&rawcbtable, 1, 1); } @@ -140,8 +146,11 @@ rip_sbappendaddr(struct inpcb *last, str { if (last->inp_flags & INP_NOHEADER) m_adj(n, hlen); - if (last->inp_flags & INP_CONTROLOPTS || - last->inp_socket->so_options & SO_TIMESTAMP) + if (last->inp_flags & INP_CONTROLOPTS +#ifdef SO_OTIMESTAMP + || last->inp_socket->so_options & SO_OTIMESTAMP +#endif + || last->inp_socket->so_options & SO_TIMESTAMP) ip_savecontrol(last, &opts, ip, n); if (sbappendaddr(&last->inp_socket->so_rcv, sa, n, opts) == 0) { /* should notify about lost packet */ @@ -199,7 +208,7 @@ rip_input(struct mbuf *m, ...) continue; if (last == NULL) ; -#if defined(IPSEC) || defined(FAST_IPSEC) +#if defined(KAME_IPSEC) || defined(FAST_IPSEC) /* check AH/ESP integrity. */ else if (ipsec4_in_reject_so(m, last->inp_socket)) { IPSEC_STATINC(IPSEC_STAT_IN_POLVIO); @@ -213,7 +222,7 @@ rip_input(struct mbuf *m, ...) } last = inp; } -#if defined(IPSEC) || defined(FAST_IPSEC) +#if defined(KAME_IPSEC) || defined(FAST_IPSEC) /* check AH/ESP integrity. */ if (last != NULL && ipsec4_in_reject_so(m, last->inp_socket)) { m_freem(m); @@ -523,8 +532,7 @@ rip_usrreq(struct socket *so, int req, #endif if (req == PRU_CONTROL) - return (in_control(so, (long)m, (void *)nam, - (struct ifnet *)control, l)); + return in_control(so, (long)m, nam, (struct ifnet *)control, l); s = splsoftnet(); @@ -543,7 +551,7 @@ rip_usrreq(struct socket *so, int req, if (req != PRU_SEND && req != PRU_SENDOOB && control) panic("rip_usrreq: unexpected control mbuf"); #endif - if (inp == 0 && req != PRU_ATTACH) { + if (inp == NULL && req != PRU_ATTACH) { error = EINVAL; goto release; } @@ -688,7 +696,8 @@ release: return (error); } -SYSCTL_SETUP(sysctl_net_inet_raw_setup, "sysctl net.inet.raw subtree setup") +static void +sysctl_net_inet_raw_setup(struct sysctllog **clog) { sysctl_createv(clog, 0, NULL, NULL,