--- embedaddon/mpd/src/nat.c 2013/07/22 08:44:29 1.1.1.2 +++ embedaddon/mpd/src/nat.c 2016/11/01 09:56:12 1.1.1.3 @@ -3,6 +3,7 @@ * nat.c * * Written by Alexander Motin + * Rewritten by Dmitry Luhtionov */ #include "ppp.h" @@ -411,7 +412,7 @@ int NatStat(Context ctx, int ac, char *av[], void *arg) { NatState const nat = &ctx->bund->iface.nat; -#ifdef NGM_NAT_LIBALIAS_INFO +#ifdef NG_NAT_LIBALIAS_INFO IfaceState const iface = &ctx->bund->iface; union { u_char buf[sizeof(struct ng_mesg) + sizeof(struct ng_nat_libalias_info)]; @@ -469,10 +470,11 @@ NatStat(Context ctx, int ac, char *av[], void *arg) #endif Printf("NAT options:\r\n"); OptStat(ctx, &nat->options, gConfList); -#ifdef NGM_NAT_LIBALIAS_INFO +#ifdef NG_NAT_LIBALIAS_INFO if (Enabled(&nat->options, NAT_CONF_LOG) && iface->up && iface->nat_up) { snprintf(path, sizeof(path), "mpd%d-%s-nat:", gPid, \ (char *)&ctx->bund->name); + bzero(li, sizeof(struct ng_nat_libalias_info)); Printf("LibAlias statistic:\r\n"); if (NgFuncSendQuery(path, NGM_NAT_COOKIE, NGM_NAT_LIBALIAS_INFO, NULL, 0, &u.reply, sizeof(u), NULL) < 0)