in6_proto.c (178167) | in6_proto.c (181803) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_proto.c 8.1 (Berkeley) 6/10/93 61 */ 62 63#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_proto.c 8.1 (Berkeley) 6/10/93 61 */ 62 63#include <sys/cdefs.h> |
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_proto.c 178167 2008-04-13 05:45:14Z qingli $"); | 64__FBSDID("$FreeBSD: head/sys/netinet6/in6_proto.c 181803 2008-08-17 23:27:27Z bz $"); |
65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_ipsec.h" 69#include "opt_ipstealth.h" 70#include "opt_carp.h" 71#include "opt_sctp.h" 72#include "opt_mpath.h" 73 74#include <sys/param.h> 75#include <sys/socket.h> 76#include <sys/socketvar.h> 77#include <sys/protosw.h> 78#include <sys/kernel.h> 79#include <sys/domain.h> 80#include <sys/mbuf.h> 81#include <sys/systm.h> 82#include <sys/sysctl.h> | 65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_ipsec.h" 69#include "opt_ipstealth.h" 70#include "opt_carp.h" 71#include "opt_sctp.h" 72#include "opt_mpath.h" 73 74#include <sys/param.h> 75#include <sys/socket.h> 76#include <sys/socketvar.h> 77#include <sys/protosw.h> 78#include <sys/kernel.h> 79#include <sys/domain.h> 80#include <sys/mbuf.h> 81#include <sys/systm.h> 82#include <sys/sysctl.h> |
83#include <sys/vimage.h> |
|
83 84#include <net/if.h> 85#include <net/radix.h> 86#include <net/route.h> 87#ifdef RADIX_MPATH 88#include <net/radix_mpath.h> 89#endif 90 --- 366 unchanged lines hidden (view full) --- 457sysctl_ip6_temppltime(SYSCTL_HANDLER_ARGS) 458{ 459 int error = 0; 460 int old; 461 462 error = SYSCTL_OUT(req, arg1, sizeof(int)); 463 if (error || !req->newptr) 464 return (error); | 84 85#include <net/if.h> 86#include <net/radix.h> 87#include <net/route.h> 88#ifdef RADIX_MPATH 89#include <net/radix_mpath.h> 90#endif 91 --- 366 unchanged lines hidden (view full) --- 458sysctl_ip6_temppltime(SYSCTL_HANDLER_ARGS) 459{ 460 int error = 0; 461 int old; 462 463 error = SYSCTL_OUT(req, arg1, sizeof(int)); 464 if (error || !req->newptr) 465 return (error); |
465 old = ip6_temp_preferred_lifetime; | 466 old = V_ip6_temp_preferred_lifetime; |
466 error = SYSCTL_IN(req, arg1, sizeof(int)); | 467 error = SYSCTL_IN(req, arg1, sizeof(int)); |
467 if (ip6_temp_preferred_lifetime < 468 ip6_desync_factor + ip6_temp_regen_advance) { 469 ip6_temp_preferred_lifetime = old; | 468 if (V_ip6_temp_preferred_lifetime < 469 V_ip6_desync_factor + V_ip6_temp_regen_advance) { 470 V_ip6_temp_preferred_lifetime = old; |
470 return (EINVAL); 471 } 472 return (error); 473} 474 475static int 476sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARGS) 477{ 478 int error = 0; 479 int old; 480 481 error = SYSCTL_OUT(req, arg1, sizeof(int)); 482 if (error || !req->newptr) 483 return (error); | 471 return (EINVAL); 472 } 473 return (error); 474} 475 476static int 477sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARGS) 478{ 479 int error = 0; 480 int old; 481 482 error = SYSCTL_OUT(req, arg1, sizeof(int)); 483 if (error || !req->newptr) 484 return (error); |
484 old = ip6_temp_valid_lifetime; | 485 old = V_ip6_temp_valid_lifetime; |
485 error = SYSCTL_IN(req, arg1, sizeof(int)); | 486 error = SYSCTL_IN(req, arg1, sizeof(int)); |
486 if (ip6_temp_valid_lifetime < ip6_temp_preferred_lifetime) { 487 ip6_temp_preferred_lifetime = old; | 487 if (V_ip6_temp_valid_lifetime < V_ip6_temp_preferred_lifetime) { 488 V_ip6_temp_preferred_lifetime = old; |
488 return (EINVAL); 489 } 490 return (error); 491} 492 493SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, 494 forwarding, CTLFLAG_RW, &ip6_forwarding, 0, ""); 495SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, --- 82 unchanged lines hidden --- | 489 return (EINVAL); 490 } 491 return (error); 492} 493 494SYSCTL_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, 495 forwarding, CTLFLAG_RW, &ip6_forwarding, 0, ""); 496SYSCTL_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, --- 82 unchanged lines hidden --- |