svn commit: r352571 - releng/12.1/sys/net

Kyle Evans kevans at FreeBSD.org
Sat Sep 21 01:39:50 UTC 2019


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);
 


More information about the svn-src-all mailing list