summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipip.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-12 18:06:34 +0200
committerJakub Kicinski <kuba@kernel.org>2021-10-13 18:41:37 +0200
commit5a1b7e1a532557e3af48c3ed7e61f3e757ee09ea (patch)
tree4b622bd13a068d6cd5111702e81069208bc43b6f /net/ipv4/ipip.c
parenthamradio: use dev_addr_set() for setting device address (diff)
downloadlinux-5a1b7e1a532557e3af48c3ed7e61f3e757ee09ea.tar.xz
linux-5a1b7e1a532557e3af48c3ed7e61f3e757ee09ea.zip
ip: use dev_addr_set() in tunnels
Use dev_addr_set() instead of writing to netdev->dev_addr directly in ip tunnels drivers. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r--net/ipv4/ipip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 3aa78ccbec3e..123ea63a04cb 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -380,7 +380,7 @@ static int ipip_tunnel_init(struct net_device *dev)
{
struct ip_tunnel *tunnel = netdev_priv(dev);
- memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
+ __dev_addr_set(dev, &tunnel->parms.iph.saddr, 4);
memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
tunnel->tun_hlen = 0;