tree c3023f226eac22b32bbcc3cfe09af6625f91443d
parent 14ab9b867aa6c107b4886bdc5b23f277ab10792e
author Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> Fri, 12 Aug 2005 04:37:16 
-0700
committer David S. Miller <[EMAIL PROTECTED]> Tue, 30 Aug 2005 05:56:49 -0700

[TCPDIAG]: Introduce CONFIG_IP_TCPDIAG_DCCP

Similar to CONFIG_IP_TCPDIAG_IPV6

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/ipv4/Kconfig    |    9 ++++++---
 net/ipv4/tcp_diag.c |    8 ++++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -419,15 +419,18 @@ config IP_TCPDIAG
        ---help---
          Support for TCP socket monitoring interface used by native Linux
          tools such as ss. ss is included in iproute2, currently downloadable
-         at <http://developer.osdl.org/dev/iproute2>. If you want IPv6 support
-         and have selected IPv6 as a module, you need to build this as a
-         module too.
+         at <http://developer.osdl.org/dev/iproute2>. If you want IPv6 or DCCP
+         support and have selected IPv6 or DCCP as a module, you need to build
+         this as a module too.
          
          If unsure, say Y.
 
 config IP_TCPDIAG_IPV6
        def_bool (IP_TCPDIAG=y && IPV6=y) || (IP_TCPDIAG=m && IPV6)
 
+config IP_TCPDIAG_DCCP
+       def_bool (IP_TCPDIAG=y && IP_DCCP=y) || (IP_TCPDIAG=m && IP_DCCP)
+
 config TCP_CONG_ADVANCED
        bool "TCP: advanced congestion control"
        ---help---
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -45,7 +45,7 @@ static struct sock *tcpnl;
 #define TCPDIAG_PUT(skb, attrtype, attrlen) \
        RTA_DATA(__RTA_PUT(skb, attrtype, attrlen))
 
-#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)
+#ifdef CONFIG_IP_TCPDIAG_DCCP
 extern struct inet_hashinfo dccp_hashinfo;
 #endif
 
@@ -216,7 +216,7 @@ static int tcpdiag_get_exact(struct sk_b
        struct tcpdiagreq *req = NLMSG_DATA(nlh);
        struct sk_buff *rep;
        struct inet_hashinfo *hashinfo = &tcp_hashinfo;
-#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)
+#ifdef CONFIG_IP_TCPDIAG_DCCP
        if (nlh->nlmsg_type == DCCPDIAG_GETSOCK)
                hashinfo = &dccp_hashinfo;
 #endif
@@ -614,7 +614,7 @@ static int tcpdiag_dump(struct sk_buff *
        s_i = cb->args[1];
        s_num = num = cb->args[2];
                hashinfo = &tcp_hashinfo;
-#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)
+#ifdef CONFIG_IP_TCPDIAG_DCCP
        if (cb->nlh->nlmsg_type == DCCPDIAG_GETSOCK)
                hashinfo = &dccp_hashinfo;
 #endif
@@ -752,7 +752,7 @@ tcpdiag_rcv_msg(struct sk_buff *skb, str
                return 0;
 
        if (nlh->nlmsg_type != TCPDIAG_GETSOCK
-#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)
+#ifdef CONFIG_IP_TCPDIAG_DCCP
            && nlh->nlmsg_type != DCCPDIAG_GETSOCK
 #endif
           )
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to