Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Sep 2007 21:57:51 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 126488 for review
Message-ID:  <200709162157.l8GLvpx2080125@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=126488

Change 126488 by kmacy@kmacy_home:ethng on 2007/09/16 21:57:27

	add a route structure to the inpcb
	release the reference to the rt_entry if its set when we free the inpcb

Affected files ...

.. //depot/projects/ethng/src/sys/netinet/in_pcb.c#4 edit
.. //depot/projects/ethng/src/sys/netinet/in_pcb.h#3 edit

Differences ...

==== //depot/projects/ethng/src/sys/netinet/in_pcb.c#4 (text+ko) ====

@@ -727,6 +727,8 @@
 #ifdef MAC
 	mac_destroy_inpcb(inp);
 #endif
+	if (inp->inp_route.ro_rt)
+		RTFREE(inp->inp_route.ro_rt);
 	INP_UNLOCK(inp);
 	uma_zfree(ipi->ipi_zone, inp);
 }

==== //depot/projects/ethng/src/sys/netinet/in_pcb.h#3 (text+ko) ====

@@ -168,9 +168,9 @@
 	struct	inpcbport *inp_phd;	/* head of this list */
 #define inp_zero_size offsetof(struct inpcb, inp_gencnt)
 	inp_gen_t	inp_gencnt;	/* generation count of this instance */
-	uint32_t        inp_rss_hash;		  
 	struct mtx	inp_mtx;
-
+	uint32_t        inp_rss_hash;  
+        struct route    inp_route;
 #define	in6p_faddr	inp_inc.inc6_faddr
 #define	in6p_laddr	inp_inc.inc6_laddr
 #define	in6p_hops	inp_depend6.inp6_hops	/* default hop limit */


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709162157.l8GLvpx2080125>