View | Details | Raw Unified | Return to bug 187553
Collapse All | Expand All

(-)//SpectraBSD/stable/sys/netinet/in_pcb.c (-4 / +5 lines)
Lines 729-738 Link Here
729
		struct ifnet *ifp;
729
		struct ifnet *ifp;
730
730
731
		ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin,
731
		ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin,
732
		    RT_DEFAULT_FIB));
732
		    curthread->td_proc->p_fibnum));
733
		if (ia == NULL)
733
		if (ia == NULL)
734
			ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0,
734
			ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0,
735
			    RT_DEFAULT_FIB));
735
			    curthread->td_proc->p_fibnum));
736
		if (ia == NULL) {
736
		if (ia == NULL) {
737
			error = ENETUNREACH;
737
			error = ENETUNREACH;
738
			goto done;
738
			goto done;
Lines 847-856 Link Here
847
		sain.sin_len = sizeof(struct sockaddr_in);
847
		sain.sin_len = sizeof(struct sockaddr_in);
848
		sain.sin_addr.s_addr = faddr->s_addr;
848
		sain.sin_addr.s_addr = faddr->s_addr;
849
849
850
		ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain), RT_DEFAULT_FIB));
850
		ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain),
851
		    	     curthread->td_proc->p_fibnum));
851
		if (ia == NULL)
852
		if (ia == NULL)
852
			ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0,
853
			ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0,
853
			    RT_DEFAULT_FIB));
854
			    curthread->td_proc->p_fibnum));
854
		if (ia == NULL)
855
		if (ia == NULL)
855
			ia = ifatoia(ifa_ifwithaddr(sintosa(&sain)));
856
			ia = ifatoia(ifa_ifwithaddr(sintosa(&sain)));
856
857
(-)//SpectraBSD/stable/sys/netinet/ip_output.c (-3 / +5 lines)
Lines 119-124 Link Here
119
	struct ip *ip;
119
	struct ip *ip;
120
	struct ifnet *ifp = NULL;	/* keep compiler happy */
120
	struct ifnet *ifp = NULL;	/* keep compiler happy */
121
	struct mbuf *m0;
121
	struct mbuf *m0;
122
	int fib;
122
	int hlen = sizeof (struct ip);
123
	int hlen = sizeof (struct ip);
123
	int mtu;
124
	int mtu;
124
	int n;	/* scratchpad */
125
	int n;	/* scratchpad */
Lines 226-235 Link Here
226
	 * interface is specified by the broadcast address of an interface,
227
	 * interface is specified by the broadcast address of an interface,
227
	 * or the destination address of a ptp interface.
228
	 * or the destination address of a ptp interface.
228
	 */
229
	 */
230
	fib = curthread->td_proc->p_fibnum;
229
	if (flags & IP_SENDONES) {
231
	if (flags & IP_SENDONES) {
230
		if ((ia = ifatoia(ifa_ifwithbroadaddr(sintosa(dst)))) == NULL &&
232
		if ((ia = ifatoia(ifa_ifwithbroadaddr(sintosa(dst)))) == NULL &&
231
		    (ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst),
233
		    (ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst),
232
						    RT_DEFAULT_FIB))) == NULL) {
234
		    				    fib))) == NULL) {
233
			IPSTAT_INC(ips_noroute);
235
			IPSTAT_INC(ips_noroute);
234
			error = ENETUNREACH;
236
			error = ENETUNREACH;
235
			goto bad;
237
			goto bad;
Lines 241-249 Link Here
241
		isbroadcast = 1;
243
		isbroadcast = 1;
242
	} else if (flags & IP_ROUTETOIF) {
244
	} else if (flags & IP_ROUTETOIF) {
243
		if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst),
245
		if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst),
244
		    				    RT_DEFAULT_FIB))) == NULL &&
246
		    				    fib))) == NULL &&
245
		    (ia = ifatoia(ifa_ifwithnet(sintosa(dst), 0,
247
		    (ia = ifatoia(ifa_ifwithnet(sintosa(dst), 0,
246
		    				RT_DEFAULT_FIB))) == NULL) {
248
						fib))) == NULL) {
247
			IPSTAT_INC(ips_noroute);
249
			IPSTAT_INC(ips_noroute);
248
			error = ENETUNREACH;
250
			error = ENETUNREACH;
249
			goto bad;
251
			goto bad;

Return to bug 187553