diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-12 18:06:34 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 18:41:37 +0200 |
commit | 5a1b7e1a532557e3af48c3ed7e61f3e757ee09ea (patch) | |
tree | 4b622bd13a068d6cd5111702e81069208bc43b6f /net/ipv6/ip6_gre.c | |
parent | hamradio: use dev_addr_set() for setting device address (diff) | |
download | linux-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/ipv6/ip6_gre.c')
-rw-r--r-- | net/ipv6/ip6_gre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 3ad201d372d8..d831d2439693 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -1088,7 +1088,7 @@ static void ip6gre_tnl_link_config_common(struct ip6_tnl *t) struct flowi6 *fl6 = &t->fl.u.ip6; if (dev->type != ARPHRD_ETHER) { - memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr)); + __dev_addr_set(dev, &p->laddr, sizeof(struct in6_addr)); memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr)); } @@ -1521,7 +1521,7 @@ static int ip6gre_tunnel_init(struct net_device *dev) if (tunnel->parms.collect_md) return 0; - memcpy(dev->dev_addr, &tunnel->parms.laddr, sizeof(struct in6_addr)); + __dev_addr_set(dev, &tunnel->parms.laddr, sizeof(struct in6_addr)); memcpy(dev->broadcast, &tunnel->parms.raddr, sizeof(struct in6_addr)); if (ipv6_addr_any(&tunnel->parms.raddr)) |