diff options
author | Erik Hugne <erik.hugne@ericsson.com> | 2015-03-05 04:23:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-05 22:08:42 -0500 |
commit | 948fa2d115c553ae32aced66e0f00f89245dc05e (patch) | |
tree | 7c4810c9fea6c82765f0b779962ffbe6858dfd0b /net/tipc | |
parent | 33f8b9ecdb15bc8a3c6be0072a7e0f7a345856f1 (diff) |
tipc: increase size of tipc discovery messages
The payload area following the TIPC discovery message header is an
opaque area defined by the media. INT_H_SIZE was enough for
Ethernet/IB/IPv4 but needs to be expanded to carry IPv6 addressing
information.
Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/discover.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index feef3753615d..5967506833ce 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
@@ -86,7 +86,7 @@ static void tipc_disc_init_msg(struct net *net, struct sk_buff *buf, u32 type, | |||
86 | 86 | ||
87 | msg = buf_msg(buf); | 87 | msg = buf_msg(buf); |
88 | tipc_msg_init(tn->own_addr, msg, LINK_CONFIG, type, | 88 | tipc_msg_init(tn->own_addr, msg, LINK_CONFIG, type, |
89 | INT_H_SIZE, dest_domain); | 89 | MAX_H_SIZE, dest_domain); |
90 | msg_set_non_seq(msg, 1); | 90 | msg_set_non_seq(msg, 1); |
91 | msg_set_node_sig(msg, tn->random); | 91 | msg_set_node_sig(msg, tn->random); |
92 | msg_set_dest_domain(msg, dest_domain); | 92 | msg_set_dest_domain(msg, dest_domain); |
@@ -249,7 +249,7 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *buf, | |||
249 | 249 | ||
250 | /* Send response, if necessary */ | 250 | /* Send response, if necessary */ |
251 | if (respond && (mtyp == DSC_REQ_MSG)) { | 251 | if (respond && (mtyp == DSC_REQ_MSG)) { |
252 | rbuf = tipc_buf_acquire(INT_H_SIZE); | 252 | rbuf = tipc_buf_acquire(MAX_H_SIZE); |
253 | if (rbuf) { | 253 | if (rbuf) { |
254 | tipc_disc_init_msg(net, rbuf, DSC_RESP_MSG, bearer); | 254 | tipc_disc_init_msg(net, rbuf, DSC_RESP_MSG, bearer); |
255 | tipc_bearer_send(net, bearer->identity, rbuf, &maddr); | 255 | tipc_bearer_send(net, bearer->identity, rbuf, &maddr); |
@@ -359,8 +359,7 @@ int tipc_disc_create(struct net *net, struct tipc_bearer *b_ptr, | |||
359 | req = kmalloc(sizeof(*req), GFP_ATOMIC); | 359 | req = kmalloc(sizeof(*req), GFP_ATOMIC); |
360 | if (!req) | 360 | if (!req) |
361 | return -ENOMEM; | 361 | return -ENOMEM; |
362 | 362 | req->buf = tipc_buf_acquire(MAX_H_SIZE); | |
363 | req->buf = tipc_buf_acquire(INT_H_SIZE); | ||
364 | if (!req->buf) { | 363 | if (!req->buf) { |
365 | kfree(req); | 364 | kfree(req); |
366 | return -ENOMEM; | 365 | return -ENOMEM; |