diff options
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/name_distr.c | 8 | ||||
| -rw-r--r-- | net/tipc/udp_media.c | 5 |
2 files changed, 9 insertions, 4 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: */ |
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index b016c011970b..ae7e14cae085 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c | |||
| @@ -396,10 +396,13 @@ static int tipc_udp_enable(struct net *net, struct tipc_bearer *b, | |||
| 396 | tuncfg.encap_destroy = NULL; | 396 | tuncfg.encap_destroy = NULL; |
| 397 | setup_udp_tunnel_sock(net, ub->ubsock, &tuncfg); | 397 | setup_udp_tunnel_sock(net, ub->ubsock, &tuncfg); |
| 398 | 398 | ||
| 399 | if (enable_mcast(ub, remote)) | 399 | err = enable_mcast(ub, remote); |
| 400 | if (err) | ||
| 400 | goto err; | 401 | goto err; |
| 401 | return 0; | 402 | return 0; |
| 402 | err: | 403 | err: |
| 404 | if (ub->ubsock) | ||
| 405 | udp_tunnel_sock_release(ub->ubsock); | ||
| 403 | kfree(ub); | 406 | kfree(ub); |
| 404 | return err; | 407 | return err; |
| 405 | } | 408 | } |
