Date: Fri, 20 Sep 2019 21:27:41 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r352565 - in stable: 11/sys/net 12/sys/net Message-ID: <201909202127.x8KLRfqv010276@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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/11/sys/net/if.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/net/if.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Fri Sep 20 20:47:10 2019 (r352564) +++ stable/11/sys/net/if.c Fri Sep 20 21:27:41 2019 (r352565) @@ -2672,6 +2672,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909202127.x8KLRfqv010276>