会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
坐看云起时
乘风好去,长空万里,直下看山河!!! 研究过httpserver、nginx、内核tcpip协议栈源码,内存管理 、摄像头-iic-spi等驱动!! 目前搞搞准入 看看内核 看看身份逻辑 看看管控 写写go
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
70
下一页
2024年10月16日
IPv4路由查找2 fib_trie
摘要: 之前有涉及到 table 查找https://www.cnblogs.com/codestack/p/15975344.html fib的创建https://www.cnblogs.com/codestack/p/15964568.html https://vincent.bernat.ch/en/
阅读全文
posted @ 2024-10-16 20:42 codestacklinuxer
阅读(62)
评论(0)
推荐(0)
2024年10月14日
SKB路由缓存与SOCK路由缓存2
摘要: skb结构体中的成员_skb_refdst用于暂时缓存出口/入口路由,避免在skb生存期中反复查找路由 sock结构体中有两个成员缓存路由:sk_rx_dst缓存入口路由,sk_dst_cache缓存出口路由 SKB路由缓存 skb_dst_set需要在调用前增加引用计数(dst_clone);而s
阅读全文
posted @ 2024-10-14 21:58 codestacklinuxer
阅读(125)
评论(0)
推荐(0)
SKB路由缓存与SOCK路由缓存1
摘要: 发送tcp报文时: nc 10.10.10.2 80 tcp_v4_connect 1.1 >ip_route_connect static inline struct rtable *ip_route_connect(struct flowi4 *fl4, __be32 dst, __be32 s
阅读全文
posted @ 2024-10-14 21:58 codestacklinuxer
阅读(27)
评论(0)
推荐(0)
2024年10月13日
tcp 发包时 路由调用
摘要: 主动发出tcp连接时路由stack 如果srcip没有设置;则通过路由查找源ip然后赋值初始化fl4 最后调用ip_route_output_flow >__ip_route_output_key 查找路由 查找路由时,由于有sip;所以直接进入一下逻辑 然后查找rth; 然后初始化flp出口 如果
阅读全文
posted @ 2024-10-13 15:42 codestacklinuxer
阅读(27)
评论(0)
推荐(0)
2024年10月12日
ip rule action
摘要: 添加pbr 相关逻辑:https://www.cnblogs.com/codestack/p/15964315.html fib_rules_lookup,判断下action接后执行ops->action的操作,此刻应该是fib4_rule_action, 在没有使用l3mdev的情况下,使用rul
阅读全文
posted @ 2024-10-12 16:27 codestacklinuxer
阅读(38)
评论(0)
推荐(0)
2024年10月11日
TCP listen socket inet_lookup_listener
摘要: netstat -atnp |grep 8080 tcp 0 0 192.168.1.208:8080 0.0.0.0:* LISTEN 109094/server tcp6 0 0 :::8080 :::* LISTEN 109094/server 在linux 3.9 后引入reuseport
阅读全文
posted @ 2024-10-11 14:55 codestacklinuxer
阅读(31)
评论(0)
推荐(0)
2024年10月9日
Linux VRF
摘要: VRF顾名思义就是虚拟路由转发(Virtual Routing Forwarding),VRF 允许在同一物理设备上维护多个独立的路由实例;简单点来讲,就是把一台路由器当多台虚拟路由器来用。 不同 VRF 实例之间的流量是相互隔离的。这对于提供多租户服务非常有用,确保一个租户的流量不会影响到其他租户
阅读全文
posted @ 2024-10-09 22:05 codestacklinuxer
阅读(297)
评论(0)
推荐(0)
connect 路由 ip_route_connect
摘要: ip_route_connect_init -> flowi4_init_output 这个函数会去初始化fl4的数据,例如fl4->daddr,fl4->saddr,fl4->fl4_dport,fl4->fl4_sport,但是并非都是已经设置好值的,因为想要发送第一个SYN报文,就需要完整的来
阅读全文
posted @ 2024-10-09 22:02 codestacklinuxer
阅读(39)
评论(0)
推荐(0)
socket bind2vrf
摘要: Add l3mdev index to flow struct and avoid oif reset for port devices VRF和l3mdev核心代码的基本前提是,将套接字绑定到一个设备(l3mdev或带有三层域的网络设备)以指示三层网络的作用域。旧的代码会将flowi_oif(输出
阅读全文
posted @ 2024-10-09 20:13 codestacklinuxer
阅读(54)
评论(0)
推荐(0)
2024年10月8日
avoid reusing FIN_WAIT2
摘要: Here are three connections captured by tcpdump: 127.0.0.1.40002 > 127.0.0.1.9999: Flags [S], seq 2965525191 127.0.0.1.9999 > 127.0.0.1.40002: Flags [S
阅读全文
posted @ 2024-10-08 19:31 codestacklinuxer
阅读(12)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
70
下一页