ip_input.c (33268) | ip_input.c (33440) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 |
34 * $Id: ip_input.c,v 1.76 1998/02/11 18:43:42 guido Exp $ | 34 * $Id: ip_input.c,v 1.77 1998/02/12 03:37:45 ache Exp $ |
35 * $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $ 36 */ 37 38#define _IP_VHL 39 40#include "opt_bootp.h" 41#include "opt_ipfw.h" 42#include "opt_ipdivert.h" --- 46 unchanged lines hidden (view full) --- 89 90int ip_defttl = IPDEFTTL; 91SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW, 92 &ip_defttl, 0, ""); 93 94static int ip_dosourceroute = 0; 95SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, 96 &ip_dosourceroute, 0, ""); | 35 * $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $ 36 */ 37 38#define _IP_VHL 39 40#include "opt_bootp.h" 41#include "opt_ipfw.h" 42#include "opt_ipdivert.h" --- 46 unchanged lines hidden (view full) --- 89 90int ip_defttl = IPDEFTTL; 91SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW, 92 &ip_defttl, 0, ""); 93 94static int ip_dosourceroute = 0; 95SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, 96 &ip_dosourceroute, 0, ""); |
97 98static int ip_acceptsourceroute = 0; 99SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, 100 CTLFLAG_RW, &ip_acceptsourceroute, 0, ""); |
|
97#ifdef DIAGNOSTIC 98static int ipprintfs = 0; 99#endif 100 101extern struct domain inetdomain; 102extern struct protosw inetsw[]; 103u_char ip_protox[IPPROTO_MAX]; 104static int ipqmaxlen = IFQ_MAXLEN; --- 855 unchanged lines hidden (view full) --- 960 */ 961 break; 962 } 963 off--; /* 0 origin */ 964 if (off > optlen - sizeof(struct in_addr)) { 965 /* 966 * End of source route. Should be for us. 967 */ | 101#ifdef DIAGNOSTIC 102static int ipprintfs = 0; 103#endif 104 105extern struct domain inetdomain; 106extern struct protosw inetsw[]; 107u_char ip_protox[IPPROTO_MAX]; 108static int ipqmaxlen = IFQ_MAXLEN; --- 855 unchanged lines hidden (view full) --- 964 */ 965 break; 966 } 967 off--; /* 0 origin */ 968 if (off > optlen - sizeof(struct in_addr)) { 969 /* 970 * End of source route. Should be for us. 971 */ |
972 if (!ip_acceptsourceroute) 973 goto nosourcerouting; |
|
968 save_rte(cp, ip->ip_src); 969 break; 970 } 971 972 if (!ip_dosourceroute) { 973 char buf[4*sizeof "123"]; 974 975nosourcerouting: --- 551 unchanged lines hidden --- | 974 save_rte(cp, ip->ip_src); 975 break; 976 } 977 978 if (!ip_dosourceroute) { 979 char buf[4*sizeof "123"]; 980 981nosourcerouting: --- 551 unchanged lines hidden --- |