ip.h (698365fa1874aa7635d51667a34a2842228e9837) | ip.h (60ff746739bf805a912484643c720b6124826140) |
---|---|
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 * Definitions for the IP module. 7 * 8 * Version: @(#)ip.h 1.0.2 05/07/93 --- 255 unchanged lines hidden (view full) --- 264 inet_sk(sk)->pmtudisc != IP_PMTUDISC_OMIT; 265} 266 267static inline bool ip_sk_use_pmtu(const struct sock *sk) 268{ 269 return inet_sk(sk)->pmtudisc < IP_PMTUDISC_PROBE; 270} 271 | 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 * Definitions for the IP module. 7 * 8 * Version: @(#)ip.h 1.0.2 05/07/93 --- 255 unchanged lines hidden (view full) --- 264 inet_sk(sk)->pmtudisc != IP_PMTUDISC_OMIT; 265} 266 267static inline bool ip_sk_use_pmtu(const struct sock *sk) 268{ 269 return inet_sk(sk)->pmtudisc < IP_PMTUDISC_PROBE; 270} 271 |
272static inline bool ip_sk_local_df(const struct sock *sk) | 272static inline bool ip_sk_ignore_df(const struct sock *sk) |
273{ 274 return inet_sk(sk)->pmtudisc < IP_PMTUDISC_DO || 275 inet_sk(sk)->pmtudisc == IP_PMTUDISC_OMIT; 276} 277 278static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst, 279 bool forwarding) 280{ --- 18 unchanged lines hidden (view full) --- 299} 300 301void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); 302 303static inline void ip_select_ident(struct sk_buff *skb, struct dst_entry *dst, struct sock *sk) 304{ 305 struct iphdr *iph = ip_hdr(skb); 306 | 273{ 274 return inet_sk(sk)->pmtudisc < IP_PMTUDISC_DO || 275 inet_sk(sk)->pmtudisc == IP_PMTUDISC_OMIT; 276} 277 278static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst, 279 bool forwarding) 280{ --- 18 unchanged lines hidden (view full) --- 299} 300 301void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); 302 303static inline void ip_select_ident(struct sk_buff *skb, struct dst_entry *dst, struct sock *sk) 304{ 305 struct iphdr *iph = ip_hdr(skb); 306 |
307 if ((iph->frag_off & htons(IP_DF)) && !skb->local_df) { | 307 if ((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) { |
308 /* This is only to work around buggy Windows95/2000 309 * VJ compression implementations. If the ID field 310 * does not change, they drop every other packet in 311 * a TCP stream using header compression. 312 */ 313 iph->id = (sk && inet_sk(sk)->inet_daddr) ? 314 htons(inet_sk(sk)->inet_id++) : 0; 315 } else 316 __ip_select_ident(iph, dst, 0); 317} 318 319static inline void ip_select_ident_more(struct sk_buff *skb, struct dst_entry *dst, struct sock *sk, int more) 320{ 321 struct iphdr *iph = ip_hdr(skb); 322 | 308 /* This is only to work around buggy Windows95/2000 309 * VJ compression implementations. If the ID field 310 * does not change, they drop every other packet in 311 * a TCP stream using header compression. 312 */ 313 iph->id = (sk && inet_sk(sk)->inet_daddr) ? 314 htons(inet_sk(sk)->inet_id++) : 0; 315 } else 316 __ip_select_ident(iph, dst, 0); 317} 318 319static inline void ip_select_ident_more(struct sk_buff *skb, struct dst_entry *dst, struct sock *sk, int more) 320{ 321 struct iphdr *iph = ip_hdr(skb); 322 |
323 if ((iph->frag_off & htons(IP_DF)) && !skb->local_df) { | 323 if ((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) { |
324 if (sk && inet_sk(sk)->inet_daddr) { 325 iph->id = htons(inet_sk(sk)->inet_id); 326 inet_sk(sk)->inet_id += 1 + more; 327 } else 328 iph->id = 0; 329 } else 330 __ip_select_ident(iph, dst, more); 331} --- 191 unchanged lines hidden --- | 324 if (sk && inet_sk(sk)->inet_daddr) { 325 iph->id = htons(inet_sk(sk)->inet_id); 326 inet_sk(sk)->inet_id += 1 + more; 327 } else 328 iph->id = 0; 329 } else 330 __ip_select_ident(iph, dst, more); 331} --- 191 unchanged lines hidden --- |