Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dyyu
openairinterface5G
Commits
fd0851d6
Commit
fd0851d6
authored
Jun 03, 2015
by
gauthier
Browse files
Bug teid
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@7522
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
a08eb492
Changes
1
Hide whitespace changes
Inline
Side-by-side
openair-cn/GTPV1-U/GTPUAH/xt_GTPUAH.c
View file @
fd0851d6
...
...
@@ -596,24 +596,30 @@ _gtpuah_tg4_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP
//----------------------------------------------------------------------------
ct
=
nf_ct_get
(
old_skb_pP
,
&
ctinfo
);
if
(
ct
==
NULL
)
{
PR_INFO
(
MODULE_NAME
": _gtpuah_target_add force
info_pP mark
%u to skb_pP mark %u
\n
"
,
old_skb
_pP
->
m
ar
k
,
((
const
struct
xt_gtpuah_target_info
*
)(
par
_pP
->
t
ar
ginfo
))
->
rtun
);
old_skb_pP
->
mark
=
((
const
struct
xt_gtpuah_target_info
*
)(
par_pP
->
targinfo
))
->
r
tun
;
PR_INFO
(
MODULE_NAME
": _gtpuah_target_add force
targinfo ltun
%u to skb_pP mark %u
\n
"
,
((
const
struct
xt_gtpuah_target_info
*
)(
par
_pP
->
t
ar
ginfo
))
->
ltun
,
old_skb
_pP
->
m
ar
k
);
new
mark
=
((
const
struct
xt_gtpuah_target_info
*
)(
par_pP
->
targinfo
))
->
l
tun
;
}
else
{
//XT_CONNMARK_RESTORE:
newmark
=
old_skb_pP
->
mark
^
ct
->
mark
;
newmark
=
old_skb_pP
->
mark
^
ct
->
mark
;
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
,
((
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 */
gtpuh
.
flags
=
0x30
;
/* v1 and Protocol-type=GTP */
gtpuh
.
msgtype
=
0xff
;
/* T-PDU */
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_ksocket_send
(
_gtpuah_sock
.
sock
,
&
_gtpuah_sock
.
addr_send
,
(
unsigned
char
*
)
&
gtpuh
,
sizeof
(
gtpuh
),
(
unsigned
char
*
)
old_iph_p
,
orig_iplen
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment