From ed01be86750eb6180aa7400cda3f6f2487a30c38 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Sun, 25 Jun 2006 23:38:29 -0700 Subject: [PATCH] --- yaml --- r: 30392 b: refs/heads/master c: 49384507896ee26e67266cebef6b6a9f2e31081c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/tipc/tipc_bearer.h | 12 ++++++++++-- trunk/net/tipc/eth_media.c | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 9490c7986d23..59c653994755 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2535ec50b7a51833ff65dc97ca85e1155d4090f8 +refs/heads/master: 49384507896ee26e67266cebef6b6a9f2e31081c diff --git a/trunk/include/net/tipc/tipc_bearer.h b/trunk/include/net/tipc/tipc_bearer.h index 098607cd4b78..e07136d74c2f 100644 --- a/trunk/include/net/tipc/tipc_bearer.h +++ b/trunk/include/net/tipc/tipc_bearer.h @@ -49,10 +49,18 @@ #define TIPC_MEDIA_TYPE_ETH 1 +/* + * Destination address structure used by TIPC bearers when sending messages + * + * IMPORTANT: The fields of this structure MUST be stored using the specified + * byte order indicated below, as the structure is exchanged between nodes + * as part of a link setup process. + */ + struct tipc_media_addr { - __u32 type; + __u32 type; /* bearer type (network byte order) */ union { - __u8 eth_addr[6]; /* Ethernet bearer */ + __u8 eth_addr[6]; /* 48 bit Ethernet addr (byte array) */ #if 0 /* Prototypes for other possible bearer types */ diff --git a/trunk/net/tipc/eth_media.c b/trunk/net/tipc/eth_media.c index b64661904e0d..3ecb1006a42d 100644 --- a/trunk/net/tipc/eth_media.c +++ b/trunk/net/tipc/eth_media.c @@ -254,7 +254,9 @@ int tipc_eth_media_start(void) if (eth_started) return -EINVAL; - memset(&bcast_addr, 0xff, sizeof(bcast_addr)); + bcast_addr.type = htonl(TIPC_MEDIA_TYPE_ETH); + memset(&bcast_addr.dev_addr, 0xff, ETH_ALEN); + memset(eth_bearers, 0, sizeof(eth_bearers)); res = tipc_register_media(TIPC_MEDIA_TYPE_ETH, "eth",