Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Apr 2014 02:20:09 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264998 - head/sys/net
Message-ID:  <201404270220.s3R2K9xP077077@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Sun Apr 27 02:20:09 2014
New Revision: 264998
URL: http://svnweb.freebsd.org/changeset/base/264998

Log:
  Move up fibnum to ensure it is always defined.
  
  Found by:	ian
  MFC with:	r264987

Modified:
  head/sys/net/rtsock.c

Modified: head/sys/net/rtsock.c
==============================================================================
--- head/sys/net/rtsock.c	Sun Apr 27 02:19:53 2014	(r264997)
+++ head/sys/net/rtsock.c	Sun Apr 27 02:20:09 2014	(r264998)
@@ -531,6 +531,8 @@ route_output(struct mbuf *m, struct sock
 	union sockaddr_union saun;
 	sa_family_t saf = AF_UNSPEC;
 
+	fibnum = so->so_fibnum;
+
 #define senderr(e) { error = e; goto flush;}
 	if (m == NULL || ((m->m_len < sizeof(long)) &&
 		       (m = m_pullup(m, sizeof(long))) == NULL))
@@ -582,8 +584,6 @@ route_output(struct mbuf *m, struct sock
 			senderr(error);
 	}
 
-	fibnum = so->so_fibnum;
-
 	/*
 	 * The given gateway address may be an interface address.
 	 * For example, issuing a "route change" command on a route



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404270220.s3R2K9xP077077>