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:
Gleb Smirnoff 2013-01-29 21:44:22 +00:00
parent 6bf8b93697
commit 1910bfcba2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246095

View File

@ -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",