aboutsummaryrefslogtreecommitdiffstats
path: root/src/mtp_layer3.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-20 13:05:54 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-20 13:11:29 +0100
commit157de2a8abbd49bece2c1d5cd37c1abe104aaa66 (patch)
treea8b96c188c5b47962a020a9b3c7aa96f43feaf1a /src/mtp_layer3.c
parent925d566c188bfad3709e55ac223bee52ae2bc60c (diff)
mtp: Only respond to regular maintainenance for our code point
Diffstat (limited to 'src/mtp_layer3.c')
-rw-r--r--src/mtp_layer3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mtp_layer3.c b/src/mtp_layer3.c
index e9d01c9..9e147fd 100644
--- a/src/mtp_layer3.c
+++ b/src/mtp_layer3.c
@@ -414,6 +414,12 @@ static int mtp_link_regular_msg(struct mtp_link_set *link, struct mtp_level_3_hd
return -1;
}
+ if (MTP_ADDR_DPC(hdr->addr) != link->opc) {
+ LOGP(DINP, LOGL_ERROR, "MSG for 0x%x not handled by 0x%x\n",
+ MTP_ADDR_DPC(hdr->addr), link->opc);
+ return -1;
+ }
+
mng = (struct mtp_level_3_mng *) &hdr->data[0];
LOGP(DINP, LOGL_DEBUG, "reg msg: h0: 0x%x h1: 0x%x\n",
mng->cmn.h0, mng->cmn.h1);