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.107.8.1 retrieving revision 1.110 diff -u -p -r1.107.8.1 -r1.110 --- src/sys/netinet/raw_ip.c 2008/10/19 22:17:46 1.107.8.1 +++ src/sys/netinet/raw_ip.c 2009/09/16 15:23:05 1.110 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.107.8.1 2008/10/19 22:17:46 haad Exp $ */ +/* $NetBSD: raw_ip.c,v 1.110 2009/09/16 15:23:05 pooka Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,9 +61,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.107.8.1 2008/10/19 22:17:46 haad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.110 2009/09/16 15:23:05 pooka Exp $"); #include "opt_inet.h" +#include "opt_compat_netbsd.h" #include "opt_ipsec.h" #include "opt_mrouting.h" @@ -106,6 +107,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 +119,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 +138,7 @@ void rip_init(void) { + sysctl_net_inet_raw_setup(NULL); in_pcbinit(&rawcbtable, 1, 1); } @@ -140,8 +148,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 */ @@ -688,7 +699,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,