Пример #1
0
def set(data, user, fname=TAG+".txt", fdir=const.CFG_DIR):
	e = validate(data)
	if e[0]:
		if user is not None: # None means 'called when bootup'
			xt_func.iptables_raw_change_policy("DROP")
		e = xt_func.xte_set(TAG, HELPER, data, _set, fname, fdir, user)
		if user is not None:
			xt_func.iptables_raw_change_policy("ACCEPT")
	return e
def set(data, user, fname=TAG+".txt", fdir=const.CFG_DIR):
	e = validate(data)
	if not e[0]:
		return e
	return xt_func.xte_set(TAG, HELPER, data, _set, fname, fdir, user)