Deleted Added
full compact
raw_ip.c (133720) raw_ip.c (133874)
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

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)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

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
30 * $FreeBSD: head/sys/netinet/raw_ip.c 133720 2004-08-14 15:32:40Z dwmalone $
30 * $FreeBSD: head/sys/netinet/raw_ip.c 133874 2004-08-16 18:32:07Z rwatson $
31 */
32
33#include "opt_inet6.h"
34#include "opt_ipsec.h"
35#include "opt_mac.h"
36
37#include <sys/param.h>
38#include <sys/jail.h>

--- 50 unchanged lines hidden (view full) ---

89/* The socket used to communicate with the multicast routing daemon. */
90struct socket *ip_mrouter;
91
92/* The various mrouter and rsvp functions */
93int (*ip_mrouter_set)(struct socket *, struct sockopt *);
94int (*ip_mrouter_get)(struct socket *, struct sockopt *);
95int (*ip_mrouter_done)(void);
96int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
31 */
32
33#include "opt_inet6.h"
34#include "opt_ipsec.h"
35#include "opt_mac.h"
36
37#include <sys/param.h>
38#include <sys/jail.h>

--- 50 unchanged lines hidden (view full) ---

89/* The socket used to communicate with the multicast routing daemon. */
90struct socket *ip_mrouter;
91
92/* The various mrouter and rsvp functions */
93int (*ip_mrouter_set)(struct socket *, struct sockopt *);
94int (*ip_mrouter_get)(struct socket *, struct sockopt *);
95int (*ip_mrouter_done)(void);
96int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
97 struct ip_moptions *);
97 struct ip_moptions *);
98int (*mrt_ioctl)(int, caddr_t);
99int (*legal_vif_num)(int);
100u_long (*ip_mcast_src)(int);
101
102void (*rsvp_input_p)(struct mbuf *m, int off);
103int (*ip_rsvp_vif)(struct socket *, struct sockopt *);
104void (*ip_rsvp_force_done)(struct socket *);
105

--- 96 unchanged lines hidden (view full) ---

202 INP_UNLOCK(inp);
203 continue;
204 }
205#ifdef INET6
206 if ((inp->inp_vflag & INP_IPV4) == 0)
207 goto docontinue;
208#endif
209 if (inp->inp_laddr.s_addr &&
98int (*mrt_ioctl)(int, caddr_t);
99int (*legal_vif_num)(int);
100u_long (*ip_mcast_src)(int);
101
102void (*rsvp_input_p)(struct mbuf *m, int off);
103int (*ip_rsvp_vif)(struct socket *, struct sockopt *);
104void (*ip_rsvp_force_done)(struct socket *);
105

--- 96 unchanged lines hidden (view full) ---

202 INP_UNLOCK(inp);
203 continue;
204 }
205#ifdef INET6
206 if ((inp->inp_vflag & INP_IPV4) == 0)
207 goto docontinue;
208#endif
209 if (inp->inp_laddr.s_addr &&
210 inp->inp_laddr.s_addr != ip->ip_dst.s_addr)
210 inp->inp_laddr.s_addr != ip->ip_dst.s_addr)
211 goto docontinue;
212 if (inp->inp_faddr.s_addr &&
211 goto docontinue;
212 if (inp->inp_faddr.s_addr &&
213 inp->inp_faddr.s_addr != ip->ip_src.s_addr)
213 inp->inp_faddr.s_addr != ip->ip_src.s_addr)
214 goto docontinue;
215 if (jailed(inp->inp_socket->so_cred))
216 if (htonl(prison_getip(inp->inp_socket->so_cred)) !=
217 ip->ip_dst.s_addr)
218 goto docontinue;
219 if (last) {
220 struct mbuf *n;
221

--- 654 unchanged lines hidden ---
214 goto docontinue;
215 if (jailed(inp->inp_socket->so_cred))
216 if (htonl(prison_getip(inp->inp_socket->so_cred)) !=
217 ip->ip_dst.s_addr)
218 goto docontinue;
219 if (last) {
220 struct mbuf *n;
221

--- 654 unchanged lines hidden ---