diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip.h | 9 | ||||
| -rw-r--r-- | include/uapi/linux/in.h | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 4aa781b7f609..b885d75cede4 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -266,7 +266,8 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst) | |||
| 266 | 266 | ||
| 267 | static inline bool ip_sk_accept_pmtu(const struct sock *sk) | 267 | static inline bool ip_sk_accept_pmtu(const struct sock *sk) |
| 268 | { | 268 | { |
| 269 | return inet_sk(sk)->pmtudisc != IP_PMTUDISC_INTERFACE; | 269 | return inet_sk(sk)->pmtudisc != IP_PMTUDISC_INTERFACE && |
| 270 | inet_sk(sk)->pmtudisc != IP_PMTUDISC_OMIT; | ||
| 270 | } | 271 | } |
| 271 | 272 | ||
| 272 | static inline bool ip_sk_use_pmtu(const struct sock *sk) | 273 | static inline bool ip_sk_use_pmtu(const struct sock *sk) |
| @@ -274,6 +275,12 @@ static inline bool ip_sk_use_pmtu(const struct sock *sk) | |||
| 274 | return inet_sk(sk)->pmtudisc < IP_PMTUDISC_PROBE; | 275 | return inet_sk(sk)->pmtudisc < IP_PMTUDISC_PROBE; |
| 275 | } | 276 | } |
| 276 | 277 | ||
| 278 | static inline bool ip_sk_local_df(const struct sock *sk) | ||
| 279 | { | ||
| 280 | return inet_sk(sk)->pmtudisc < IP_PMTUDISC_DO || | ||
| 281 | inet_sk(sk)->pmtudisc == IP_PMTUDISC_OMIT; | ||
| 282 | } | ||
| 283 | |||
| 277 | static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst, | 284 | static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst, |
| 278 | bool forwarding) | 285 | bool forwarding) |
| 279 | { | 286 | { |
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h index 393c5de09d42..c33a65e3d62c 100644 --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h | |||
| @@ -120,6 +120,10 @@ struct in_addr { | |||
| 120 | * this socket to prevent accepting spoofed ones. | 120 | * this socket to prevent accepting spoofed ones. |
| 121 | */ | 121 | */ |
| 122 | #define IP_PMTUDISC_INTERFACE 4 | 122 | #define IP_PMTUDISC_INTERFACE 4 |
| 123 | /* weaker version of IP_PMTUDISC_INTERFACE, which allos packets to get | ||
| 124 | * fragmented if they exeed the interface mtu | ||
| 125 | */ | ||
| 126 | #define IP_PMTUDISC_OMIT 5 | ||
| 123 | 127 | ||
| 124 | #define IP_MULTICAST_IF 32 | 128 | #define IP_MULTICAST_IF 32 |
| 125 | #define IP_MULTICAST_TTL 33 | 129 | #define IP_MULTICAST_TTL 33 |
