Hi,
It seems there are some changes in recent kernels that require a minor
patch to 1.7.5 in order to compile. Below is the patch that worked fine
for me and seems to be correct.
Regards,
Peter Litov.
======================================
--- linux-2.6.20.4-SE-2+1.7.5/net/tipc/tipc_socket.c 2007-08-30
17:22:31.000000000 +0000
+++ linux-2.6.24.2-SE/net/tipc/tipc_socket.c 2008-02-11
20:07:10.000000000 +0000
@@ -189,7 +189,7 @@
* Returns 0 on success, errno otherwise
*/
-static int tipc_create(struct socket *sock, int protocol)
+static int tipc_create(struct net *net, struct socket *sock, int protocol)
{
const struct proto_ops *ops;
socket_state state;
@@ -221,7 +221,7 @@
/* Allocate socket's protocol area */
- sk = sk_alloc(AF_TIPC, GFP_KERNEL, &tipc_proto, 1);
+ sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto);
if (sk == NULL)
return -ENOMEM;
@@ -1523,7 +1523,7 @@
buf = skb_peek(&sk->sk_receive_queue);
- res = tipc_create(new_sock, 0);
+ res = tipc_create(sock->sk->sk_net, new_sock, 0);
if (!res) {
struct sock *new_sk = new_sock->sk;
struct tipc_port *new_tport = sock_port(new_sk);
--- linux-2.6.20.4-SE-2+1.7.5/net/tipc/tipc_handler.c 2007-08-30
17:22:30.000000000 +0000
+++ linux-2.6.24.2-SE/net/tipc/tipc_handler.c 2008-02-11
20:02:57.000000000 +0000
@@ -109,7 +109,7 @@
{
tipc_queue_item_cache =
kmem_cache_create("tipc_queue_items", sizeof(struct
queue_item),
- 0, SLAB_HWCACHE_ALIGN, NULL, NULL);
+ 0, SLAB_HWCACHE_ALIGN, NULL);
if (!tipc_queue_item_cache)
return -ENOMEM;
--- linux-2.6.20.4-SE-2+1.7.5/net/tipc/tipc_eth_media.c 2007-09-06
20:22:27.000000000 +0000
+++ linux-2.6.24.2-SE/net/tipc/tipc_eth_media.c 2008-02-11
20:25:19.000000000 +0000
@@ -126,9 +126,9 @@
return TIPC_OK;
}
- buf_clone->nh.raw = buf_clone->data;
+ buf_clone->network_header = buf_clone->data;
buf_clone->dev = dev;
- dev->hard_header(buf_clone, dev, ETH_P_TIPC, &dest->value[4],
+ dev_hard_header(buf_clone, dev, ETH_P_TIPC, &dest->value[4],
dev->dev_addr, buf_clone->len);
dev_queue_xmit(buf_clone);
return TIPC_OK;
@@ -164,15 +164,17 @@
static int enable_bearer(struct tipc_bearer *tb_ptr)
{
- struct net_device *dev = dev_base;
+ struct net_device *dev = NULL, *pdev = NULL;
struct eth_bearer *eb_ptr = ð_bearers[0];
struct eth_bearer *stop = ð_bearers[MAX_ETH_BEARERS];
char *driver_name = strchr((const char *)tb_ptr->name, ':') + 1;
/* Find device with specified name */
-
- while (dev && dev->name && strncmp(dev->name, driver_name,
IFNAMSIZ)) {
- dev = dev->next;
+ for_each_netdev(&init_net, pdev) {
+ if (!strncmp(pdev->name, driver_name, IFNAMSIZ)) {
+ dev = pdev;
+ break;
+ }
}
if (!dev)
return -ENODEV;
======================================
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion