Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2018 18:41:27 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331788 - stable/11/sys/ofed/drivers/infiniband/core
Message-ID:  <201803301841.w2UIfRw9079751@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Mar 30 18:41:27 2018
New Revision: 331788
URL: https://svnweb.freebsd.org/changeset/base/331788

Log:
  MFC r330583:
  Embed the IPv6 scope ID before calling rtalloc1() in ibcore.
  Else rtalloc1() will resolve to the loopback interface.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c
==============================================================================
--- stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c	Fri Mar 30 18:39:35 2018	(r331787)
+++ stable/11/sys/ofed/drivers/infiniband/core/ib_addr.c	Fri Mar 30 18:41:27 2018	(r331788)
@@ -424,6 +424,13 @@ static int addr6_resolve(struct sockaddr_in6 *src_in,
 	 */
 	dst_tmp.sin6_len = sizeof(dst_tmp);
 
+	/*
+	 * Make sure the scope ID gets embedded, else rtalloc1() will
+	 * resolve to the loopback interface.
+	 */
+	dst_tmp.sin6_scope_id = addr->bound_dev_if;
+	sa6_embedscope(&dst_tmp, 0);
+
 	/* Step 1 - lookup destination route if any */
 	switch (type) {
 	case 0:



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