tipc: Introduce node signature field in neighbor discovery message
Adds support for the new "node signature" in neighbor discovery messages, which is a 16 bit identifier chosen randomly when TIPC is initialized. This field makes it possible for nodes receiving a neighbor discovery message to detect if multiple neighboring nodes are using the same network address (i.e. <Z.C.N>), even when the messages are arriving on different interfaces. This first phase of node signature support creates the signature, incorporates it into outgoing neighbor discovery messages, and tracks the signature used by valid neighbors. An upcoming patch builds on this foundation to implement the improved duplicate neighbor detection checking. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
This commit is contained in:

committed by
Paul Gortmaker

parent
7c3a95a15a
commit
fc0eea691a
@@ -42,6 +42,11 @@
|
||||
#include "net.h"
|
||||
#include "bearer.h"
|
||||
|
||||
/*
|
||||
* Out-of-range value for node signature
|
||||
*/
|
||||
#define INVALID_NODE_SIG 0x10000
|
||||
|
||||
/* Flags used to block (re)establishment of contact with a neighboring node */
|
||||
|
||||
#define WAIT_PEER_DOWN 0x0001 /* wait to see that peer's links are down */
|
||||
@@ -61,6 +66,7 @@
|
||||
* @block_setup: bit mask of conditions preventing link establishment to node
|
||||
* @link_cnt: number of links to node
|
||||
* @permit_changeover: non-zero if node has redundant links to this system
|
||||
* @signature: node instance identifier
|
||||
* @bclink: broadcast-related info
|
||||
* @supportable: non-zero if node supports TIPC b'cast link capability
|
||||
* @supported: non-zero if node supports TIPC b'cast capability
|
||||
@@ -86,6 +92,7 @@ struct tipc_node {
|
||||
int working_links;
|
||||
int block_setup;
|
||||
int permit_changeover;
|
||||
u32 signature;
|
||||
struct {
|
||||
u8 supportable;
|
||||
u8 supported;
|
||||
|
Reference in New Issue
Block a user