aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-10-27 15:59:33 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-10-27 15:59:33 +0200
commitd25dfce4f55b909526e76f878bd5445a5db319fe (patch)
treee1e737c1efd6cca1fccfb0e05b21630a4f1d642d /src
parente3abeb1400cba9598691d3fa4c1549c89ee7ef96 (diff)
assignment: An evil hack to include some fake IES..
Add stuff to the message...
Diffstat (limited to 'src')
-rw-r--r--src/bss_patch.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bss_patch.c b/src/bss_patch.c
index 88280e2..bfbbfdb 100644
--- a/src/bss_patch.c
+++ b/src/bss_patch.c
@@ -61,6 +61,19 @@ static void patch_ass_cmpl(struct msgb *msg, int length)
struct tlv_parsed tp;
uint8_t *data;
+ if (length == 1) {
+ LOGP(DMSC, LOGL_ERROR, "Hacking the Assignment Complete.\n");
+ msgb_v_put(msg, 0x21);
+ msgb_v_put(msg, 0x09);
+ msgb_v_put(msg, 0x2c);
+ msgb_v_put(msg, 0x02);
+ msgb_v_put(msg, 0x40);
+ msgb_v_put(msg, 0x25);
+ msg->l3h[-1] = 7;
+ msg->l3h[-3] = 9;
+ return;
+ }
+
tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l3h + 1, length - 1, 0, 0);
if (!TLVP_PRESENT(&tp, GSM0808_IE_CHOSEN_CHANNEL)) {
LOGP(DMSC, LOGL_ERROR, "Chosen Channel not in the MSG.\n");