aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netgraph/ng_base.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index 63bc251f52f9..ae179cf13a45 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -855,6 +855,10 @@ ng_name_node(node_p node, const char *name)
node_p node2;
int i;
+ /* Rename without change is a noop */
+ if (strcmp(NG_NODE_NAME(node), name) == 0)
+ return (0);
+
/* Check the name is valid */
for (i = 0; i < NG_NODESIZ; i++) {
if (name[i] == '\0' || name[i] == '.' || name[i] == ':')