mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
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
This commit is contained in:
parent
5163b1a75c
commit
40b1c921bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352246
@ -2716,6 +2716,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
|
||||
if (strlen(new_name) == IFNAMSIZ-1)
|
||||
return (EINVAL);
|
||||
}
|
||||
if (strcmp(new_name, ifp->if_xname) == 0)
|
||||
break;
|
||||
if (ifunit(new_name) != NULL)
|
||||
return (EEXIST);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user