diff options
| author | Lu Qiuwen <[email protected]> | 2019-07-03 01:31:23 +0800 |
|---|---|---|
| committer | Lu Qiuwen <[email protected]> | 2019-07-03 01:31:23 +0800 |
| commit | c498d300713af5c8077973193da83856fb327191 (patch) | |
| tree | b19c985e88c95e5a1e2665eec509ce79acd7d237 | |
| parent | c0aa0c35568f72ebc36903484bec23af5f0c7a66 (diff) | |
修正tcprestore内存没有初始化的问题,修改启用判断窗口扩大选项的条件为客户端、服务器均需启用。v1.0.0-20190806
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | core.c | 4 | ||||
| -rw-r--r-- | dkms.conf | 2 |
3 files changed, 3 insertions, 4 deletions
@@ -49,7 +49,6 @@ modules.order Module.symvers Mkfile.old -dkms.conf # compile_commands.json compile_commands.json @@ -273,7 +273,7 @@ static int __tcp_restore_fd_create(struct net * netspace, const struct tcp_resto nr_tcp_repair_opts++; } - if (endpoint->wscale_perm) + if (endpoint->wscale_perm && peer->wscale_perm) { tcp_repair_opts[nr_tcp_repair_opts].opt_code = TCPOPT_WINDOW; tcp_repair_opts[nr_tcp_repair_opts].opt_val = (endpoint->wscale << 16 ) | peer->wscale; @@ -583,7 +583,7 @@ int tfe_kernel_tcp_queue_outfn(struct nf_queue_entry *entry, unsigned int queuen cmsg_payload = tcp_payload + cmsg_offset; cmsg_payload_len = tcp_payload_len - cmsg_offset; - restore_info = (struct tcp_restore_info *)kmalloc(sizeof(struct tcp_restore_info), GFP_ATOMIC); + restore_info = (struct tcp_restore_info *)kzalloc(sizeof(struct tcp_restore_info), GFP_ATOMIC); if(unlikely(restore_info == NULL)) { pr_err("Failed at alloc memory for restore info, drop it.\n"); @@ -1,5 +1,5 @@ PACKAGE_NAME="tfe-kmod" -PACKAGE_VERSION="8d05746" +PACKAGE_VERSION="c0aa0c3" BUILT_MODULE_NAME[0]="tfe_kmod" DEST_MODULE_LOCATION[0]="/kernel/extra/" AUTOINSTALL="yes" |
