aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-11 17:37:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:56:49 -0400
commite41aac41e3856c87fee52c5b8bca71705d15449b (patch)
treec3023f226eac22b32bbcc3cfe09af6625f91443d /net/ipv4
parent14ab9b867aa6c107b4886bdc5b23f277ab10792e (diff)
[TCPDIAG]: Introduce CONFIG_IP_TCPDIAG_DCCP
Similar to CONFIG_IP_TCPDIAG_IPV6 Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/Kconfig9
-rw-r--r--net/ipv4/tcp_diag.c8
2 files changed, 10 insertions, 7 deletions
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 0b3d9f1d8069..c844954c1ad5 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -419,15 +419,18 @@ config IP_TCPDIAG
419 ---help--- 419 ---help---
420 Support for TCP socket monitoring interface used by native Linux 420 Support for TCP socket monitoring interface used by native Linux
421 tools such as ss. ss is included in iproute2, currently downloadable 421 tools such as ss. ss is included in iproute2, currently downloadable
422 at <http://developer.osdl.org/dev/iproute2>. If you want IPv6 support 422 at <http://developer.osdl.org/dev/iproute2>. If you want IPv6 or DCCP
423 and have selected IPv6 as a module, you need to build this as a 423 support and have selected IPv6 or DCCP as a module, you need to build
424 module too. 424 this as a module too.
425 425
426 If unsure, say Y. 426 If unsure, say Y.
427 427
428config IP_TCPDIAG_IPV6 428config IP_TCPDIAG_IPV6
429 def_bool (IP_TCPDIAG=y && IPV6=y) || (IP_TCPDIAG=m && IPV6) 429 def_bool (IP_TCPDIAG=y && IPV6=y) || (IP_TCPDIAG=m && IPV6)
430 430
431config IP_TCPDIAG_DCCP
432 def_bool (IP_TCPDIAG=y && IP_DCCP=y) || (IP_TCPDIAG=m && IP_DCCP)
433
431config TCP_CONG_ADVANCED 434config TCP_CONG_ADVANCED
432 bool "TCP: advanced congestion control" 435 bool "TCP: advanced congestion control"
433 ---help--- 436 ---help---
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index f5fc84aaa9b4..8bf495c698f8 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -45,7 +45,7 @@ static struct sock *tcpnl;
45#define TCPDIAG_PUT(skb, attrtype, attrlen) \ 45#define TCPDIAG_PUT(skb, attrtype, attrlen) \
46 RTA_DATA(__RTA_PUT(skb, attrtype, attrlen)) 46 RTA_DATA(__RTA_PUT(skb, attrtype, attrlen))
47 47
48#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) 48#ifdef CONFIG_IP_TCPDIAG_DCCP
49extern struct inet_hashinfo dccp_hashinfo; 49extern struct inet_hashinfo dccp_hashinfo;
50#endif 50#endif
51 51
@@ -216,7 +216,7 @@ static int tcpdiag_get_exact(struct sk_buff *in_skb, const struct nlmsghdr *nlh)
216 struct tcpdiagreq *req = NLMSG_DATA(nlh); 216 struct tcpdiagreq *req = NLMSG_DATA(nlh);
217 struct sk_buff *rep; 217 struct sk_buff *rep;
218 struct inet_hashinfo *hashinfo = &tcp_hashinfo; 218 struct inet_hashinfo *hashinfo = &tcp_hashinfo;
219#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) 219#ifdef CONFIG_IP_TCPDIAG_DCCP
220 if (nlh->nlmsg_type == DCCPDIAG_GETSOCK) 220 if (nlh->nlmsg_type == DCCPDIAG_GETSOCK)
221 hashinfo = &dccp_hashinfo; 221 hashinfo = &dccp_hashinfo;
222#endif 222#endif
@@ -614,7 +614,7 @@ static int tcpdiag_dump(struct sk_buff *skb, struct netlink_callback *cb)
614 s_i = cb->args[1]; 614 s_i = cb->args[1];
615 s_num = num = cb->args[2]; 615 s_num = num = cb->args[2];
616 hashinfo = &tcp_hashinfo; 616 hashinfo = &tcp_hashinfo;
617#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) 617#ifdef CONFIG_IP_TCPDIAG_DCCP
618 if (cb->nlh->nlmsg_type == DCCPDIAG_GETSOCK) 618 if (cb->nlh->nlmsg_type == DCCPDIAG_GETSOCK)
619 hashinfo = &dccp_hashinfo; 619 hashinfo = &dccp_hashinfo;
620#endif 620#endif
@@ -752,7 +752,7 @@ tcpdiag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
752 return 0; 752 return 0;
753 753
754 if (nlh->nlmsg_type != TCPDIAG_GETSOCK 754 if (nlh->nlmsg_type != TCPDIAG_GETSOCK
755#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) 755#ifdef CONFIG_IP_TCPDIAG_DCCP
756 && nlh->nlmsg_type != DCCPDIAG_GETSOCK 756 && nlh->nlmsg_type != DCCPDIAG_GETSOCK
757#endif 757#endif
758 ) 758 )