Lines 1908-1913
ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa,
Link Here
|
1908 |
struct sockaddr *ia) |
1908 |
struct sockaddr *ia) |
1909 |
{ |
1909 |
{ |
1910 |
int error; |
1910 |
int error; |
|
|
1911 |
int fibnum; |
1911 |
struct rt_addrinfo info; |
1912 |
struct rt_addrinfo info; |
1912 |
struct sockaddr_dl null_sdl; |
1913 |
struct sockaddr_dl null_sdl; |
1913 |
struct ifnet *ifp; |
1914 |
struct ifnet *ifp; |
Lines 1924-1929
ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa,
Link Here
|
1924 |
|
1925 |
|
1925 |
error = rtrequest1_fib(cmd, &info, NULL, ifp->if_fib); |
1926 |
error = rtrequest1_fib(cmd, &info, NULL, ifp->if_fib); |
1926 |
|
1927 |
|
|
|
1928 |
// XXX: add loopback route into other fibs |
1929 |
if (V_rt_add_addr_allfibs && cmd == RTM_ADD && error == 0) { |
1930 |
for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { |
1931 |
if (fibnum == ifp->if_fib) |
1932 |
continue; |
1933 |
|
1934 |
(void) rtrequest1_fib(cmd, &info, NULL, fibnum); |
1935 |
} |
1936 |
} |
1937 |
|
1927 |
if (error == 0 || |
1938 |
if (error == 0 || |
1928 |
(cmd == RTM_ADD && error == EEXIST) || |
1939 |
(cmd == RTM_ADD && error == EEXIST) || |
1929 |
(cmd == RTM_DELETE && (error == ENOENT || error == ESRCH))) |
1940 |
(cmd == RTM_DELETE && (error == ENOENT || error == ESRCH))) |