Commit fd0851d6 authored by Lionel Gauthier's avatar Lionel Gauthier

Bug teid


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7522 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent a08eb492
...@@ -596,10 +596,10 @@ _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP ...@@ -596,10 +596,10 @@ _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
ct = nf_ct_get(old_skb_pP, &ctinfo); ct = nf_ct_get(old_skb_pP, &ctinfo);
if (ct == NULL) { if (ct == NULL) {
PR_INFO(MODULE_NAME": _gtpuah_target_add force info_pP mark %u to skb_pP mark %u\n", PR_INFO(MODULE_NAME": _gtpuah_target_add force targinfo ltun %u to skb_pP mark %u\n",
old_skb_pP->mark, ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun,
((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->rtun); old_skb_pP->mark);
old_skb_pP->mark = ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->rtun; newmark = ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun;
} else { } else {
//XT_CONNMARK_RESTORE: //XT_CONNMARK_RESTORE:
newmark = old_skb_pP->mark ^ ct->mark; newmark = old_skb_pP->mark ^ ct->mark;
...@@ -607,13 +607,19 @@ _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP ...@@ -607,13 +607,19 @@ _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP
PR_INFO(MODULE_NAME": _gtpuah_target_add restore mark %u (skb mark %u ct mark %u) len %u sgw addr %x\n", PR_INFO(MODULE_NAME": _gtpuah_target_add restore mark %u (skb mark %u ct mark %u) len %u sgw addr %x\n",
newmark, old_skb_pP->mark, ct->mark, orig_iplen, newmark, old_skb_pP->mark, ct->mark, orig_iplen,
((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->raddr); ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->raddr);
if (newmark != ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun) {
pr_warn(MODULE_NAME": _gtpuah_target_add restore mark 0x%x mismatch ltun 0x%x (rtun 0x%x)",
newmark, ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->ltun,
((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->rtun);
} }
}
/* Add GTPu header */ /* Add GTPu header */
gtpuh.flags = 0x30; /* v1 and Protocol-type=GTP */ gtpuh.flags = 0x30; /* v1 and Protocol-type=GTP */
gtpuh.msgtype = 0xff; /* T-PDU */ gtpuh.msgtype = 0xff; /* T-PDU */
gtpuh.length = htons(orig_iplen); gtpuh.length = htons(orig_iplen);
gtpuh.tunid = htonl(newmark); gtpuh.tunid = htonl(((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->rtun);
_gtpuah_sock.addr_send.sin_addr.s_addr = ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->raddr; _gtpuah_sock.addr_send.sin_addr.s_addr = ((const struct xt_gtpuah_target_info *)(par_pP->targinfo))->raddr;
_gtpuah_ksocket_send(_gtpuah_sock.sock, &_gtpuah_sock.addr_send, (unsigned char*)&gtpuh, sizeof(gtpuh), (unsigned char*)old_iph_p, orig_iplen); _gtpuah_ksocket_send(_gtpuah_sock.sock, &_gtpuah_sock.addr_send, (unsigned char*)&gtpuh, sizeof(gtpuh), (unsigned char*)old_iph_p, orig_iplen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment