aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 0a50361e3d83..82a9b6286dd3 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -342,8 +342,7 @@ static void xs_format_ipv6_peer_addresses(struct rpc_xprt *xprt,
342 342
343 buf = kzalloc(40, GFP_KERNEL); 343 buf = kzalloc(40, GFP_KERNEL);
344 if (buf) { 344 if (buf) {
345 snprintf(buf, 40, NIP6_FMT, 345 snprintf(buf, 40, "%pI6",&addr->sin6_addr);
346 NIP6(addr->sin6_addr));
347 } 346 }
348 xprt->address_strings[RPC_DISPLAY_ADDR] = buf; 347 xprt->address_strings[RPC_DISPLAY_ADDR] = buf;
349 348
@@ -358,18 +357,17 @@ static void xs_format_ipv6_peer_addresses(struct rpc_xprt *xprt,
358 357
359 buf = kzalloc(64, GFP_KERNEL); 358 buf = kzalloc(64, GFP_KERNEL);
360 if (buf) { 359 if (buf) {
361 snprintf(buf, 64, "addr="NIP6_FMT" port=%u proto=%s", 360 snprintf(buf, 64, "addr=%pI6 port=%u proto=%s",
362 NIP6(addr->sin6_addr), 361 &addr->sin6_addr,
363 ntohs(addr->sin6_port), 362 ntohs(addr->sin6_port),
364 protocol); 363 protocol);
365 } 364 }
366 xprt->address_strings[RPC_DISPLAY_ALL] = buf; 365 xprt->address_strings[RPC_DISPLAY_ALL] = buf;
367 366
368 buf = kzalloc(36, GFP_KERNEL); 367 buf = kzalloc(36, GFP_KERNEL);
369 if (buf) { 368 if (buf)
370 snprintf(buf, 36, NIP6_SEQFMT, 369 snprintf(buf, 36, "%pi6", &addr->sin6_addr);
371 NIP6(addr->sin6_addr)); 370
372 }
373 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = buf; 371 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = buf;
374 372
375 buf = kzalloc(8, GFP_KERNEL); 373 buf = kzalloc(8, GFP_KERNEL);
@@ -381,10 +379,10 @@ static void xs_format_ipv6_peer_addresses(struct rpc_xprt *xprt,
381 379
382 buf = kzalloc(50, GFP_KERNEL); 380 buf = kzalloc(50, GFP_KERNEL);
383 if (buf) { 381 if (buf) {
384 snprintf(buf, 50, NIP6_FMT".%u.%u", 382 snprintf(buf, 50, "%pI6.%u.%u",
385 NIP6(addr->sin6_addr), 383 &addr->sin6_addr,
386 ntohs(addr->sin6_port) >> 8, 384 ntohs(addr->sin6_port) >> 8,
387 ntohs(addr->sin6_port) & 0xff); 385 ntohs(addr->sin6_port) & 0xff);
388 } 386 }
389 xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf; 387 xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;
390 388
@@ -1448,8 +1446,8 @@ static int xs_bind6(struct sock_xprt *transport, struct socket *sock)
1448 if (port > last) 1446 if (port > last)
1449 nloop++; 1447 nloop++;
1450 } while (err == -EADDRINUSE && nloop != 2); 1448 } while (err == -EADDRINUSE && nloop != 2);
1451 dprintk("RPC: xs_bind6 "NIP6_FMT":%u: %s (%d)\n", 1449 dprintk("RPC: xs_bind6 %pI6:%u: %s (%d)\n",
1452 NIP6(myaddr.sin6_addr), port, err ? "failed" : "ok", err); 1450 &myaddr.sin6_addr, port, err ? "failed" : "ok", err);
1453 return err; 1451 return err;
1454} 1452}
1455 1453