aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_metrics.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2013-10-09 06:05:48 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-09 13:04:03 -0400
commitc2bb06db59eaf92eb5ca9c6faed590597c6ceccb (patch)
tree7e9018dd587e8ec552d5d101981f42f101b16dcd /net/ipv4/tcp_metrics.c
parentf69b923a758f598fd6bb69e57564b59506f4f1fc (diff)
net: fix build errors if ipv6 is disabled
CONFIG_IPV6=n is still a valid choice ;) It appears we can remove dead code. Reported-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r--net/ipv4/tcp_metrics.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 27535fd5ea10..8fcc2cb9dba4 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -251,10 +251,12 @@ static struct tcp_metrics_block *__tcp_get_metrics_tw(struct inet_timewait_sock
251 addr.addr.a4 = tw->tw_daddr; 251 addr.addr.a4 = tw->tw_daddr;
252 hash = (__force unsigned int) addr.addr.a4; 252 hash = (__force unsigned int) addr.addr.a4;
253 break; 253 break;
254#if IS_ENABLED(CONFIG_IPV6)
254 case AF_INET6: 255 case AF_INET6:
255 *(struct in6_addr *)addr.addr.a6 = tw->tw_v6_daddr; 256 *(struct in6_addr *)addr.addr.a6 = tw->tw_v6_daddr;
256 hash = ipv6_addr_hash(&tw->tw_v6_daddr); 257 hash = ipv6_addr_hash(&tw->tw_v6_daddr);
257 break; 258 break;
259#endif
258 default: 260 default:
259 return NULL; 261 return NULL;
260 } 262 }
@@ -286,10 +288,12 @@ static struct tcp_metrics_block *tcp_get_metrics(struct sock *sk,
286 addr.addr.a4 = inet_sk(sk)->inet_daddr; 288 addr.addr.a4 = inet_sk(sk)->inet_daddr;
287 hash = (__force unsigned int) addr.addr.a4; 289 hash = (__force unsigned int) addr.addr.a4;
288 break; 290 break;
291#if IS_ENABLED(CONFIG_IPV6)
289 case AF_INET6: 292 case AF_INET6:
290 *(struct in6_addr *)addr.addr.a6 = sk->sk_v6_daddr; 293 *(struct in6_addr *)addr.addr.a6 = sk->sk_v6_daddr;
291 hash = ipv6_addr_hash(&sk->sk_v6_daddr); 294 hash = ipv6_addr_hash(&sk->sk_v6_daddr);
292 break; 295 break;
296#endif
293 default: 297 default:
294 return NULL; 298 return NULL;
295 } 299 }