ip_input.c (29a26a56803855a79dbd028cd61abee56237d6e5) | ip_input.c (0c4b51f0054ce85c0ec578ab818f0631834573eb) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * The Internet Protocol (IP) module. 7 * 8 * Authors: Ross Biro --- 174 unchanged lines hidden (view full) --- 183 184 if (last) { 185 raw_rcv(last, skb); 186 return true; 187 } 188 return false; 189} 190 | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * The Internet Protocol (IP) module. 7 * 8 * Authors: Ross Biro --- 174 unchanged lines hidden (view full) --- 183 184 if (last) { 185 raw_rcv(last, skb); 186 return true; 187 } 188 return false; 189} 190 |
191static int ip_local_deliver_finish(struct sock *sk, struct sk_buff *skb) | 191static int ip_local_deliver_finish(struct net *net, struct sock *sk, struct sk_buff *skb) |
192{ | 192{ |
193 struct net *net = dev_net(skb->dev); 194 | |
195 __skb_pull(skb, skb_network_header_len(skb)); 196 197 rcu_read_lock(); 198 { 199 int protocol = ip_hdr(skb)->protocol; 200 const struct net_protocol *ipprot; 201 int raw; 202 --- 103 unchanged lines hidden (view full) --- 306 return false; 307drop: 308 return true; 309} 310 311int sysctl_ip_early_demux __read_mostly = 1; 312EXPORT_SYMBOL(sysctl_ip_early_demux); 313 | 193 __skb_pull(skb, skb_network_header_len(skb)); 194 195 rcu_read_lock(); 196 { 197 int protocol = ip_hdr(skb)->protocol; 198 const struct net_protocol *ipprot; 199 int raw; 200 --- 103 unchanged lines hidden (view full) --- 304 return false; 305drop: 306 return true; 307} 308 309int sysctl_ip_early_demux __read_mostly = 1; 310EXPORT_SYMBOL(sysctl_ip_early_demux); 311 |
314static int ip_rcv_finish(struct sock *sk, struct sk_buff *skb) | 312static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb) |
315{ 316 const struct iphdr *iph = ip_hdr(skb); | 313{ 314 const struct iphdr *iph = ip_hdr(skb); |
317 struct net *net = dev_net(skb->dev); | |
318 struct rtable *rt; 319 320 if (sysctl_ip_early_demux && !skb_dst(skb) && !skb->sk) { 321 const struct net_protocol *ipprot; 322 int protocol = iph->protocol; 323 324 ipprot = rcu_dereference(inet_protos[protocol]); 325 if (ipprot && ipprot->early_demux) { --- 143 unchanged lines hidden --- | 315 struct rtable *rt; 316 317 if (sysctl_ip_early_demux && !skb_dst(skb) && !skb->sk) { 318 const struct net_protocol *ipprot; 319 int protocol = iph->protocol; 320 321 ipprot = rcu_dereference(inet_protos[protocol]); 322 if (ipprot && ipprot->early_demux) { --- 143 unchanged lines hidden --- |