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

(-)nd6.c (-3 / +17 lines)
Lines 875-880 Link Here
875
{
875
{
876
	struct nd_prefix *pr;
876
	struct nd_prefix *pr;
877
	struct ifaddr *dstaddr;
877
	struct ifaddr *dstaddr;
878
	struct rtentry *rt;
879
	int retval;
878
880
879
	/*
881
	/*
880
	 * A link-local address is always a neighbor.
882
	 * A link-local address is always a neighbor.
Lines 910-917 Link Here
910
			continue;
912
			continue;
911
913
912
		if (!(pr->ndpr_stateflags & NDPRF_ONLINK)) {
914
		if (!(pr->ndpr_stateflags & NDPRF_ONLINK)) {
913
			struct rtentry *rt;
914
915
			/* Always use the default FIB here. */
915
			/* Always use the default FIB here. */
916
			rt = in6_rtalloc1((struct sockaddr *)&pr->ndpr_prefix,
916
			rt = in6_rtalloc1((struct sockaddr *)&pr->ndpr_prefix,
917
			    0, 0, RT_DEFAULT_FIB);
917
			    0, 0, RT_DEFAULT_FIB);
Lines 963-969 Link Here
963
		return (1);
963
		return (1);
964
	}
964
	}
965
965
966
	return (0);
966
	/* Check for a matching non static route which userland may have
967
	 * added. This is the only check we can make because RTF_CLONING
968
	 * was dropped. */
969
	rt = in6_rtalloc1((struct sockaddr *)addr, 0, 0, RT_DEFAULT_FIB);
970
	if (rt == NULL)
971
		return (0);
972
	if (!(rt->rt_flags & RTF_STATIC) &&
973
	    (rt->rt_ifp == ifp ||
974
	    rt->rt_ifp->if_bridge == ifp->if_bridge))
975
	    /* XXX Check matching carp device? */
976
		retval = 1;
977
	else
978
		retval = 0;
979
	RTFREE_LOCKED(rt);
980
	return (retval);
967
}
981
}
968
982
969
983

Return to bug 194485