projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8f450b
)
on reload, check for null ifname before comparing it
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 26 Oct 2011 17:14:52 +0000
(19:14 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 26 Oct 2011 17:14:52 +0000
(19:14 +0200)
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index d0eec4a7b70d45c89bd9347e5aaf4af21059a0e1..a8f7b8f01267f9e519d9d52fe978b067879cd126 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-475,8
+475,9
@@
interface_change_config(struct interface *if_old, struct interface *if_new)
if_old->ifname = if_new->ifname;
if_old->proto_handler = if_new->proto_handler;
- if (strcmp(old_ifname, if_new->ifname) != 0 ||
- proto != if_new->proto_handler) {
+ if ((!!old_ifname != !!if_new->ifname) ||
+ (old_ifname && strcmp(old_ifname, if_new->ifname) != 0) ||
+ proto != if_new->proto_handler) {
D(INTERFACE, "Reload interface '%s' because of ifname/proto change\n",
if_old->name);
goto reload;