Deleted Added
full compact
udp_usrreq.c (146854) udp_usrreq.c (149371)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
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 * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
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 * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
30 * $FreeBSD: head/sys/netinet/udp_usrreq.c 146854 2005-06-01 11:24:00Z rwatson $
30 * $FreeBSD: head/sys/netinet/udp_usrreq.c 149371 2005-08-22 16:13:08Z andre $
31 */
32
33#include "opt_ipsec.h"
34#include "opt_inet6.h"
35#include "opt_mac.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>

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

379 goto badheadlocked;
380 *ip = save_ip;
381 ip->ip_len += iphlen;
382 icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PORT, 0, 0);
383 INP_INFO_RUNLOCK(&udbinfo);
384 return;
385 }
386 INP_LOCK(inp);
31 */
32
33#include "opt_ipsec.h"
34#include "opt_inet6.h"
35#include "opt_mac.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>

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

379 goto badheadlocked;
380 *ip = save_ip;
381 ip->ip_len += iphlen;
382 icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PORT, 0, 0);
383 INP_INFO_RUNLOCK(&udbinfo);
384 return;
385 }
386 INP_LOCK(inp);
387 /* Check the minimum TTL for socket. */
388 if (inp->inp_ip_minttl && inp->inp_ip_minttl > ip->ip_ttl)
389 goto badheadlocked;
387 udp_append(inp, ip, m, iphlen + sizeof(struct udphdr), &udp_in);
388 INP_UNLOCK(inp);
389 INP_INFO_RUNLOCK(&udbinfo);
390 return;
391
392badheadlocked:
393 if (inp)
394 INP_UNLOCK(inp);

--- 712 unchanged lines hidden ---
390 udp_append(inp, ip, m, iphlen + sizeof(struct udphdr), &udp_in);
391 INP_UNLOCK(inp);
392 INP_INFO_RUNLOCK(&udbinfo);
393 return;
394
395badheadlocked:
396 if (inp)
397 INP_UNLOCK(inp);

--- 712 unchanged lines hidden ---