diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/name_distr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index 6b626a64b517..a04fe9be1c60 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c | |||
@@ -62,6 +62,8 @@ static void publ_to_item(struct distr_item *i, struct publication *p) | |||
62 | 62 | ||
63 | /** | 63 | /** |
64 | * named_prepare_buf - allocate & initialize a publication message | 64 | * named_prepare_buf - allocate & initialize a publication message |
65 | * | ||
66 | * The buffer returned is of size INT_H_SIZE + payload size | ||
65 | */ | 67 | */ |
66 | static struct sk_buff *named_prepare_buf(struct net *net, u32 type, u32 size, | 68 | static struct sk_buff *named_prepare_buf(struct net *net, u32 type, u32 size, |
67 | u32 dest) | 69 | u32 dest) |
@@ -141,9 +143,9 @@ static void named_distribute(struct net *net, struct sk_buff_head *list, | |||
141 | struct publication *publ; | 143 | struct publication *publ; |
142 | struct sk_buff *skb = NULL; | 144 | struct sk_buff *skb = NULL; |
143 | struct distr_item *item = NULL; | 145 | struct distr_item *item = NULL; |
144 | uint msg_dsz = (tipc_node_get_mtu(net, dnode, 0) / ITEM_SIZE) * | 146 | u32 msg_dsz = ((tipc_node_get_mtu(net, dnode, 0) - INT_H_SIZE) / |
145 | ITEM_SIZE; | 147 | ITEM_SIZE) * ITEM_SIZE; |
146 | uint msg_rem = msg_dsz; | 148 | u32 msg_rem = msg_dsz; |
147 | 149 | ||
148 | list_for_each_entry(publ, pls, local_list) { | 150 | list_for_each_entry(publ, pls, local_list) { |
149 | /* Prepare next buffer: */ | 151 | /* Prepare next buffer: */ |