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:
a2f762e
)
fix handling bridge interfaces with no initial device
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 23 Oct 2011 17:20:35 +0000
(19:20 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 23 Oct 2011 17:20:35 +0000
(19:20 +0200)
bridge.c
patch
|
blob
|
history
diff --git
a/bridge.c
b/bridge.c
index 70ea0f03b0f9a97618ebdfdbb4d553769d57d072..54526f74494c85011d020f0a5290fcaa6ca3e7d8 100644
(file)
--- a/
bridge.c
+++ b/
bridge.c
@@
-330,6
+330,10
@@
bridge_config_init(struct device *dev)
int rem;
bst = container_of(dev, struct bridge_state, dev);
+
+ if (!bst->ifnames)
+ return;
+
blobmsg_for_each_attr(cur, bst->ifnames, rem) {
bridge_add_member(bst, blobmsg_data(cur));
}
@@
-384,9
+388,6
@@
bridge_create(const char *name, struct blob_attr *attr)
blobmsg_parse(bridge_attrs, __BRIDGE_ATTR_MAX, tb_br,
blob_data(attr), blob_len(attr));
- if (!tb_br[BRIDGE_ATTR_IFNAME])
- return NULL;
-
bst = calloc(1, sizeof(*bst));
if (!bst)
return NULL;