diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 4 | ||||
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 6 | ||||
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 7 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 26 |
4 files changed, 20 insertions, 23 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 4895c341e46d..8f067497c212 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -278,8 +278,8 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) | |||
278 | case AF_INET6: { | 278 | case AF_INET6: { |
279 | struct sockaddr_in6 *sin = | 279 | struct sockaddr_in6 *sin = |
280 | (struct sockaddr_in6 *)args->address; | 280 | (struct sockaddr_in6 *)args->address; |
281 | snprintf(servername, sizeof(servername), NIP6_FMT, | 281 | snprintf(servername, sizeof(servername), "%pI6", |
282 | NIP6(sin->sin6_addr)); | 282 | &sin->sin6_addr); |
283 | break; | 283 | break; |
284 | } | 284 | } |
285 | default: | 285 | default: |
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 41013dd66ac3..4c8adadc214d 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -305,9 +305,9 @@ static int rpcb_register_netid6(struct sockaddr_in6 *address_to_register, | |||
305 | snprintf(buf, sizeof(buf), "::.%u.%u", | 305 | snprintf(buf, sizeof(buf), "::.%u.%u", |
306 | port >> 8, port & 0xff); | 306 | port >> 8, port & 0xff); |
307 | else | 307 | else |
308 | snprintf(buf, sizeof(buf), NIP6_FMT".%u.%u", | 308 | snprintf(buf, sizeof(buf), "%pI6.%u.%u", |
309 | NIP6(address_to_register->sin6_addr), | 309 | &address_to_register->sin6_addr, |
310 | port >> 8, port & 0xff); | 310 | port >> 8, port & 0xff); |
311 | map->r_addr = buf; | 311 | map->r_addr = buf; |
312 | 312 | ||
313 | dprintk("RPC: %sregistering [%u, %u, %s, '%s'] with " | 313 | dprintk("RPC: %sregistering [%u, %u, %s, '%s'] with " |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index f24800f2c098..16f714a247bc 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -168,7 +168,7 @@ static void ip_map_request(struct cache_detail *cd, | |||
168 | ntohl(im->m_addr.s6_addr32[3]) >> 8 & 0xff, | 168 | ntohl(im->m_addr.s6_addr32[3]) >> 8 & 0xff, |
169 | ntohl(im->m_addr.s6_addr32[3]) >> 0 & 0xff); | 169 | ntohl(im->m_addr.s6_addr32[3]) >> 0 & 0xff); |
170 | } else { | 170 | } else { |
171 | snprintf(text_addr, 40, NIP6_FMT, NIP6(im->m_addr)); | 171 | snprintf(text_addr, 40, "%pI6", &im->m_addr); |
172 | } | 172 | } |
173 | qword_add(bpp, blen, im->m_class); | 173 | qword_add(bpp, blen, im->m_class); |
174 | qword_add(bpp, blen, text_addr); | 174 | qword_add(bpp, blen, text_addr); |
@@ -214,7 +214,7 @@ static int ip_map_parse(struct cache_detail *cd, | |||
214 | addr.s6_addr32[2] = htonl(0xffff); | 214 | addr.s6_addr32[2] = htonl(0xffff); |
215 | addr.s6_addr32[3] = | 215 | addr.s6_addr32[3] = |
216 | htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4); | 216 | htonl((((((b1<<8)|b2)<<8)|b3)<<8)|b4); |
217 | } else if (sscanf(buf, NIP6_FMT "%c", | 217 | } else if (sscanf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x%c", |
218 | &b1, &b2, &b3, &b4, &b5, &b6, &b7, &b8, &c) == 8) { | 218 | &b1, &b2, &b3, &b4, &b5, &b6, &b7, &b8, &c) == 8) { |
219 | addr.s6_addr16[0] = htons(b1); | 219 | addr.s6_addr16[0] = htons(b1); |
220 | addr.s6_addr16[1] = htons(b2); | 220 | addr.s6_addr16[1] = htons(b2); |
@@ -286,8 +286,7 @@ static int ip_map_show(struct seq_file *m, | |||
286 | ntohl(addr.s6_addr32[3]) >> 0 & 0xff, | 286 | ntohl(addr.s6_addr32[3]) >> 0 & 0xff, |
287 | dom); | 287 | dom); |
288 | } else { | 288 | } else { |
289 | seq_printf(m, "%s " NIP6_FMT " %s\n", | 289 | seq_printf(m, "%s %pI6 %s\n", im->m_class, &addr, dom); |
290 | im->m_class, NIP6(addr), dom); | ||
291 | } | 290 | } |
292 | return 0; | 291 | return 0; |
293 | } | 292 | } |
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 | ||