dnsmasq: fix swapped ubus args mac and ip
authorJaroslav Safka <devel@safka.org>
Mon, 13 Nov 2017 22:02:46 +0000 (23:02 +0100)
committerJohn Crispin <john@phrozen.org>
Mon, 13 Nov 2017 22:30:33 +0000 (23:30 +0100)
Fix swapped arguments "mac" and "ip" when calling function
"ubus_event_bcast".

Signed-off-by: Jaroslav Safka <devel@safka.org>
package/network/services/dnsmasq/patches/240-ubus.patch

index 2d37b5d2fdd6510f4bfb0c5328e74a5c5c4fc3c0..0e0b1dd1b0b4409294db291d9cf011b31504f10d 100644 (file)
              string ? string : "",
              err ? err : "");
 +  if (!strcmp(type, "DHCPACK"))
-+        ubus_event_bcast("dhcp.ack", addr ? inet_ntoa(a) : NULL, daemon->namebuff, string ? string : NULL);
++        ubus_event_bcast("dhcp.ack", daemon->namebuff, addr ? inet_ntoa(a) : NULL, string ? string : NULL);
 +  else if (!strcmp(type, "DHCPRELEASE"))
-+        ubus_event_bcast("dhcp.release", addr ? inet_ntoa(a) : NULL, daemon->namebuff, string ? string : NULL);
++        ubus_event_bcast("dhcp.release", daemon->namebuff, addr ? inet_ntoa(a) : NULL, string ? string : NULL);
  }
  
  static void log_options(unsigned char *start, u32 xid)