aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/tipc/tipc_bearer.h12
-rw-r--r--net/tipc/eth_media.c4
2 files changed, 13 insertions, 3 deletions
diff --git a/include/net/tipc/tipc_bearer.h b/include/net/tipc/tipc_bearer.h
index 098607cd4b78..e07136d74c2f 100644
--- a/include/net/tipc/tipc_bearer.h
+++ b/include/net/tipc/tipc_bearer.h
@@ -49,10 +49,18 @@
49 49
50#define TIPC_MEDIA_TYPE_ETH 1 50#define TIPC_MEDIA_TYPE_ETH 1
51 51
52/*
53 * Destination address structure used by TIPC bearers when sending messages
54 *
55 * IMPORTANT: The fields of this structure MUST be stored using the specified
56 * byte order indicated below, as the structure is exchanged between nodes
57 * as part of a link setup process.
58 */
59
52struct tipc_media_addr { 60struct tipc_media_addr {
53 __u32 type; 61 __u32 type; /* bearer type (network byte order) */
54 union { 62 union {
55 __u8 eth_addr[6]; /* Ethernet bearer */ 63 __u8 eth_addr[6]; /* 48 bit Ethernet addr (byte array) */
56#if 0 64#if 0
57 /* Prototypes for other possible bearer types */ 65 /* Prototypes for other possible bearer types */
58 66
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
index b64661904e0d..3ecb1006a42d 100644
--- a/net/tipc/eth_media.c
+++ b/net/tipc/eth_media.c
@@ -254,7 +254,9 @@ int tipc_eth_media_start(void)
254 if (eth_started) 254 if (eth_started)
255 return -EINVAL; 255 return -EINVAL;
256 256
257 memset(&bcast_addr, 0xff, sizeof(bcast_addr)); 257 bcast_addr.type = htonl(TIPC_MEDIA_TYPE_ETH);
258 memset(&bcast_addr.dev_addr, 0xff, ETH_ALEN);
259
258 memset(eth_bearers, 0, sizeof(eth_bearers)); 260 memset(eth_bearers, 0, sizeof(eth_bearers));
259 261
260 res = tipc_register_media(TIPC_MEDIA_TYPE_ETH, "eth", 262 res = tipc_register_media(TIPC_MEDIA_TYPE_ETH, "eth",