projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interface: don't segfault with an unknown protocol
[project/netifd.git]
/
interface.c
diff --git
a/interface.c
b/interface.c
index
a5675f7
..
60efc7e
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);
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)
(cur = tb[IFACE_ATTR_IFNAME])) {
dev = device_get(blobmsg_data(cur), true);
if (dev)