Commit 0af03871 authored by David S. Miller's avatar David S. Miller

Merge branch 'sctp-info-dump'

Xin Long says:

====================
sctp: add some missing peer_capables in sctp info dump

The 1st patch removes the unused and obsolete hostname_address from
sctp_association peer and also the bit from sctp_info peer_capables,
and then reuses its bit for reconf_capable and use the higher
available bit for intl_capable in the 2nd patch.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9bf55bd4 ab4f1e28
...@@ -1711,7 +1711,6 @@ struct sctp_association { ...@@ -1711,7 +1711,6 @@ struct sctp_association {
__u16 ecn_capable:1, /* Can peer do ECN? */ __u16 ecn_capable:1, /* Can peer do ECN? */
ipv4_address:1, /* Peer understands IPv4 addresses? */ ipv4_address:1, /* Peer understands IPv4 addresses? */
ipv6_address:1, /* Peer understands IPv6 addresses? */ ipv6_address:1, /* Peer understands IPv6 addresses? */
hostname_address:1, /* Peer understands DNS addresses? */
asconf_capable:1, /* Does peer support ADDIP? */ asconf_capable:1, /* Does peer support ADDIP? */
prsctp_capable:1, /* Can peer do PR-SCTP? */ prsctp_capable:1, /* Can peer do PR-SCTP? */
reconf_capable:1, /* Can peer do RE-CONFIG? */ reconf_capable:1, /* Can peer do RE-CONFIG? */
......
...@@ -2207,7 +2207,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, ...@@ -2207,7 +2207,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net,
break; break;
case SCTP_PARAM_HOST_NAME_ADDRESS: case SCTP_PARAM_HOST_NAME_ADDRESS:
/* Tell the peer, we won't support this param. */ /* This param has been Deprecated, send ABORT. */
sctp_process_hn_param(asoc, param, chunk, err_chunk); sctp_process_hn_param(asoc, param, chunk, err_chunk);
retval = SCTP_IERROR_ABORT; retval = SCTP_IERROR_ABORT;
break; break;
...@@ -2589,10 +2589,6 @@ static int sctp_process_param(struct sctp_association *asoc, ...@@ -2589,10 +2589,6 @@ static int sctp_process_param(struct sctp_association *asoc,
asoc->cookie_life = ktime_add_ms(asoc->cookie_life, stale); asoc->cookie_life = ktime_add_ms(asoc->cookie_life, stale);
break; break;
case SCTP_PARAM_HOST_NAME_ADDRESS:
pr_debug("%s: unimplemented SCTP_HOST_NAME_ADDRESS\n", __func__);
break;
case SCTP_PARAM_SUPPORTED_ADDRESS_TYPES: case SCTP_PARAM_SUPPORTED_ADDRESS_TYPES:
/* Turn off the default values first so we'll know which /* Turn off the default values first so we'll know which
* ones are really set by the peer. * ones are really set by the peer.
...@@ -2624,10 +2620,6 @@ static int sctp_process_param(struct sctp_association *asoc, ...@@ -2624,10 +2620,6 @@ static int sctp_process_param(struct sctp_association *asoc,
asoc->peer.ipv6_address = 1; asoc->peer.ipv6_address = 1;
break; break;
case SCTP_PARAM_HOST_NAME_ADDRESS:
asoc->peer.hostname_address = 1;
break;
default: /* Just ignore anything else. */ default: /* Just ignore anything else. */
break; break;
} }
......
...@@ -5192,10 +5192,11 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc, ...@@ -5192,10 +5192,11 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
info->sctpi_peer_rwnd = asoc->peer.rwnd; info->sctpi_peer_rwnd = asoc->peer.rwnd;
info->sctpi_peer_tag = asoc->c.peer_vtag; info->sctpi_peer_tag = asoc->c.peer_vtag;
mask = asoc->peer.ecn_capable << 1; mask = asoc->peer.intl_capable << 1;
mask = (mask | asoc->peer.ecn_capable) << 1;
mask = (mask | asoc->peer.ipv4_address) << 1; mask = (mask | asoc->peer.ipv4_address) << 1;
mask = (mask | asoc->peer.ipv6_address) << 1; mask = (mask | asoc->peer.ipv6_address) << 1;
mask = (mask | asoc->peer.hostname_address) << 1; mask = (mask | asoc->peer.reconf_capable) << 1;
mask = (mask | asoc->peer.asconf_capable) << 1; mask = (mask | asoc->peer.asconf_capable) << 1;
mask = (mask | asoc->peer.prsctp_capable) << 1; mask = (mask | asoc->peer.prsctp_capable) << 1;
mask = (mask | asoc->peer.auth_capable); mask = (mask | asoc->peer.auth_capable);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment