Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2008 03:38:16 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r186628 - user/kmacy/HEAD_fast_net/sys/netinet
Message-ID:  <200812310338.mBV3cGFQ013788@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Wed Dec 31 03:38:16 2008
New Revision: 186628
URL: http://svn.freebsd.org/changeset/base/186628

Log:
  don't lookup laddr or lport if they're already set

Modified:
  user/kmacy/HEAD_fast_net/sys/netinet/udp_usrreq.c

Modified: user/kmacy/HEAD_fast_net/sys/netinet/udp_usrreq.c
==============================================================================
--- user/kmacy/HEAD_fast_net/sys/netinet/udp_usrreq.c	Wed Dec 31 03:22:22 2008	(r186627)
+++ user/kmacy/HEAD_fast_net/sys/netinet/udp_usrreq.c	Wed Dec 31 03:38:16 2008	(r186628)
@@ -962,6 +962,10 @@ udp_output(struct inpcb *inp, struct mbu
 		    sin->sin_addr.s_addr == INADDR_ANY ||
 		    sin->sin_addr.s_addr == INADDR_BROADCAST) {
 			INP_INFO_LOCK_ASSERT(&V_udbinfo);
+
+			if (inp->inp_laddr.s_addr != INADDR_ANY)
+				laddr.s_addr = inp->inp_laddr.s_addr;
+			lport = inp->inp_lport;
 			error = in_pcbconnect_setup(inp, addr, &laddr.s_addr,
 			    &lport, &faddr.s_addr, &fport, NULL,
 			    td->td_ucred);



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