aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-02-17 03:30:22 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-02-17 19:34:28 +0100
commit41df6c59782c7dfd3c6906959b5abfd5dc1a4a5e (patch)
tree5dc7f78ab11ed7430a5a6e7ba48bb622b63e9b96
parent5a34c7f6f8eea530f5316513ad4410d7def6a24e (diff)
m2ua: Include the interface identifier in the notify message
-rw-r--r--src/sctp_m2ua.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sctp_m2ua.c b/src/sctp_m2ua.c
index 155043d..26d6be0 100644
--- a/src/sctp_m2ua.c
+++ b/src/sctp_m2ua.c
@@ -96,6 +96,7 @@ static int m2ua_conn_send_ntfy(struct mtp_m2ua_link *link,
{
struct m2ua_msg *msg;
uint16_t state[2];
+ uint32_t ident;
int rc;
msg = m2ua_msg_alloc();
@@ -112,10 +113,12 @@ static int m2ua_conn_send_ntfy(struct mtp_m2ua_link *link,
else
state[1] = ntohs(M2UA_STP_AS_INACTIVE);
- /* TODO: embed the interface identifier */
-
m2ua_msg_add_data(msg, MUA_TAG_STATUS, 4, (uint8_t *) state);
m2ua_msg_add_data(msg, MUA_TAG_ASP_IDENT, 4, conn->asp_ident);
+
+ ident = htonl(link->link_index);
+ m2ua_msg_add_data(msg, MUA_TAG_IDENT_INT, 4, (uint8_t *) &ident);
+
rc = m2ua_conn_send(conn, msg, info);
m2ua_msg_free(msg);