Deleted Added
full compact
in_pcb.c (84101) in_pcb.c (85074)
1/*
2 * Copyright (c) 1982, 1986, 1991, 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 * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
1/*
2 * Copyright (c) 1982, 1986, 1991, 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 * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95
34 * $FreeBSD: head/sys/netinet/in_pcb.c 84101 2001-09-29 03:23:44Z jlemon $
34 * $FreeBSD: head/sys/netinet/in_pcb.c 85074 2001-10-17 18:07:05Z ru $
35 */
36
37#include "opt_ipsec.h"
38#include "opt_inet6.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/malloc.h>

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

733in_losing(inp)
734 struct inpcb *inp;
735{
736 register struct rtentry *rt;
737 struct rt_addrinfo info;
738
739 if ((rt = inp->inp_route.ro_rt)) {
740 bzero((caddr_t)&info, sizeof(info));
35 */
36
37#include "opt_ipsec.h"
38#include "opt_inet6.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/malloc.h>

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

733in_losing(inp)
734 struct inpcb *inp;
735{
736 register struct rtentry *rt;
737 struct rt_addrinfo info;
738
739 if ((rt = inp->inp_route.ro_rt)) {
740 bzero((caddr_t)&info, sizeof(info));
741 info.rti_info[RTAX_DST] =
742 (struct sockaddr *)&inp->inp_route.ro_dst;
741 info.rti_flags = rt->rt_flags;
742 info.rti_info[RTAX_DST] = rt_key(rt);
743 info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
744 info.rti_info[RTAX_NETMASK] = rt_mask(rt);
745 rt_missmsg(RTM_LOSING, &info, rt->rt_flags, 0);
746 if (rt->rt_flags & RTF_DYNAMIC)
743 info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
744 info.rti_info[RTAX_NETMASK] = rt_mask(rt);
745 rt_missmsg(RTM_LOSING, &info, rt->rt_flags, 0);
746 if (rt->rt_flags & RTF_DYNAMIC)
747 (void) rtrequest(RTM_DELETE, rt_key(rt),
748 rt->rt_gateway, rt_mask(rt), rt->rt_flags,
749 (struct rtentry **)0);
750 inp->inp_route.ro_rt = 0;
747 (void) rtrequest1(RTM_DELETE, &info, NULL);
748 inp->inp_route.ro_rt = NULL;
751 rtfree(rt);
752 /*
753 * A new route can be allocated
754 * the next time output is attempted.
755 */
756 }
757}
758

--- 296 unchanged lines hidden ---
749 rtfree(rt);
750 /*
751 * A new route can be allocated
752 * the next time output is attempted.
753 */
754 }
755}
756

--- 296 unchanged lines hidden ---