View | Details | Raw Unified | Return to bug 187549 | Differences between
and this patch

Collapse All | Expand All

(-)//SpectraBSD/stable/sbin/ifconfig/iffib.c (+2 lines)
Lines 76-81 Link Here
76
76
77
	strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name));
77
	strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name));
78
	ifr.ifr_fib = fib;
78
	ifr.ifr_fib = fib;
79
	if (setfib(fib) != 0) 
80
		warn("setfib");
79
	if (ioctl(s, SIOCSIFFIB, (caddr_t)&ifr) < 0)
81
	if (ioctl(s, SIOCSIFFIB, (caddr_t)&ifr) < 0)
80
		warn("ioctl (SIOCSIFFIB)");
82
		warn("ioctl (SIOCSIFFIB)");
81
}
83
}
(-)//SpectraBSD/stable/sys/net/if.c (-2 / +2 lines)
Lines 1464-1470 Link Here
1464
	info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC;
1464
	info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC;
1465
	info.rti_info[RTAX_DST] = ia;
1465
	info.rti_info[RTAX_DST] = ia;
1466
	info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl;
1466
	info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl;
1467
	error = rtrequest1_fib(RTM_ADD, &info, &rt, 0);
1467
	error = rtrequest1_fib(RTM_ADD, &info, &rt, ifa->ifa_ifp->if_fib);
1468
1468
1469
	if (error == 0 && rt != NULL) {
1469
	if (error == 0 && rt != NULL) {
1470
		RT_LOCK(rt);
1470
		RT_LOCK(rt);
Lines 1496-1502 Link Here
1496
	info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC;
1496
	info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC;
1497
	info.rti_info[RTAX_DST] = ia;
1497
	info.rti_info[RTAX_DST] = ia;
1498
	info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl;
1498
	info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl;
1499
	error = rtrequest1_fib(RTM_DELETE, &info, NULL, 0);
1499
	error = rtrequest1_fib(RTM_DELETE, &info, NULL, ifa->ifa_ifp->if_fib);
1500
1500
1501
	if (error != 0)
1501
	if (error != 0)
1502
		log(LOG_INFO, "ifa_del_loopback_route: deletion failed\n");
1502
		log(LOG_INFO, "ifa_del_loopback_route: deletion failed\n");
(-)//SpectraBSD/stable/sys/netinet/in.c (-1 / +3 lines)
Lines 1101-1110 Link Here
1101
	    (target->ia_flags & IFA_RTSELF)) {
1101
	    (target->ia_flags & IFA_RTSELF)) {
1102
		struct route ia_ro;
1102
		struct route ia_ro;
1103
		int freeit = 0;
1103
		int freeit = 0;
1104
		int fib;
1104
1105
1105
		bzero(&ia_ro, sizeof(ia_ro));
1106
		bzero(&ia_ro, sizeof(ia_ro));
1106
		*((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr;
1107
		*((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr;
1107
		rtalloc_ign_fib(&ia_ro, 0, 0);
1108
		fib = target->ia_ifa.ifa_ifp->if_fib;
1109
		rtalloc_ign_fib(&ia_ro, 0, fib);
1108
		if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) &&
1110
		if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) &&
1109
		    (ia_ro.ro_rt->rt_ifp == V_loif)) {
1111
		    (ia_ro.ro_rt->rt_ifp == V_loif)) {
1110
			RT_LOCK(ia_ro.ro_rt);
1112
			RT_LOCK(ia_ro.ro_rt);

Return to bug 187549