Commit cccc99f5 authored by Lionel Gauthier's avatar Lionel Gauthier

logs

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6279 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0a9f8a9f
...@@ -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:
......
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