Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
cccc99f5
Commit
cccc99f5
authored
Dec 17, 2014
by
Lionel Gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logs
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@6279
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
0a9f8a9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
openair-cn/GTPV1-U/GTPURH/xt_GTPURH.c
openair-cn/GTPV1-U/GTPURH/xt_GTPURH.c
+8
-8
No files found.
openair-cn/GTPV1-U/GTPURH/xt_GTPURH.c
View file @
cccc99f5
...
@@ -195,7 +195,7 @@ static bool _gtpurh_route_packet(struct sk_buff *skb_pP, const struct xt_gtpurh_
...
@@ -195,7 +195,7 @@ static bool _gtpurh_route_packet(struct sk_buff *skb_pP, const struct xt_gtpurh_
};
};
//skb_pP->pkt_type = PACKET_OTHERHOST;
//skb_pP->pkt_type = PACKET_OTHERHOST;
skb_pP
->
pkt_type
=
PACKET_OUTGOING
;
skb_pP
->
pkt_type
=
PACKET_OUTGOING
;
#if
1
#if
0
pr_info("GTPURH(%d): Routing packet: %d.%d.%d.%d --> %d.%d.%d.%d Proto: %d, Len: %d Mark: %u Packet type: %u\n",
pr_info("GTPURH(%d): Routing packet: %d.%d.%d.%d --> %d.%d.%d.%d Proto: %d, Len: %d Mark: %u Packet type: %u\n",
info_pP->action,
info_pP->action,
iph_p->saddr & 0xFF,
iph_p->saddr & 0xFF,
...
@@ -213,11 +213,11 @@ static bool _gtpurh_route_packet(struct sk_buff *skb_pP, const struct xt_gtpurh_
...
@@ -213,11 +213,11 @@ static bool _gtpurh_route_packet(struct sk_buff *skb_pP, const struct xt_gtpurh_
#endif
#endif
rt
=
ip_route_output_key
(
&
init_net
,
&
fl
.
u
.
ip4
);
rt
=
ip_route_output_key
(
&
init_net
,
&
fl
.
u
.
ip4
);
if
(
rt
==
null
)
{
if
(
rt
==
null
)
{
pr_info
(
"GTPURH: Failed to route packet to dst 0x%x. Error: (%d)"
,
fl
.
u
.
ip4
.
daddr
,
err
);
pr_info
(
"GTPURH: Failed to route packet to dst 0x%x. Error: (%d)
\n
"
,
fl
.
u
.
ip4
.
daddr
,
err
);
return
GTPURH_FAILURE
;
return
GTPURH_FAILURE
;
}
}
#if
1
#if
0
if (rt->dst.dev) {
if (rt->dst.dev) {
pr_info("GTPURH: dst dev name %s\n", rt->dst.dev->name);
pr_info("GTPURH: dst dev name %s\n", rt->dst.dev->name);
} else {
} else {
...
@@ -330,7 +330,7 @@ _gtpurh_tg4_rem(struct sk_buff *orig_skb_pP, const struct xt_action_param *par_p
...
@@ -330,7 +330,7 @@ _gtpurh_tg4_rem(struct sk_buff *orig_skb_pP, const struct xt_action_param *par_p
_gtpurh_print_hex_octets
((
unsigned
char
*
)
iph_p
,
ntohs
(
iph_p
->
tot_len
));
_gtpurh_print_hex_octets
((
unsigned
char
*
)
iph_p
,
ntohs
(
iph_p
->
tot_len
));
return
NF_DROP
;
return
NF_DROP
;
}
}
#if
1
#if
0
if ((skb_p->mark == 0) || (gtp_payload_size != ntohs(iph2_p->tot_len))) {
if ((skb_p->mark == 0) || (gtp_payload_size != ntohs(iph2_p->tot_len))) {
pr_info("\nGTPURH: Decapsulated packet: %d.%d.%d.%d --> %d.%d.%d.%d Proto: %d, Total Len (IP): %u mark %u Frag offset %u Flags 0x%0x\n",
pr_info("\nGTPURH: Decapsulated packet: %d.%d.%d.%d --> %d.%d.%d.%d Proto: %d, Total Len (IP): %u mark %u Frag offset %u Flags 0x%0x\n",
iph2_p->saddr & 0xFF,
iph2_p->saddr & 0xFF,
...
@@ -379,10 +379,10 @@ _gtpurh_tg4_rem(struct sk_buff *orig_skb_pP, const struct xt_action_param *par_p
...
@@ -379,10 +379,10 @@ _gtpurh_tg4_rem(struct sk_buff *orig_skb_pP, const struct xt_action_param *par_p
};
};
rt
=
ip_route_output_key
(
&
init_net
,
&
fl
.
u
.
ip4
);
rt
=
ip_route_output_key
(
&
init_net
,
&
fl
.
u
.
ip4
);
if
(
rt
==
NULL
)
{
if
(
rt
==
NULL
)
{
pr_info
(
"GTPURH: Failed to route packet to dst 0x%x. Error: (%d)"
,
fl
.
u
.
ip4
.
daddr
,
err
);
pr_info
(
"GTPURH: Failed to route packet to dst 0x%x. Error: (%d)
\n
"
,
fl
.
u
.
ip4
.
daddr
,
err
);
return
NF_DROP
;
return
NF_DROP
;
}
}
#if
1
#if
0
if (rt->dst.dev) {
if (rt->dst.dev) {
pr_info("GTPURH: dst dev name %s\n", rt->dst.dev->name);
pr_info("GTPURH: dst dev name %s\n", rt->dst.dev->name);
} else {
} else {
...
@@ -432,12 +432,12 @@ _gtpurh_tg4_rem(struct sk_buff *orig_skb_pP, const struct xt_action_param *par_p
...
@@ -432,12 +432,12 @@ _gtpurh_tg4_rem(struct sk_buff *orig_skb_pP, const struct xt_action_param *par_p
}
}
nf_ct_attach
(
new_skb_p
,
skb_p
);
nf_ct_attach
(
new_skb_p
,
skb_p
);
pr_info
(
"GTPURH: ip_local_out %s/%s dev %s src %u.%u.%u.%u dst %u.%u.%u.%u
\n
"
,
/*pr_info("GTPURH: ip_local_out %s/%s dev %s src %u.%u.%u.%u dst %u.%u.%u.%u
\n",
_gtpurh_nf_inet_hook_2_string(par_pP->hooknum),
_gtpurh_nf_inet_hook_2_string(par_pP->hooknum),
gtpurh_tg_reg[0].table,
gtpurh_tg_reg[0].table,
(new_skb_p->dev == NULL) ? "NULL" : new_skb_p->dev->name,
(new_skb_p->dev == NULL) ? "NULL" : new_skb_p->dev->name,
NIPADDR(new_ip_p->saddr),
NIPADDR(new_ip_p->saddr),
NIPADDR
(
new_ip_p
->
daddr
));
NIPADDR(new_ip_p->daddr));
*/
ip_local_out
(
new_skb_p
);
ip_local_out
(
new_skb_p
);
return
NF_DROP
;
return
NF_DROP
;
free_skb:
free_skb:
...
...
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