projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
735244c
)
interface: don't segfault with an unknown protocol
author
Steven Barth
<steven@midlink.org>
Wed, 28 Sep 2011 11:02:04 +0000
(11:02 +0000)
committer
Steven Barth
<steven@midlink.org>
Wed, 28 Sep 2011 11:02:04 +0000
(11:02 +0000)
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index a5675f7a77a35cc90d441fd755a0b028294219ab..60efc7e43950fc8f28bc97289cee59ea1a5089ca 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-241,7
+241,8
@@
interface_alloc(const char *name, struct blob_attr *attr)
proto_attach_interface(iface, proto_name);
- if (!(iface->proto_handler->flags & PROTO_FLAG_NODEV) &&
+ if (iface->proto_handler &&
+ !(iface->proto_handler->flags & PROTO_FLAG_NODEV) &&
(cur = tb[IFACE_ATTR_IFNAME])) {
dev = device_get(blobmsg_data(cur), true);
if (dev)