diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /fs | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'fs')
-rw-r--r-- | fs/afs/proc.c | 4 | ||||
-rw-r--r-- | fs/afs/server.c | 9 | ||||
-rw-r--r-- | fs/cifs/cifs_spnego.c | 6 | ||||
-rw-r--r-- | fs/cifs/connect.c | 8 | ||||
-rw-r--r-- | fs/dlm/netlink.c | 2 | ||||
-rw-r--r-- | fs/lockd/host.c | 8 | ||||
-rw-r--r-- | fs/lockd/mon.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfsroot.c | 6 | ||||
-rw-r--r-- | fs/nfs/super.c | 6 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 4 | ||||
-rw-r--r-- | fs/nfsd/nfsctl.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/netdebug.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/cluster/nodemanager.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 29 |
14 files changed, 45 insertions, 51 deletions
diff --git a/fs/afs/proc.c b/fs/afs/proc.c index 9f7d1ae70269..7578c1ab9e0b 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c | |||
@@ -646,7 +646,7 @@ static int afs_proc_cell_vlservers_show(struct seq_file *m, void *v) | |||
646 | } | 646 | } |
647 | 647 | ||
648 | /* display one cell per line on subsequent lines */ | 648 | /* display one cell per line on subsequent lines */ |
649 | seq_printf(m, "%u.%u.%u.%u\n", NIPQUAD(addr->s_addr)); | 649 | seq_printf(m, "%pI4\n", &addr->s_addr); |
650 | return 0; | 650 | return 0; |
651 | } | 651 | } |
652 | 652 | ||
@@ -737,7 +737,7 @@ static int afs_proc_cell_servers_show(struct seq_file *m, void *v) | |||
737 | } | 737 | } |
738 | 738 | ||
739 | /* display one cell per line on subsequent lines */ | 739 | /* display one cell per line on subsequent lines */ |
740 | sprintf(ipaddr, "%u.%u.%u.%u", NIPQUAD(server->addr)); | 740 | sprintf(ipaddr, "%pI4", &server->addr); |
741 | seq_printf(m, "%3d %-15.15s %5d\n", | 741 | seq_printf(m, "%3d %-15.15s %5d\n", |
742 | atomic_read(&server->usage), ipaddr, server->fs_state); | 742 | atomic_read(&server->usage), ipaddr, server->fs_state); |
743 | 743 | ||
diff --git a/fs/afs/server.c b/fs/afs/server.c index 28f2451419e1..f49099516675 100644 --- a/fs/afs/server.c +++ b/fs/afs/server.c | |||
@@ -105,7 +105,7 @@ struct afs_server *afs_lookup_server(struct afs_cell *cell, | |||
105 | { | 105 | { |
106 | struct afs_server *server, *candidate; | 106 | struct afs_server *server, *candidate; |
107 | 107 | ||
108 | _enter("%p,"NIPQUAD_FMT, cell, NIPQUAD(addr->s_addr)); | 108 | _enter("%p,%pI4", cell, &addr->s_addr); |
109 | 109 | ||
110 | /* quick scan of the list to see if we already have the server */ | 110 | /* quick scan of the list to see if we already have the server */ |
111 | read_lock(&cell->servers_lock); | 111 | read_lock(&cell->servers_lock); |
@@ -168,9 +168,8 @@ found_server: | |||
168 | server_in_two_cells: | 168 | server_in_two_cells: |
169 | write_unlock(&cell->servers_lock); | 169 | write_unlock(&cell->servers_lock); |
170 | kfree(candidate); | 170 | kfree(candidate); |
171 | printk(KERN_NOTICE "kAFS:" | 171 | printk(KERN_NOTICE "kAFS: Server %pI4 appears to be in two cells\n", |
172 | " Server "NIPQUAD_FMT" appears to be in two cells\n", | 172 | addr); |
173 | NIPQUAD(*addr)); | ||
174 | _leave(" = -EEXIST"); | 173 | _leave(" = -EEXIST"); |
175 | return ERR_PTR(-EEXIST); | 174 | return ERR_PTR(-EEXIST); |
176 | } | 175 | } |
@@ -184,7 +183,7 @@ struct afs_server *afs_find_server(const struct in_addr *_addr) | |||
184 | struct rb_node *p; | 183 | struct rb_node *p; |
185 | struct in_addr addr = *_addr; | 184 | struct in_addr addr = *_addr; |
186 | 185 | ||
187 | _enter(NIPQUAD_FMT, NIPQUAD(addr.s_addr)); | 186 | _enter("%pI4", &addr.s_addr); |
188 | 187 | ||
189 | read_lock(&afs_servers_lock); | 188 | read_lock(&afs_servers_lock); |
190 | 189 | ||
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 0ab2fb5afef1..3fd3a9df043a 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c | |||
@@ -121,11 +121,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | |||
121 | 121 | ||
122 | /* add the server address */ | 122 | /* add the server address */ |
123 | if (server->addr.sockAddr.sin_family == AF_INET) | 123 | if (server->addr.sockAddr.sin_family == AF_INET) |
124 | sprintf(dp, "ip4=" NIPQUAD_FMT, | 124 | sprintf(dp, "ip4=%pI4", &server->addr.sockAddr.sin_addr); |
125 | NIPQUAD(server->addr.sockAddr.sin_addr)); | ||
126 | else if (server->addr.sockAddr.sin_family == AF_INET6) | 125 | else if (server->addr.sockAddr.sin_family == AF_INET6) |
127 | sprintf(dp, "ip6=" NIP6_SEQFMT, | 126 | sprintf(dp, "ip6=%pi6", &server->addr.sockAddr6.sin6_addr); |
128 | NIP6(server->addr.sockAddr6.sin6_addr)); | ||
129 | else | 127 | else |
130 | goto out; | 128 | goto out; |
131 | 129 | ||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d2ea95bef1c1..e9ea394ee075 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2270,11 +2270,11 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2270 | /* new SMB session uses our srvTcp ref */ | 2270 | /* new SMB session uses our srvTcp ref */ |
2271 | pSesInfo->server = srvTcp; | 2271 | pSesInfo->server = srvTcp; |
2272 | if (srvTcp->addr.sockAddr6.sin6_family == AF_INET6) | 2272 | if (srvTcp->addr.sockAddr6.sin6_family == AF_INET6) |
2273 | sprintf(pSesInfo->serverName, NIP6_FMT, | 2273 | sprintf(pSesInfo->serverName, "%pI6", |
2274 | NIP6(srvTcp->addr.sockAddr6.sin6_addr)); | 2274 | &srvTcp->addr.sockAddr6.sin6_addr); |
2275 | else | 2275 | else |
2276 | sprintf(pSesInfo->serverName, NIPQUAD_FMT, | 2276 | sprintf(pSesInfo->serverName, "%pI4", |
2277 | NIPQUAD(srvTcp->addr.sockAddr.sin_addr.s_addr)); | 2277 | &srvTcp->addr.sockAddr.sin_addr.s_addr); |
2278 | 2278 | ||
2279 | write_lock(&cifs_tcp_ses_lock); | 2279 | write_lock(&cifs_tcp_ses_lock); |
2280 | list_add(&pSesInfo->smb_ses_list, &srvTcp->smb_ses_list); | 2280 | list_add(&pSesInfo->smb_ses_list, &srvTcp->smb_ses_list); |
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 18bda83cc892..aa2a5775a027 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c | |||
@@ -127,8 +127,8 @@ static void fill_data(struct dlm_lock_data *data, struct dlm_lkb *lkb) | |||
127 | 127 | ||
128 | void dlm_timeout_warn(struct dlm_lkb *lkb) | 128 | void dlm_timeout_warn(struct dlm_lkb *lkb) |
129 | { | 129 | { |
130 | struct sk_buff *uninitialized_var(send_skb); | ||
130 | struct dlm_lock_data *data; | 131 | struct dlm_lock_data *data; |
131 | struct sk_buff *send_skb; | ||
132 | size_t size; | 132 | size_t size; |
133 | int rv; | 133 | int rv; |
134 | 134 | ||
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 70fc63a1727b..e05d04416037 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -115,14 +115,14 @@ static void nlm_display_address(const struct sockaddr *sap, | |||
115 | snprintf(buf, len, "unspecified"); | 115 | snprintf(buf, len, "unspecified"); |
116 | break; | 116 | break; |
117 | case AF_INET: | 117 | case AF_INET: |
118 | snprintf(buf, len, NIPQUAD_FMT, NIPQUAD(sin->sin_addr.s_addr)); | 118 | snprintf(buf, len, "%pI4", &sin->sin_addr.s_addr); |
119 | break; | 119 | break; |
120 | case AF_INET6: | 120 | case AF_INET6: |
121 | if (ipv6_addr_v4mapped(&sin6->sin6_addr)) | 121 | if (ipv6_addr_v4mapped(&sin6->sin6_addr)) |
122 | snprintf(buf, len, NIPQUAD_FMT, | 122 | snprintf(buf, len, "%pI4", |
123 | NIPQUAD(sin6->sin6_addr.s6_addr32[3])); | 123 | &sin6->sin6_addr.s6_addr32[3]); |
124 | else | 124 | else |
125 | snprintf(buf, len, NIP6_FMT, NIP6(sin6->sin6_addr)); | 125 | snprintf(buf, len, "%pI6", &sin6->sin6_addr); |
126 | break; | 126 | break; |
127 | default: | 127 | default: |
128 | snprintf(buf, len, "unsupported address family"); | 128 | snprintf(buf, len, "unsupported address family"); |
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index 4e7e958e8f67..ffd3461f75ef 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c | |||
@@ -179,7 +179,7 @@ static __be32 *xdr_encode_mon_name(__be32 *p, struct nsm_args *argp) | |||
179 | 179 | ||
180 | if (!nsm_use_hostnames) { | 180 | if (!nsm_use_hostnames) { |
181 | snprintf(buffer, XDR_ADDRBUF_LEN, | 181 | snprintf(buffer, XDR_ADDRBUF_LEN, |
182 | NIPQUAD_FMT, NIPQUAD(argp->addr)); | 182 | "%pI4", &argp->addr); |
183 | name = buffer; | 183 | name = buffer; |
184 | } | 184 | } |
185 | 185 | ||
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 8478fc25daee..d74d16ce0d49 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -329,7 +329,7 @@ static int __init root_nfs_addr(void) | |||
329 | } | 329 | } |
330 | 330 | ||
331 | snprintf(nfs_data.hostname, sizeof(nfs_data.hostname), | 331 | snprintf(nfs_data.hostname, sizeof(nfs_data.hostname), |
332 | "%u.%u.%u.%u", NIPQUAD(servaddr)); | 332 | "%pI4", &servaddr); |
333 | return 0; | 333 | return 0; |
334 | } | 334 | } |
335 | 335 | ||
@@ -421,8 +421,8 @@ static int __init root_nfs_getport(int program, int version, int proto) | |||
421 | { | 421 | { |
422 | struct sockaddr_in sin; | 422 | struct sockaddr_in sin; |
423 | 423 | ||
424 | printk(KERN_NOTICE "Looking up port of RPC %d/%d on %u.%u.%u.%u\n", | 424 | printk(KERN_NOTICE "Looking up port of RPC %d/%d on %pI4\n", |
425 | program, version, NIPQUAD(servaddr)); | 425 | program, version, &servaddr); |
426 | set_sockaddr(&sin, servaddr, 0); | 426 | set_sockaddr(&sin, servaddr, 0); |
427 | return rpcb_getport_sync(&sin, program, version, proto); | 427 | return rpcb_getport_sync(&sin, program, version, proto); |
428 | } | 428 | } |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index f48db679a1c6..bb0313ac9e1f 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -462,14 +462,12 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss, | |||
462 | switch (sap->sa_family) { | 462 | switch (sap->sa_family) { |
463 | case AF_INET: { | 463 | case AF_INET: { |
464 | struct sockaddr_in *sin = (struct sockaddr_in *)sap; | 464 | struct sockaddr_in *sin = (struct sockaddr_in *)sap; |
465 | seq_printf(m, ",mountaddr=" NIPQUAD_FMT, | 465 | seq_printf(m, ",mountaddr=%pI4", &sin->sin_addr.s_addr); |
466 | NIPQUAD(sin->sin_addr.s_addr)); | ||
467 | break; | 466 | break; |
468 | } | 467 | } |
469 | case AF_INET6: { | 468 | case AF_INET6: { |
470 | struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; | 469 | struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; |
471 | seq_printf(m, ",mountaddr=" NIP6_FMT, | 470 | seq_printf(m, ",mountaddr=%pI6", &sin6->sin6_addr); |
472 | NIP6(sin6->sin6_addr)); | ||
473 | break; | 471 | break; |
474 | } | 472 | } |
475 | default: | 473 | default: |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 1a052ac2bde9..bf4cd46a5a11 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -719,8 +719,8 @@ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
719 | status = nfserr_clid_inuse; | 719 | status = nfserr_clid_inuse; |
720 | if (!same_creds(&conf->cl_cred, &rqstp->rq_cred) | 720 | if (!same_creds(&conf->cl_cred, &rqstp->rq_cred) |
721 | || conf->cl_addr != sin->sin_addr.s_addr) { | 721 | || conf->cl_addr != sin->sin_addr.s_addr) { |
722 | dprintk("NFSD: setclientid: string in use by client" | 722 | dprintk("NFSD: setclientid: string in use by clientat %pI4\n", |
723 | "at %u.%u.%u.%u\n", NIPQUAD(conf->cl_addr)); | 723 | &conf->cl_addr); |
724 | goto out; | 724 | goto out; |
725 | } | 725 | } |
726 | } | 726 | } |
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index e3f9783fdcf7..77d7b8c531a6 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -330,7 +330,7 @@ static ssize_t failover_unlock_ip(struct file *file, char *buf, size_t size) | |||
330 | return -EINVAL; | 330 | return -EINVAL; |
331 | 331 | ||
332 | /* get ipv4 address */ | 332 | /* get ipv4 address */ |
333 | if (sscanf(fo_path, NIPQUAD_FMT "%c", &b1, &b2, &b3, &b4, &c) != 4) | 333 | if (sscanf(fo_path, "%u.%u.%u.%u%c", &b1, &b2, &b3, &b4, &c) != 4) |
334 | return -EINVAL; | 334 | return -EINVAL; |
335 | if (b1 > 255 || b2 > 255 || b3 > 255 || b4 > 255) | 335 | if (b1 > 255 || b2 > 255 || b3 > 255 || b4 > 255) |
336 | return -EINVAL; | 336 | return -EINVAL; |
diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index 52276c02f710..f8424874fa07 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c | |||
@@ -304,8 +304,8 @@ static int sc_seq_show(struct seq_file *seq, void *v) | |||
304 | * use of it here generates a warning with -Wbitwise */ | 304 | * use of it here generates a warning with -Wbitwise */ |
305 | seq_printf(seq, "%p:\n" | 305 | seq_printf(seq, "%p:\n" |
306 | " krefs: %d\n" | 306 | " krefs: %d\n" |
307 | " sock: %u.%u.%u.%u:%u -> " | 307 | " sock: %pI4:%u -> " |
308 | "%u.%u.%u.%u:%u\n" | 308 | "%pI4:%u\n" |
309 | " remote node: %s\n" | 309 | " remote node: %s\n" |
310 | " page off: %zu\n" | 310 | " page off: %zu\n" |
311 | " handshake ok: %u\n" | 311 | " handshake ok: %u\n" |
@@ -319,8 +319,8 @@ static int sc_seq_show(struct seq_file *seq, void *v) | |||
319 | " func type: %u\n", | 319 | " func type: %u\n", |
320 | sc, | 320 | sc, |
321 | atomic_read(&sc->sc_kref.refcount), | 321 | atomic_read(&sc->sc_kref.refcount), |
322 | NIPQUAD(saddr), inet ? ntohs(sport) : 0, | 322 | &saddr, inet ? ntohs(sport) : 0, |
323 | NIPQUAD(daddr), inet ? ntohs(dport) : 0, | 323 | &daddr, inet ? ntohs(dport) : 0, |
324 | sc->sc_node->nd_name, | 324 | sc->sc_node->nd_name, |
325 | sc->sc_page_off, | 325 | sc->sc_page_off, |
326 | sc->sc_handshake_ok, | 326 | sc->sc_handshake_ok, |
diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c index 816a3f61330c..70e8fa9e2539 100644 --- a/fs/ocfs2/cluster/nodemanager.c +++ b/fs/ocfs2/cluster/nodemanager.c | |||
@@ -250,7 +250,7 @@ static ssize_t o2nm_node_ipv4_port_write(struct o2nm_node *node, | |||
250 | 250 | ||
251 | static ssize_t o2nm_node_ipv4_address_read(struct o2nm_node *node, char *page) | 251 | static ssize_t o2nm_node_ipv4_address_read(struct o2nm_node *node, char *page) |
252 | { | 252 | { |
253 | return sprintf(page, "%u.%u.%u.%u\n", NIPQUAD(node->nd_ipv4_address)); | 253 | return sprintf(page, "%pI4\n", &node->nd_ipv4_address); |
254 | } | 254 | } |
255 | 255 | ||
256 | static ssize_t o2nm_node_ipv4_address_write(struct o2nm_node *node, | 256 | static ssize_t o2nm_node_ipv4_address_write(struct o2nm_node *node, |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 2bcf706d9dd3..9fbe849f6344 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -1597,8 +1597,8 @@ static void o2net_start_connect(struct work_struct *work) | |||
1597 | ret = sock->ops->bind(sock, (struct sockaddr *)&myaddr, | 1597 | ret = sock->ops->bind(sock, (struct sockaddr *)&myaddr, |
1598 | sizeof(myaddr)); | 1598 | sizeof(myaddr)); |
1599 | if (ret) { | 1599 | if (ret) { |
1600 | mlog(ML_ERROR, "bind failed with %d at address %u.%u.%u.%u\n", | 1600 | mlog(ML_ERROR, "bind failed with %d at address %pI4\n", |
1601 | ret, NIPQUAD(mynode->nd_ipv4_address)); | 1601 | ret, &mynode->nd_ipv4_address); |
1602 | goto out; | 1602 | goto out; |
1603 | } | 1603 | } |
1604 | 1604 | ||
@@ -1790,17 +1790,16 @@ static int o2net_accept_one(struct socket *sock) | |||
1790 | 1790 | ||
1791 | node = o2nm_get_node_by_ip(sin.sin_addr.s_addr); | 1791 | node = o2nm_get_node_by_ip(sin.sin_addr.s_addr); |
1792 | if (node == NULL) { | 1792 | if (node == NULL) { |
1793 | mlog(ML_NOTICE, "attempt to connect from unknown node at " | 1793 | mlog(ML_NOTICE, "attempt to connect from unknown node at %pI4:%d\n", |
1794 | "%u.%u.%u.%u:%d\n", NIPQUAD(sin.sin_addr.s_addr), | 1794 | &sin.sin_addr.s_addr, ntohs(sin.sin_port)); |
1795 | ntohs(sin.sin_port)); | ||
1796 | ret = -EINVAL; | 1795 | ret = -EINVAL; |
1797 | goto out; | 1796 | goto out; |
1798 | } | 1797 | } |
1799 | 1798 | ||
1800 | if (o2nm_this_node() > node->nd_num) { | 1799 | if (o2nm_this_node() > node->nd_num) { |
1801 | mlog(ML_NOTICE, "unexpected connect attempted from a lower " | 1800 | mlog(ML_NOTICE, "unexpected connect attempted from a lower " |
1802 | "numbered node '%s' at " "%u.%u.%u.%u:%d with num %u\n", | 1801 | "numbered node '%s' at " "%pI4:%d with num %u\n", |
1803 | node->nd_name, NIPQUAD(sin.sin_addr.s_addr), | 1802 | node->nd_name, &sin.sin_addr.s_addr, |
1804 | ntohs(sin.sin_port), node->nd_num); | 1803 | ntohs(sin.sin_port), node->nd_num); |
1805 | ret = -EINVAL; | 1804 | ret = -EINVAL; |
1806 | goto out; | 1805 | goto out; |
@@ -1810,8 +1809,8 @@ static int o2net_accept_one(struct socket *sock) | |||
1810 | * and tries to connect before we see their heartbeat */ | 1809 | * and tries to connect before we see their heartbeat */ |
1811 | if (!o2hb_check_node_heartbeating_from_callback(node->nd_num)) { | 1810 | if (!o2hb_check_node_heartbeating_from_callback(node->nd_num)) { |
1812 | mlog(ML_CONN, "attempt to connect from node '%s' at " | 1811 | mlog(ML_CONN, "attempt to connect from node '%s' at " |
1813 | "%u.%u.%u.%u:%d but it isn't heartbeating\n", | 1812 | "%pI4:%d but it isn't heartbeating\n", |
1814 | node->nd_name, NIPQUAD(sin.sin_addr.s_addr), | 1813 | node->nd_name, &sin.sin_addr.s_addr, |
1815 | ntohs(sin.sin_port)); | 1814 | ntohs(sin.sin_port)); |
1816 | ret = -EINVAL; | 1815 | ret = -EINVAL; |
1817 | goto out; | 1816 | goto out; |
@@ -1827,8 +1826,8 @@ static int o2net_accept_one(struct socket *sock) | |||
1827 | spin_unlock(&nn->nn_lock); | 1826 | spin_unlock(&nn->nn_lock); |
1828 | if (ret) { | 1827 | if (ret) { |
1829 | mlog(ML_NOTICE, "attempt to connect from node '%s' at " | 1828 | mlog(ML_NOTICE, "attempt to connect from node '%s' at " |
1830 | "%u.%u.%u.%u:%d but it already has an open connection\n", | 1829 | "%pI4:%d but it already has an open connection\n", |
1831 | node->nd_name, NIPQUAD(sin.sin_addr.s_addr), | 1830 | node->nd_name, &sin.sin_addr.s_addr, |
1832 | ntohs(sin.sin_port)); | 1831 | ntohs(sin.sin_port)); |
1833 | goto out; | 1832 | goto out; |
1834 | } | 1833 | } |
@@ -1924,15 +1923,15 @@ static int o2net_open_listening_sock(__be32 addr, __be16 port) | |||
1924 | sock->sk->sk_reuse = 1; | 1923 | sock->sk->sk_reuse = 1; |
1925 | ret = sock->ops->bind(sock, (struct sockaddr *)&sin, sizeof(sin)); | 1924 | ret = sock->ops->bind(sock, (struct sockaddr *)&sin, sizeof(sin)); |
1926 | if (ret < 0) { | 1925 | if (ret < 0) { |
1927 | mlog(ML_ERROR, "unable to bind socket at %u.%u.%u.%u:%u, " | 1926 | mlog(ML_ERROR, "unable to bind socket at %pI4:%u, " |
1928 | "ret=%d\n", NIPQUAD(addr), ntohs(port), ret); | 1927 | "ret=%d\n", &addr, ntohs(port), ret); |
1929 | goto out; | 1928 | goto out; |
1930 | } | 1929 | } |
1931 | 1930 | ||
1932 | ret = sock->ops->listen(sock, 64); | 1931 | ret = sock->ops->listen(sock, 64); |
1933 | if (ret < 0) { | 1932 | if (ret < 0) { |
1934 | mlog(ML_ERROR, "unable to listen on %u.%u.%u.%u:%u, ret=%d\n", | 1933 | mlog(ML_ERROR, "unable to listen on %pI4:%u, ret=%d\n", |
1935 | NIPQUAD(addr), ntohs(port), ret); | 1934 | &addr, ntohs(port), ret); |
1936 | } | 1935 | } |
1937 | 1936 | ||
1938 | out: | 1937 | out: |