From c7e55ef36c8099bc7b4872e15bec2de4c39965f1 Mon Sep 17 00:00:00 2001 From: Sukru Senli Date: Wed, 6 May 2015 19:56:10 +0200 Subject: [PATCH] questd: fix questd crash --- questd/src/igmp.c | 2 +- questd/src/questd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/questd/src/igmp.c b/questd/src/igmp.c index d68886dea..bc39d9fe5 100644 --- a/questd/src/igmp.c +++ b/questd/src/igmp.c @@ -42,7 +42,7 @@ int igmp_rpc(struct ubus_context *ctx, struct ubus_object *obj, void *object, *array; blob_buf_init(&bb, 0); - if (!(in = fopen("/tmp/igmp_snooping", "r"))) + if (!(in = fopen("/proc/net/igmp_snooping", "r"))) return 1; array = blobmsg_open_array(&bb, "tables"); diff --git a/questd/src/questd.c b/questd/src/questd.c index b2f37e7af..f142ff3a2 100644 --- a/questd/src/questd.c +++ b/questd/src/questd.c @@ -329,11 +329,11 @@ match_client_to_network(Network *lan, char *hostaddr, bool *local, char *net, ch if((snet.s_addr ^ rslt.s_addr) == 0) { *local = true; - snprintf(*net, 32, lan->name); + snprintf(net, 32, lan->name); if (lan->type && !strcmp(lan->type, "bridge")) - snprintf(*dev, 32, "br-%s", lan->name); + snprintf(dev, 32, "br-%s", lan->name); else - snprintf(*dev, 32, lan->ifname); + snprintf(dev, 32, lan->ifname); } }