nf_conntrack_synproxy.h contains three inline functions.  The contents
of two of them are wrapped in CONFIG_NETFILTER_SYNPROXY checks and just
return NULL if it is not enabled.  The third does nothing if they return
NULL, so wrap its contents as well.

Signed-off-by: Jeremy Sowden <jer...@azazel.net>
---
 include/net/netfilter/nf_conntrack_synproxy.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/net/netfilter/nf_conntrack_synproxy.h 
b/include/net/netfilter/nf_conntrack_synproxy.h
index c22f0c11cc82..6a3ab081e4bf 100644
--- a/include/net/netfilter/nf_conntrack_synproxy.h
+++ b/include/net/netfilter/nf_conntrack_synproxy.h
@@ -32,6 +32,7 @@ static inline struct nf_conn_synproxy 
*nfct_synproxy_ext_add(struct nf_conn *ct)
 static inline bool nf_ct_add_synproxy(struct nf_conn *ct,
                                      const struct nf_conn *tmpl)
 {
+#if IS_ENABLED(CONFIG_NETFILTER_SYNPROXY)
        if (tmpl && nfct_synproxy(tmpl)) {
                if (!nfct_seqadj_ext_add(ct))
                        return false;
@@ -39,6 +40,7 @@ static inline bool nf_ct_add_synproxy(struct nf_conn *ct,
                if (!nfct_synproxy_ext_add(ct))
                        return false;
        }
+#endif
 
        return true;
 }
-- 
2.23.0.rc1

Reply via email to