projects
/
oweals
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
865c2b8
)
Fix interface ignore overwrite
author
Hans Dedecker
<hans.dedecker@technicolor.com>
Mon, 13 Jan 2014 16:42:19 +0000
(17:42 +0100)
committer
Hans Dedecker
<hans.dedecker@technicolor.com>
Mon, 13 Jan 2014 16:42:19 +0000
(17:42 +0100)
Don't overwrite interface ignore uci parameter when resolving ifindex.
Don't put interface in use when ifindex is unknown as interface
cannot be setup and needs to be closed.
src/config.c
patch
|
blob
|
history
diff --git
a/src/config.c
b/src/config.c
index 46137a48ab3dc926047f985c358c9d877cb36aed..b6b3708acba852a7d41ff3d76f1138726f871cbf 100644
(file)
--- a/
src/config.c
+++ b/
src/config.c
@@
-302,6
+302,9
@@
int config_parse_interface(void *data, size_t len, const char *name, bool overwr
if (ifname)
strncpy(iface->ifname, ifname, sizeof(iface->ifname) - 1);
+ if ((iface->ifindex = if_nametoindex(iface->ifname)) <= 0)
+ return -1;
+
iface->inuse = true;
if ((c = tb[IFACE_ATTR_DYNAMICDHCP]))
@@
-494,7
+497,6
@@
int config_parse_interface(void *data, size_t len, const char *name, bool overwr
}
}
- iface->ignore = (iface->ifindex = if_nametoindex(iface->ifname)) <= 0;
return 0;
err: