Author: kevans
Date: Fri Sep 20 21:27:41 2019
New Revision: 352565
URL: https://svnweb.freebsd.org/changeset/base/352565
Log:
MFC r352246: 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
Modified:
stable/12/sys/net/if.c
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/sys/net/if.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/12/sys/net/if.c
==============================================================================
--- stable/12/sys/net/if.c Fri Sep 20 20:47:10 2019 (r352564)
+++ stable/12/sys/net/if.c Fri Sep 20 21:27:41 2019 (r352565)
@@ -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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"