ipip rcv:
static int ipip_tunnel_rcv(struct sk_buff *skb, u8 ipproto)
{
struct net *net = dev_net(skb->dev);
struct ip_tunnel_net *itn = net_generic(net, ipip_net_id);
struct metadata_dst *tun_dst = NULL;
struct ip_tunnel *tunnel;
const struct iphdr *iph;
printk("ipip_tunnel_rcv() 219! ip_hdr(skb)->daddr = %x ip_hdr(skb)->saddr = %x\n",ip_hdr(skb)->daddr, ip_hdr(skb)->saddr);
dump_stack();
iph = ip_hdr(skb);
tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
iph->saddr, iph->daddr, 0);
if (tunnel) {
......
return ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
}
int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
const struct tnl_ptk_info *tpi, struct metadata_dst *tun_dst,
bool log_ecn_error)
{
struct pcpu_sw_netstats *tstats;
const struct iphdr *iph = ip_hdr(skb);
int err;
printk("ip_tunnel_rcv() 368! ip_hdr(skb)->daddr = %x ip_hdr(skb)->saddr = %x\n",ip_hdr(skb)->daddr, ip_hdr(skb)->saddr);
......
skb_reset_network_header(skb);//ip地址重置
err = IP_ECN_decapsulate(iph, skb);
gro_cells_receive(&tunnel->gro_cells, skb);
return 0;
}
Jul 5 17:14:19 chro kernel: [ 72.440828] ipip_tunnel_rcv() 219! ip_hdr(skb)->daddr = 2140a0a ip_hdr(skb)->saddr = 20a0a0a
Jul 5 17:14:19 chro kernel: [ 72.440828] CPU: 7 PID: 4157 Comm: ping Not tainted 5.4.1+ #93
Jul 5 17:14:19 chro kernel: [ 72.440829] Hardware name: MACHENIKE F117-X/X15CN, BIOS 008.T14 01/26/2021
Jul 5 17:14:19 chro kernel: [ 72.440829] Call Trace:
Jul 5 17:14:19 chro kernel: [ 72.440829]
Jul 5 17:14:19 chro kernel: [ 72.440830] dump_stack+0x6d/0x95
Jul 5 17:14:19 chro kernel: [ 72.440862] ipip_tunnel_rcv+0x5d/0x260 [ipip]
Jul 5 17:14:19 chro kernel: [ 72.440863] ipip_rcv+0x13/0x15 [ipip]
Jul 5 17:14:19 chro kernel: [ 72.440865] tunnel4_rcv+0x3e/0x89 [tunnel4]
Jul 5 17:14:19 chro kernel: [ 72.440867] ip_protocol_deliver_rcu+0x187/0x1b0
Jul 5 17:14:19 chro kernel: [ 72.440870] ip_local_deliver_finish+0x48/0x50
Jul 5 17:14:19 chro kernel: [ 72.440872] ip_local_deliver+0x7e/0xe0
Jul 5 17:14:19 chro kernel: [ 72.440873] ip_rcv_finish+0x1b7/0x1c0
Jul 5 17:14:19 chro kernel: [ 72.440875] ip_rcv+0xdf/0x120
Jul 5 17:14:19 chro kernel: [ 72.440877] __netif_receive_skb_one_core+0x84/0xa0
Jul 5 17:14:19 chro kernel: [ 72.440878] __netif_receive_skb+0x18/0x60
Jul 5 17:14:19 chro kernel: [ 72.440880] process_backlog+0xa0/0x170
Jul 5 17:14:19 chro kernel: [ 72.440882] net_rx_action+0x140/0x3c0
Jul 5 17:14:19 chro kernel: [ 72.440884] __do_softirq+0xe4/0x2da
Jul 5 17:14:19 chro kernel: [ 72.440885] do_softirq_own_stack+0x2a/0x40
Jul 5 17:14:19 chro kernel: [ 72.440886]
Jul 5 17:14:19 chro kernel: [ 72.440907] do_softirq.part.20+0x46/0x50
Jul 5 17:14:19 chro kernel: [ 72.440909] __local_bh_enable_ip+0x50/0x60
Jul 5 17:14:19 chro kernel: [ 72.440911] ip_finish_output2+0x211/0x8a0
Jul 5 17:14:19 chro kernel: [ 72.440912] __ip_finish_output+0xfa/0x1c0
Jul 5 17:14:19 chro kernel: [ 72.440914] ? __ip_finish_output+0xfa/0x1c0
Jul 5 17:14:19 chro kernel: [ 72.440915] ip_finish_output+0x2c/0xa0
Jul 5 17:14:19 chro kernel: [ 72.440916] ip_output+0x6d/0xe0
Jul 5 17:14:19 chro kernel: [ 72.440917] ? __ip_finish_output+0x1c0/0x1c0
Jul 5 17:14:19 chro kernel: [ 72.440919] ip_local_out+0x3b/0x50
Jul 5 17:14:19 chro kernel: [ 72.440920] ip_send_skb+0x19/0x40
Jul 5 17:14:19 chro kernel: [ 72.440921] ip_push_pending_frames+0x33/0x40
Jul 5 17:14:19 chro kernel: [ 72.440923] raw_sendmsg+0x9e5/0xcc0
Jul 5 17:14:19 chro kernel: [ 72.440926] ? pat_enabled+0x20/0x20
Jul 5 17:14:19 chro kernel: [ 72.440927] ? down_read+0x12/0xa0
Jul 5 17:14:19 chro kernel: [ 72.440929] ? copy_termios+0x71/0x80
Jul 5 17:14:19 chro kernel: [ 72.440930] ? _copy_to_user+0x26/0x30
Jul 5 17:14:19 chro kernel: [ 72.440931] ? _cond_resched+0x19/0x40
Jul 5 17:14:19 chro kernel: [ 72.440933] ? aa_sk_perm+0x43/0x190
Jul 5 17:14:19 chro kernel: [ 72.440934] inet_sendmsg+0x64/0x70
Jul 5 17:14:19 chro kernel: [ 72.440936] ? inet_sendmsg+0x64/0x70
Jul 5 17:14:19 chro kernel: [ 72.440937] sock_sendmsg+0x5c/0x70
Jul 5 17:14:19 chro kernel: [ 72.440939] __sys_sendto+0x13f/0x180
Jul 5 17:14:19 chro kernel: [ 72.440941] ? handle_mm_fault+0xcb/0x210
Jul 5 17:14:19 chro kernel: [ 72.440944] ? ksys_ioctl+0x75/0x80
Jul 5 17:14:19 chro kernel: [ 72.440945] __x64_sys_sendto+0x28/0x30
Jul 5 17:14:19 chro kernel: [ 72.440947] do_syscall_64+0x57/0x190
Jul 5 17:14:19 chro kernel: [ 72.440948] entry_SYSCALL_64_after_hwframe+0x44/0xa9
阅读(749) | 评论(0) | 转发(0) |