wangbojing / NtyTcp

单线程用户态TCP/IP协议栈,epoll实现,包含服务器案例,并发测试案例
MIT License
677 stars 298 forks source link

运行./nty_example_block_server出现Segmentation fault #9

Open ilikegithubcom opened 4 years ago

ilikegithubcom commented 4 years ago

步骤如下: 1、虚拟机安装centos7(core 3.10.0-1127.8.2.el7.x86_64) 2、编译netmap13.0,得到e1000.ko和netmap.ko 3、加载e1000.ko和netmap.ko到系统 4、配置ip/mac和网卡,修改ntytcp的nty_config.h和nty_eth.c文件,如下: image image 5、编译ntytcp_maste 6、运行 nty_example_block_server 7、出现Segmentation fault,如下为gdb信息: image 请问是何原因,谢谢!

JoyeFu commented 2 years ago

1、nty_api.c 358行,nty_listen函数中加一行:

listener->s = (struct _nty_socket *)listener->socket; 

2、另外IPOutputStandalone函数中异常判断需返回

if (!haddr) {
    return NULL;
}