|
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; |