svn commit: r352246 - head/sys/net

Kyle Evans kevans at FreeBSD.org
Thu Sep 12 15:36:49 UTC 2019


Author: kevans
Date: Thu Sep 12 15:36:48 2019
New Revision: 352246
URL: https://svnweb.freebsd.org/changeset/base/352246

Log:
  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
  Reviewed by:	brooks
  MFC after:	5 days
  Differential Revision:	https://reviews.freebsd.org/D21618

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Thu Sep 12 14:34:46 2019	(r352245)
+++ head/sys/net/if.c	Thu Sep 12 15:36:48 2019	(r352246)
@@ -2716,6 +2716,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-head mailing list