diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-26 19:14:52 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-26 19:14:52 +0200 |
commit | 76a6865acbed4df30d57bf57f62522c681081152 (patch) | |
tree | f91c0cfb4db03b17fe692782111012eee3662018 /interface.c | |
parent | e8f450ba2e67716cf3ed70060a309b80aa24cf00 (diff) |
on reload, check for null ifname before comparing it
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/interface.c b/interface.c index d0eec4a..a8f7b8f 100644 --- 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; |