- 论坛徽章:
- 36
|
回复 4# firocu
我看了下, 3.11-rc1 中还是有的,查了下 git log。如下:
git log 21d1196a35f5686c4323e42a62fdb4b23b0ab4a3
ipv4: set transport header earlier
后面的修改把四层 header 的设置提前了,放到 ip_rcv() 函数中了
30 diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
31 index 3da817b..15e3e68 100644
32 --- a/net/ipv4/ip_input.c
33 +++ b/net/ipv4/ip_input.c
34 @@ -190,10 +190,7 @@ static int ip_local_deliver_finish(struct sk_buff *skb)
35 {
36 struct net *net = dev_net(skb->dev);
37
38 - __skb_pull(skb, ip_hdrlen(skb));
39 -
40 - /* Point into the IP datagram, just past the header. */
41 - skb_reset_transport_header(skb);
42 + __skb_pull(skb, skb_network_header_len(skb));
43
44 rcu_read_lock();
45 {
46 @@ -437,6 +434,8 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt,
47 goto drop;
48 }
49
50 + skb->transport_header = skb->network_header + iph->ihl*4;
51 +
52 /* Remove any debris in the socket control block */
53 memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
Line 50 应该就是你想找到的。 |
|