From: William Tu <u9012063@gmail.com>
To: netdev@vger.kernel.org
Subject: [PATCH] ip_gre: fix ip-config error reported by lkp-robot
Date: Tue, 7 Nov 2017 07:57:44 -0800 [thread overview]
Message-ID: <1510070264-56415-1-git-send-email-u9012063@gmail.com> (raw)
lkp-robot reports the following two errors:
IP-Config: Failed to open gretap0
IP-Config: Failed to open erspan0
due to device's mac address is zero. Fix it by assigning
a random Ethernet address.
Signed-off-by: William Tu <u9012063@gmail.com>
---
net/ipv4/ip_gre.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index c105a315b1a3..1529a44f6945 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -998,6 +998,9 @@ static int ipgre_tunnel_init(struct net_device *dev)
dev->header_ops = &ipgre_header_ops;
}
+ if (is_zero_ether_addr(dev->dev_addr))
+ eth_hw_addr_random(dev);
+
return ip_tunnel_init(dev);
}
@@ -1222,6 +1225,9 @@ static int gre_tap_init(struct net_device *dev)
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
netif_keep_dst(dev);
+ if (is_zero_ether_addr(dev->dev_addr))
+ eth_hw_addr_random(dev);
+
return ip_tunnel_init(dev);
}
--
2.7.4
next reply other threads:[~2017-11-07 15:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 15:57 William Tu [this message]
2017-11-13 0:58 ` [PATCH] ip_gre: fix ip-config error reported by lkp-robot David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1510070264-56415-1-git-send-email-u9012063@gmail.com \
--to=u9012063@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).