diff options
author | sascha <sascha@nomad.localdomain> | 2007-10-18 11:25:13 +0200 |
---|---|---|
committer | sascha <sascha@nomad.localdomain> | 2007-10-18 11:25:13 +0200 |
commit | 3c37202662cb30dca373c8dd099638f9ca8e039a (patch) | |
tree | dcbd696ff02331212224c04bf4bea7390a9c0454 /net | |
parent | a9791f69f7045604efe9d5a57483b87e95aaa697 (diff) | |
download | barebox-3c37202662cb30dca373c8dd099638f9ca8e039a.tar.gz barebox-3c37202662cb30dca373c8dd099638f9ca8e039a.tar.xz |
check if there is an ethernet device set in NetLoop
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -258,6 +258,11 @@ NetLoop(proto_t protocol) struct eth_device *eth_current = eth_get_current(); IPaddr_t ip; + if (!eth_current) { + printf("Current ethernet device not set!\n"); + return -1; + } + ip = dev_get_param_ip(eth_current->dev, "ip"); NetCopyIP(&NetOurIP, &ip); |