diff options
| author | 2021-10-07 00:40:17 +0200 | |
|---|---|---|
| committer | 2021-10-07 00:40:17 +0200 | |
| commit | b08cadbd3b8721db738d9a00ef3ce3ed667e6d9c (patch) | |
| tree | 1b44ef760764ea19f82fd80088135d23ab565d2d /net/netfilter/xt_LOG.c | |
| parent | objtool: Support pv_opsindirect calls for noinstr (diff) | |
| parent | objtool: Remove redundant 'len' field from struct section (diff) | |
| download | linux-dev-b08cadbd3b8721db738d9a00ef3ce3ed667e6d9c.tar.xz linux-dev-b08cadbd3b8721db738d9a00ef3ce3ed667e6d9c.zip | |
Merge branch 'objtool/urgent'
Fixup conflicts.
# Conflicts:
# tools/objtool/check.c
Diffstat (limited to 'net/netfilter/xt_LOG.c')
| -rw-r--r-- | net/netfilter/xt_LOG.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/netfilter/xt_LOG.c b/net/netfilter/xt_LOG.c index 2ff75f7637b0..f39244f9c0ed 100644 --- a/net/netfilter/xt_LOG.c +++ b/net/netfilter/xt_LOG.c @@ -44,6 +44,7 @@ log_tg(struct sk_buff *skb, const struct xt_action_param *par) static int log_tg_check(const struct xt_tgchk_param *par) { const struct xt_log_info *loginfo = par->targinfo; + int ret; if (par->family != NFPROTO_IPV4 && par->family != NFPROTO_IPV6) return -EINVAL; @@ -58,7 +59,14 @@ static int log_tg_check(const struct xt_tgchk_param *par) return -EINVAL; } - return nf_logger_find_get(par->family, NF_LOG_TYPE_LOG); + ret = nf_logger_find_get(par->family, NF_LOG_TYPE_LOG); + if (ret != 0 && !par->nft_compat) { + request_module("%s", "nf_log_syslog"); + + ret = nf_logger_find_get(par->family, NF_LOG_TYPE_LOG); + } + + return ret; } static void log_tg_destroy(const struct xt_tgdtor_param *par) |
