summaryrefslogtreecommitdiffstats
path: root/package/ead/src/ead-client.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-01-06 22:19:55 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-01-06 22:19:55 +0000
commit4129203d75fc53adf9cf03c8bf09c3c8ceb85b62 (patch)
tree5e029cd54dff6700ebaced239a2c622d51f46872 /package/ead/src/ead-client.c
parent341c1dbdf5107b6cd5f357d8d991a573d7f54d9e (diff)
downloadmaster-31e0f0ae-4129203d75fc53adf9cf03c8bf09c3c8ceb85b62.tar.gz
master-31e0f0ae-4129203d75fc53adf9cf03c8bf09c3c8ceb85b62.tar.bz2
master-31e0f0ae-4129203d75fc53adf9cf03c8bf09c3c8ceb85b62.zip
ead: add support for instance ids to prevent interference from packet reception on multiple interfaces
SVN-Revision: 13905
Diffstat (limited to 'package/ead/src/ead-client.c')
-rw-r--r--package/ead/src/ead-client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/ead/src/ead-client.c b/package/ead/src/ead-client.c
index 2592c8f15e..7f462c180a 100644
--- a/package/ead/src/ead-client.c
+++ b/package/ead/src/ead-client.c
@@ -62,6 +62,7 @@ static struct t_num *A, B;
static struct t_preconf *tcp;
static int auth_type = EAD_AUTH_DEFAULT;
static int timeout = EAD_TIMEOUT;
+static uint16_t sid = 0;
static void
set_nonblock(int enable)
@@ -157,6 +158,7 @@ handle_pong(void)
auth_type = ntohs(pong->auth_type);
if (nid == 0xffff)
printf("%04x: %s\n", ntohs(msg->nid), pong->name);
+ sid = msg->sid;
return true;
}
@@ -320,7 +322,7 @@ int main(int argc, char **argv)
int ch;
msg->magic = htonl(EAD_MAGIC);
- msg->tid = 0;
+ msg->sid = 0;
memset(&local, 0, sizeof(local));
memset(&remote, 0, sizeof(remote));