aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2016-05-02 11:58:46 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-03 15:51:15 -0400
commit60020e1857042387cdcd4cd6680a9e5496213379 (patch)
treeb0cff474233a2bd0f37734942f23afd3213486ad /net/tipc/socket.c
parent7c8bcfb1255fe9d929c227d67bdcd84430fd200b (diff)
tipc: propagate peer node capabilities to socket layer
During neighbor discovery, nodes advertise their capabilities as a bit map in a dedicated 16-bit field in the discovery message header. This bit map has so far only be stored in the node structure on the peer nodes, but we now see the need to keep a copy even in the socket structure. This commit adds this functionality. Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index d37a9401e182..94bd28639855 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -98,6 +98,7 @@ struct tipc_sock {
98 bool link_cong; 98 bool link_cong;
99 uint sent_unacked; 99 uint sent_unacked;
100 uint rcv_unacked; 100 uint rcv_unacked;
101 u16 peer_caps;
101 struct sockaddr_tipc remote; 102 struct sockaddr_tipc remote;
102 struct rhash_head node; 103 struct rhash_head node;
103 struct rcu_head rcu; 104 struct rcu_head rcu;
@@ -1118,6 +1119,7 @@ static void tipc_sk_finish_conn(struct tipc_sock *tsk, u32 peer_port,
1118 sk_reset_timer(sk, &sk->sk_timer, jiffies + tsk->probing_intv); 1119 sk_reset_timer(sk, &sk->sk_timer, jiffies + tsk->probing_intv);
1119 tipc_node_add_conn(net, peer_node, tsk->portid, peer_port); 1120 tipc_node_add_conn(net, peer_node, tsk->portid, peer_port);
1120 tsk->max_pkt = tipc_node_get_mtu(net, peer_node, tsk->portid); 1121 tsk->max_pkt = tipc_node_get_mtu(net, peer_node, tsk->portid);
1122 tsk->peer_caps = tipc_node_get_capabilities(net, peer_node);
1121} 1123}
1122 1124
1123/** 1125/**