- snprintf(cmd, 2048, "iptables -t mangle -A throttle -d %s -j MARK --set-mark %d", inet_toa(ntohl(session[s].ip)),
+ if (!session[s].tbf)
+ {
+ log(1, 0, s, session[s].tunnel, "Error creating a filtering bucket for user %s\n", session[s].user);
+ return 0;
+ }
+ log(2, 0, s, session[s].tunnel, "Throttling session %d for user %s\n", s, session[s].user);
+ snprintf(cmd, 2048, "iptables -t mangle -A throttle -d %s -j MARK --set-mark %d",
+ inet_toa(ntohl(session[s].ip)),