Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Sep 2019 01:39:50 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r352571 - releng/12.1/sys/net
Message-ID:  <201909210139.x8L1doM2056845@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Sep 21 01:39:49 2019
New Revision: 352571
URL: https://svnweb.freebsd.org/changeset/base/352571

Log:
  MFS r352565: SIOCSIFNAME: Do nothing if we're not actually changing
  
  Instead of throwing EEXIST, just succeed if the name isn't actually
  changing. We don't need to trigger departure or any of that because there's
  no change from consumers' perspective.
  
  PR:		240539
  Approved by:	re (gjb)

Modified:
  releng/12.1/sys/net/if.c
Directory Properties:
  releng/12.1/   (props changed)

Modified: releng/12.1/sys/net/if.c
==============================================================================
--- releng/12.1/sys/net/if.c	Sat Sep 21 01:29:59 2019	(r352570)
+++ releng/12.1/sys/net/if.c	Sat Sep 21 01:39:49 2019	(r352571)
@@ -2750,6 +2750,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data,
 			if (strlen(new_name) == IFNAMSIZ-1)
 				return (EINVAL);
 		}
+		if (strcmp(new_name, ifp->if_xname) == 0)
+			break;
 		if (ifunit(new_name) != NULL)
 			return (EEXIST);
 



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