上一页 1 2 3 4 5 6 7 8 ··· 70 下一页
摘要: 之前有涉及到 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)
摘要: 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)
摘要: 发送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)
摘要: 主动发出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)
摘要: 添加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)
摘要: 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)
摘要: VRF顾名思义就是虚拟路由转发(Virtual Routing Forwarding),VRF 允许在同一物理设备上维护多个独立的路由实例;简单点来讲,就是把一台路由器当多台虚拟路由器来用。 不同 VRF 实例之间的流量是相互隔离的。这对于提供多租户服务非常有用,确保一个租户的流量不会影响到其他租户 阅读全文
posted @ 2024-10-09 22:05 codestacklinuxer 阅读(297) 评论(0) 推荐(0)
摘要: 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)
摘要: 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)
摘要: 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 下一页