diff --git a/sys/net/if.c b/sys/net/if.c index d1513d2a32d7..cfd0c2065888 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -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);