in6_proto.c (33cde13046eaba762428c55bb5d5e07c1a7c5f33) | in6_proto.c (f6dfe47a145263dc5eb67fa4789925ab708709bc) |
---|---|
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 --- 433 unchanged lines hidden (view full) --- 442/* net.inet6.ip6 */ 443static int 444sysctl_ip6_temppltime(SYSCTL_HANDLER_ARGS) 445{ 446 INIT_VNET_INET6(curvnet); 447 int error = 0; 448 int old; 449 | 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 --- 433 unchanged lines hidden (view full) --- 442/* net.inet6.ip6 */ 443static int 444sysctl_ip6_temppltime(SYSCTL_HANDLER_ARGS) 445{ 446 INIT_VNET_INET6(curvnet); 447 int error = 0; 448 int old; 449 |
450 SYSCTL_RESOLVE_V_ARG1(); 451 |
|
450 error = SYSCTL_OUT(req, arg1, sizeof(int)); 451 if (error || !req->newptr) 452 return (error); 453 old = V_ip6_temp_preferred_lifetime; 454 error = SYSCTL_IN(req, arg1, sizeof(int)); 455 if (V_ip6_temp_preferred_lifetime < 456 V_ip6_desync_factor + V_ip6_temp_regen_advance) { 457 V_ip6_temp_preferred_lifetime = old; --- 4 unchanged lines hidden (view full) --- 462 463static int 464sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARGS) 465{ 466 INIT_VNET_INET6(curvnet); 467 int error = 0; 468 int old; 469 | 452 error = SYSCTL_OUT(req, arg1, sizeof(int)); 453 if (error || !req->newptr) 454 return (error); 455 old = V_ip6_temp_preferred_lifetime; 456 error = SYSCTL_IN(req, arg1, sizeof(int)); 457 if (V_ip6_temp_preferred_lifetime < 458 V_ip6_desync_factor + V_ip6_temp_regen_advance) { 459 V_ip6_temp_preferred_lifetime = old; --- 4 unchanged lines hidden (view full) --- 464 465static int 466sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARGS) 467{ 468 INIT_VNET_INET6(curvnet); 469 int error = 0; 470 int old; 471 |
472 SYSCTL_RESOLVE_V_ARG1(); 473 |
|
470 error = SYSCTL_OUT(req, arg1, sizeof(int)); 471 if (error || !req->newptr) 472 return (error); 473 old = V_ip6_temp_valid_lifetime; 474 error = SYSCTL_IN(req, arg1, sizeof(int)); 475 if (V_ip6_temp_valid_lifetime < V_ip6_temp_preferred_lifetime) { 476 V_ip6_temp_preferred_lifetime = old; 477 return (EINVAL); --- 90 unchanged lines hidden --- | 474 error = SYSCTL_OUT(req, arg1, sizeof(int)); 475 if (error || !req->newptr) 476 return (error); 477 old = V_ip6_temp_valid_lifetime; 478 error = SYSCTL_IN(req, arg1, sizeof(int)); 479 if (V_ip6_temp_valid_lifetime < V_ip6_temp_preferred_lifetime) { 480 V_ip6_temp_preferred_lifetime = old; 481 return (EINVAL); --- 90 unchanged lines hidden --- |