Deleted Added
full compact
udp_usrreq.c (101948) udp_usrreq.c (105194)
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

--- 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 * @(#)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

--- 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 * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95
34 * $FreeBSD: head/sys/netinet/udp_usrreq.c 101948 2002-08-15 22:04:31Z rwatson $
34 * $FreeBSD: head/sys/netinet/udp_usrreq.c 105194 2002-10-16 01:54:46Z sam $
35 */
36
37#include "opt_ipsec.h"
38#include "opt_inet6.h"
39#include "opt_mac.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>

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

811 } else {
812 ui->ui_sum = 0;
813 }
814 ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
815 ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */
816 ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */
817 udpstat.udps_opackets++;
818
35 */
36
37#include "opt_ipsec.h"
38#include "opt_inet6.h"
39#include "opt_mac.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>

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

811 } else {
812 ui->ui_sum = 0;
813 }
814 ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
815 ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */
816 ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */
817 udpstat.udps_opackets++;
818
819#ifdef IPSEC
820 if (ipsec_setsocket(m, inp->inp_socket) != 0) {
821 error = ENOBUFS;
822 goto release;
823 }
824#endif /*IPSEC*/
825 error = ip_output(m, inp->inp_options, &inp->inp_route,
826 (inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST)),
819 error = ip_output(m, inp->inp_options, &inp->inp_route,
820 (inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST)),
827 inp->inp_moptions);
821 inp->inp_moptions, inp);
828
829 if (addr) {
830 in_pcbdisconnect(inp);
831 inp->inp_laddr = laddr; /* XXX rehash? */
832 splx(s);
833 }
834 return (error);
835

--- 242 unchanged lines hidden ---
822
823 if (addr) {
824 in_pcbdisconnect(inp);
825 inp->inp_laddr = laddr; /* XXX rehash? */
826 splx(s);
827 }
828 return (error);
829

--- 242 unchanged lines hidden ---