Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/in.c
Show All 29 Lines | |||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* @(#)in.c 8.4 (Berkeley) 1/9/95 | * @(#)in.c 8.4 (Berkeley) 1/9/95 | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_mpath.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/sockio.h> | #include <sys/sockio.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/priv.h> | #include <sys/priv.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
▲ Show 20 Lines • Show All 646 Lines • ▼ Show 20 Lines | CK_STAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { | ||||
if (target->ia_ifp->if_fib != ia->ia_ifp->if_fib) | if (target->ia_ifp->if_fib != ia->ia_ifp->if_fib) | ||||
continue; | continue; | ||||
/* | /* | ||||
* If we got a matching prefix route inserted by other | * If we got a matching prefix route inserted by other | ||||
* interface address, we are done here. | * interface address, we are done here. | ||||
*/ | */ | ||||
if (ia->ia_flags & IFA_ROUTE) { | if (ia->ia_flags & IFA_ROUTE) { | ||||
#ifdef RADIX_MPATH | |||||
if (ia->ia_addr.sin_addr.s_addr == | |||||
target->ia_addr.sin_addr.s_addr) { | |||||
IN_IFADDR_RUNLOCK(&in_ifa_tracker); | |||||
return (EEXIST); | |||||
} else | |||||
break; | |||||
#endif | |||||
if (V_nosameprefix) { | if (V_nosameprefix) { | ||||
IN_IFADDR_RUNLOCK(&in_ifa_tracker); | IN_IFADDR_RUNLOCK(&in_ifa_tracker); | ||||
return (EEXIST); | return (EEXIST); | ||||
} else { | } else { | ||||
int fibnum; | int fibnum; | ||||
fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : | fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : | ||||
target->ia_ifp->if_fib; | target->ia_ifp->if_fib; | ||||
▲ Show 20 Lines • Show All 801 Lines • Show Last 20 Lines |