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/ip_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.223.4.1 retrieving revision 1.227 diff -u -p -r1.223.4.1 -r1.227 --- src/sys/netinet/ip_input.c 2006/09/09 02:58:47 1.223.4.1 +++ src/sys/netinet/ip_input.c 2006/06/07 22:34:01 1.227 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.223.4.1 2006/09/09 02:58:47 rpaulo Exp $ */ +/* $NetBSD: ip_input.c,v 1.227 2006/06/07 22:34:01 kardel Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -98,7 +98,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.223.4.1 2006/09/09 02:58:47 rpaulo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.227 2006/06/07 22:34:01 kardel Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -445,10 +445,7 @@ ip_init(void) #endif /* MBUFTRACE */ } -struct sockaddr_in ipaddr = { - .sin_len = sizeof(ipaddr), - .sin_family = AF_INET, -}; +struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; struct route ipforward_rt; /* @@ -2096,30 +2093,6 @@ ip_savecontrol(struct inpcb *inp, struct } /* - * sysctl helper routine for net.inet.ip.forwsrcrt. - */ -static int -sysctl_net_inet_ip_forwsrcrt(SYSCTLFN_ARGS) -{ - int error, tmp; - struct sysctlnode node; - - node = *rnode; - tmp = ip_forwsrcrt; - node.sysctl_data = &tmp; - error = sysctl_lookup(SYSCTLFN_CALL(&node)); - if (error || newp == NULL) - return (error); - - if (securelevel > 0) - return (EPERM); - - ip_forwsrcrt = tmp; - - return (0); -} - -/* * sysctl helper routine for net.inet.ip.mtudisctimeout. checks the * range of the new value and tweaks timers if it changes. */ @@ -2220,11 +2193,11 @@ SYSCTL_SETUP(sysctl_net_inet_ip_setup, " IPCTL_DEFMTU, CTL_EOL); #endif /* IPCTL_DEFMTU */ sysctl_createv(clog, 0, NULL, NULL, - CTLFLAG_PERMANENT|CTLFLAG_READWRITE, + CTLFLAG_PERMANENT|CTLFLAG_READONLY1, CTLTYPE_INT, "forwsrcrt", SYSCTL_DESCR("Enable forwarding of source-routed " "datagrams"), - sysctl_net_inet_ip_forwsrcrt, 0, &ip_forwsrcrt, 0, + NULL, 0, &ip_forwsrcrt, 0, CTL_NET, PF_INET, IPPROTO_IP, IPCTL_FORWSRCRT, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL,