route_output() always supplies info with RTAX_GATEWAY member that
points to a sockaddr of AF_LINK family. Assert this instead of checking.
This commit is contained in:
parent
6bf8b93697
commit
1910bfcba2
@ -273,10 +273,9 @@ lla_rt_output(struct rt_msghdr *rtm, struct rt_addrinfo *info)
|
||||
u_int laflags = 0, flags = 0;
|
||||
int error = 0;
|
||||
|
||||
if (dl == NULL || dl->sdl_family != AF_LINK) {
|
||||
log(LOG_INFO, "%s: invalid dl\n", __func__);
|
||||
return EINVAL;
|
||||
}
|
||||
KASSERT(dl != NULL && dl->sdl_family == AF_LINK,
|
||||
("%s: invalid dl\n", __func__));
|
||||
|
||||
ifp = ifnet_byindex(dl->sdl_index);
|
||||
if (ifp == NULL) {
|
||||
log(LOG_INFO, "%s: invalid ifp (sdl_index %d)\n",
|
||||
|
Loading…
Reference in New Issue
Block a user