Comments (6)
ip_vs_proto_udp.c 397行 改为 } else if (!cp->app && (udph->check != 0)) {
from lvs.
ip_vs_proto_udp.c 397行 改为 } else if (!cp->app && (udph->check != 0)) {
397行是注释
from lvs.
ip_vs_proto_udp.c 397行 改为 } else if (!cp->app && (udph->check != 0)) {
397行是注释
@dhh123 我说的是v2分支,master udp不支持fullnat吧
from lvs.
ip_vs_proto_udp.c 397行 改为 } else if (!cp->app && (udph->check != 0)) {
397行是注释
@dhh123 我说的是v2分支,master udp不支持fullnat吧
fullnat我用的是兼容戴尔硬件的这个版本,不知道改动哪里能解决checksum的问题,请指教一下。https://jeffrycheng.com/2017/03/31/%E5%9C%A8R730%E4%B8%8A%E5%AE%89%E8%A3%85lvs-fullnat/
。另外我是用了您的lvs-snat 同样不兼容硬件问题,我把您的代码迁移到了2.6.32.358版本,编译和测试也没发现什么问题。
from lvs.
ip_vs_proto_udp.c里找到udp_fnat_in_handler, udp_fnat_out_handler这2个函数,然后找到
/* Adjust UDP checksums /
if (skb->ip_summed == CHECKSUM_PARTIAL) {
udp_partial_csum_reset(cp->af, (skb->len - udphoff),
udph, &cp->vaddr, &cp->caddr);
} else if (!cp->app) { #把这里改成 (!cp->app && (udph->check != 0))
/ Only port and addr are changed, do fast csum update */
from lvs.
ip_vs_proto_udp.c里找到udp_fnat_in_handler, udp_fnat_out_handler这2个函数,然后找到
/* Adjust UDP checksums / if (skb->ip_summed == CHECKSUM_PARTIAL) { udp_partial_csum_reset(cp->af, (skb->len - udphoff), udph, &cp->vaddr, &cp->caddr); } else if (!cp->app) { #把这里改成 (!cp->app && (udph->check != 0)) / Only port and addr are changed, do fast csum update */
https://jeffrycheng.com/2017/03/31/%E5%9C%A8R730%E4%B8%8A%E5%AE%89%E8%A3%85lvs-fullnat/
我也是用的这个版本,fullnat情况下也是udp bad cksum,代码好像和您说的不一样
下面是默认代码,请问需要怎么改
/*
* Adjust UDP checksums
/
if (skb->ip_summed == CHECKSUM_PARTIAL) {
udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr,
htons(oldlen),
htons(skb->len - udphoff));
} else if (!cp->app && (udph->check != 0)) {
/ Only port and addr are changed, do fast csum update /
udp_fast_csum_update(cp->af, udph, &cp->vaddr, &cp->daddr,
cp->vport, cp->dport);
if (skb->ip_summed == CHECKSUM_COMPLETE)
skb->ip_summed = CHECKSUM_NONE;
} else {
/ full checksum calculation */
udph->check = 0;
skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0);
#ifdef CONFIG_IP_VS_IPV6
if (cp->af == AF_INET6)
udph->check = csum_ipv6_magic(&cp->caddr.in6,
&cp->daddr.in6,
skb->len - udphoff,
cp->protocol, skb->csum);
else
#endif
udph->check = csum_tcpudp_magic(cp->caddr.ip,
cp->daddr.ip,
skb->len - udphoff,
cp->protocol,
skb->csum);
if (udph->check == 0)
udph->check = CSUM_MANGLED_0;
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
from lvs.
Related Issues (20)
- lvs 可以尝试嵌入 luajit吗? 这样的话用户的可定制更强?就好像nginx + lua 形成 openresty 框架?
- 需要LVS相关技术交流的可以加入
- hash表的主要作用是什么?
- 迁移lvs-fullnat到高版本内核 HOT 6
- 如何让更高版本的内核使用上v2甚至v3版本的patch?有没详细步骤? HOT 3
- 这里的版本和官网linuxvirtualserver.org提供的什么区别? HOT 3
- LVS怎么解决使用127.0.0.1无法访问的问题 HOT 1
- cp: 无法获取"lvs-2.6.32-220.23.1.el6.patch" 的文件状态(stat): 没有那个文件或目录
- lvs调度器针对大流量问题
- Can I forward ipv6(client->director) to ipv4(director->real server) or vice versa HOT 1
- 快速平滑的摘除 RS HOT 7
- RS为Java程序,无法通过TOA获取源地址
- hello 我使用fullnat 后端rs机器会出现 TcpExt.ListenDrops HOT 2
- no limitation for "%s" while calling fscanf()
- local_address_group 问题请教 HOT 1
- Could I use this module in linux kernel version:4.4.x or 4.15.x in ubuntu?
- 编译 ipvsadm 时报错了:usr/bin/ld: cannot find -lnl
- no limitation for "%s" while calling fscanf()
- ipvsadm connection stats for specific virtual service not working
- Security Vulnerability - Action Required: some unpatched vulnerabilities are detected in your repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvs.