afs: Keep and pass sockaddr_rxrpc addresses rather than in_addr

Keep and pass sockaddr_rxrpc addresses around rather than keeping and
passing in_addr addresses to allow for the use of IPv6 and non-standard
port numbers in future.

This also allows the port and service_id fields to be removed from the
afs_call struct.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells
2017-11-02 15:27:47 +00:00
parent ad6a942a9e
commit 4d9df9868f
10 changed files with 85 additions and 130 deletions

View File

@@ -248,8 +248,8 @@ struct afs_server *afs_volume_pick_fileserver(struct afs_vnode *vnode)
case 0:
afs_get_server(server);
up_read(&volume->server_sem);
_leave(" = %p (picked %08x)",
server, ntohl(server->addr.s_addr));
_leave(" = %p (picked %pIS)",
server, &server->addr.transport);
return server;
case -ENETUNREACH:
@@ -303,9 +303,8 @@ int afs_volume_release_fileserver(struct afs_vnode *vnode,
struct afs_volume *volume = vnode->volume;
unsigned loop;
_enter("%s,%08x,%d",
volume->vlocation->vldb.name, ntohl(server->addr.s_addr),
result);
_enter("%s,%pIS,%d",
volume->vlocation->vldb.name, &server->addr.transport, result);
switch (result) {
/* success */