ipip学习记录-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 413384
  • 博文数量: 124
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 872
  • 用 户 组: 普通用户
  • 注册时间: 2018-03-29 14:38
个人简介

默默的一块石头

文章分类

全部博文(124)

文章存档

2022年(26)

2021年(10)

2020年(28)

2019年(60)

我的朋友
相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: linux

2022-07-06 16:45:05

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


阅读(724) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图