summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVeaceslav Falico <vfalico@redhat.com>2014-01-14 21:58:51 +0100
committerDavid S. Miller <davem@davemloft.net>2014-01-15 15:16:20 -0800
commit5bb025fae53889cc99a21058c5dd369bf8cce820 (patch)
treecc80601cdb7096b9dc4d9d5f14eb477c4dd82322 /include
parent3ee32707560955e92d30f7f6e5138cb92a3b1a7e (diff)
downloadlinux-5bb025fae53889cc99a21058c5dd369bf8cce820.tar.gz
linux-5bb025fae53889cc99a21058c5dd369bf8cce820.tar.bz2
linux-5bb025fae53889cc99a21058c5dd369bf8cce820.zip
net: rename sysfs symlinks on device name change
Currently, we don't rename the upper/lower_ifc symlinks in /sys/class/net/*/ , which might result stale/duplicate links/names. Fix this by adding netdev_adjacent_rename_links(dev, oldname) which renames all the upper/lower interface's links to dev from the upper/lower_oldname to the new name. We don't need a rollback because only we control these symlinks and if we fail to rename them - sysfs will anyway complain. Reported-by: Ding Tianhong <dingtianhong@huawei.com> CC: Ding Tianhong <dingtianhong@huawei.com> CC: "David S. Miller" <davem@davemloft.net> CC: Eric Dumazet <edumazet@google.com> CC: Nicolas Dichtel <nicolas.dichtel@6wind.com> CC: Cong Wang <amwang@redhat.com> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5c88ab19b3eb..30f6513f3b4d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2941,6 +2941,7 @@ int netdev_master_upper_dev_link_private(struct net_device *dev,
void *private);
void netdev_upper_dev_unlink(struct net_device *dev,
struct net_device *upper_dev);
+void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);
void *netdev_lower_dev_get_private(struct net_device *dev,
struct net_device *lower_dev);
int skb_checksum_help(struct sk_buff *skb);