raw_ip.c (101934) | raw_ip.c (105194) |
---|---|
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 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 | 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 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 |
34 * $FreeBSD: head/sys/netinet/raw_ip.c 101934 2002-08-15 18:51:27Z rwatson $ | 34 * $FreeBSD: head/sys/netinet/raw_ip.c 105194 2002-10-16 01:54:46Z sam $ |
35 */ 36 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_random_ip_id.h" 41 42#include <sys/param.h> --- 233 unchanged lines hidden (view full) --- 276#else 277 ip->ip_id = htons(ip_id++); 278#endif 279 /* XXX prevent ip_output from overwriting header fields */ 280 flags |= IP_RAWOUTPUT; 281 ipstat.ips_rawout++; 282 } 283 | 35 */ 36 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_random_ip_id.h" 41 42#include <sys/param.h> --- 233 unchanged lines hidden (view full) --- 276#else 277 ip->ip_id = htons(ip_id++); 278#endif 279 /* XXX prevent ip_output from overwriting header fields */ 280 flags |= IP_RAWOUTPUT; 281 ipstat.ips_rawout++; 282 } 283 |
284#ifdef IPSEC 285 if (ipsec_setsocket(m, so) != 0) { 286 m_freem(m); 287 return ENOBUFS; 288 } 289#endif /*IPSEC*/ 290 | |
291 return (ip_output(m, inp->inp_options, &inp->inp_route, flags, | 284 return (ip_output(m, inp->inp_options, &inp->inp_route, flags, |
292 inp->inp_moptions)); | 285 inp->inp_moptions, inp)); |
293} 294 295/* 296 * Raw IP socket option processing. 297 */ 298int 299rip_ctloutput(so, sopt) 300 struct socket *so; --- 432 unchanged lines hidden --- | 286} 287 288/* 289 * Raw IP socket option processing. 290 */ 291int 292rip_ctloutput(so, sopt) 293 struct socket *so; --- 432 unchanged lines hidden --- |