Commit 948fa2d1 authored by Erik Hugne's avatar Erik Hugne Committed by David S. Miller

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: default avatarErik Hugne <erik.hugne@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33f8b9ec
...@@ -86,7 +86,7 @@ static void tipc_disc_init_msg(struct net *net, struct sk_buff *buf, u32 type, ...@@ -86,7 +86,7 @@ static void tipc_disc_init_msg(struct net *net, struct sk_buff *buf, u32 type,
msg = buf_msg(buf); msg = buf_msg(buf);
tipc_msg_init(tn->own_addr, msg, LINK_CONFIG, type, tipc_msg_init(tn->own_addr, msg, LINK_CONFIG, type,
INT_H_SIZE, dest_domain); MAX_H_SIZE, dest_domain);
msg_set_non_seq(msg, 1); msg_set_non_seq(msg, 1);
msg_set_node_sig(msg, tn->random); msg_set_node_sig(msg, tn->random);
msg_set_dest_domain(msg, dest_domain); msg_set_dest_domain(msg, dest_domain);
...@@ -249,7 +249,7 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *buf, ...@@ -249,7 +249,7 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *buf,
/* Send response, if necessary */ /* Send response, if necessary */
if (respond && (mtyp == DSC_REQ_MSG)) { if (respond && (mtyp == DSC_REQ_MSG)) {
rbuf = tipc_buf_acquire(INT_H_SIZE); rbuf = tipc_buf_acquire(MAX_H_SIZE);
if (rbuf) { if (rbuf) {
tipc_disc_init_msg(net, rbuf, DSC_RESP_MSG, bearer); tipc_disc_init_msg(net, rbuf, DSC_RESP_MSG, bearer);
tipc_bearer_send(net, bearer->identity, rbuf, &maddr); 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,8 +359,7 @@ int tipc_disc_create(struct net *net, struct tipc_bearer *b_ptr,
req = kmalloc(sizeof(*req), GFP_ATOMIC); req = kmalloc(sizeof(*req), GFP_ATOMIC);
if (!req) if (!req)
return -ENOMEM; return -ENOMEM;
req->buf = tipc_buf_acquire(MAX_H_SIZE);
req->buf = tipc_buf_acquire(INT_H_SIZE);
if (!req->buf) { if (!req->buf) {
kfree(req); kfree(req);
return -ENOMEM; return -ENOMEM;
......
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