svn commit: r246095 - head/sys/net

Gleb Smirnoff glebius at FreeBSD.org
Tue Jan 29 21:44:23 UTC 2013


Author: glebius
Date: Tue Jan 29 21:44:22 2013
New Revision: 246095
URL: http://svnweb.freebsd.org/changeset/base/246095

Log:
  route_output() always supplies info with RTAX_GATEWAY member that
  points to a sockaddr of AF_LINK family. Assert this instead of
  checking.

Modified:
  head/sys/net/if_llatbl.c

Modified: head/sys/net/if_llatbl.c
==============================================================================
--- head/sys/net/if_llatbl.c	Tue Jan 29 21:37:56 2013	(r246094)
+++ head/sys/net/if_llatbl.c	Tue Jan 29 21:44:22 2013	(r246095)
@@ -273,10 +273,9 @@ lla_rt_output(struct rt_msghdr *rtm, str
 	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",


More information about the svn-src-all mailing list