ip_input.c (f94f3cb37a1c4d44dd2070cc4a6165689bda9c92) | ip_input.c (b71d1d426d263b0b6cb5760322efebbfc89d4463) |
---|---|
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 --- 254 unchanged lines hidden (view full) --- 263 264 return NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_IN, skb, skb->dev, NULL, 265 ip_local_deliver_finish); 266} 267 268static inline int ip_rcv_options(struct sk_buff *skb) 269{ 270 struct ip_options *opt; | 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 --- 254 unchanged lines hidden (view full) --- 263 264 return NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_IN, skb, skb->dev, NULL, 265 ip_local_deliver_finish); 266} 267 268static inline int ip_rcv_options(struct sk_buff *skb) 269{ 270 struct ip_options *opt; |
271 struct iphdr *iph; | 271 const struct iphdr *iph; |
272 struct net_device *dev = skb->dev; 273 274 /* It looks as overkill, because not all 275 IP options require packet mangling. 276 But it is the easiest for now, especially taking 277 into account that combination of IP options 278 and running sniffer is extremely rare condition. 279 --ANK (980813) --- 89 unchanged lines hidden (view full) --- 369 return NET_RX_DROP; 370} 371 372/* 373 * Main IP Receive routine. 374 */ 375int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) 376{ | 272 struct net_device *dev = skb->dev; 273 274 /* It looks as overkill, because not all 275 IP options require packet mangling. 276 But it is the easiest for now, especially taking 277 into account that combination of IP options 278 and running sniffer is extremely rare condition. 279 --ANK (980813) --- 89 unchanged lines hidden (view full) --- 369 return NET_RX_DROP; 370} 371 372/* 373 * Main IP Receive routine. 374 */ 375int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) 376{ |
377 struct iphdr *iph; | 377 const struct iphdr *iph; |
378 u32 len; 379 380 /* When the interface is in promisc. mode, drop all the crap 381 * that it receives, do not try to analyse it. 382 */ 383 if (skb->pkt_type == PACKET_OTHERHOST) 384 goto drop; 385 --- 67 unchanged lines hidden --- | 378 u32 len; 379 380 /* When the interface is in promisc. mode, drop all the crap 381 * that it receives, do not try to analyse it. 382 */ 383 if (skb->pkt_type == PACKET_OTHERHOST) 384 goto drop; 385 --- 67 unchanged lines hidden --- |