summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>2005-03-04 08:38:31 +0900
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>2005-03-04 08:38:31 +0900
commit8b123d00b713465bb5d262cdfa9a05d3e34f612d (patch)
tree8c3336e93d87aa3df92e26e4e4f4a8a883fa46a2 /include
parent3b4804268a4aa955614ad03770f6a68cc808403e (diff)
[IPV6] Always add a fragment header after receiving TOO BIG w/ pmtu < 1280.
According to RFC2460, PMTU is set to the IPv6 Minimum Link MTU (1280) and a fragment header should always be included after a node receiving Too Big message reporting PMTU is less than the IPv6 Minimum Link MTU (1280). Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ip.h1
-rw-r--r--include/linux/rtnetlink.h1
-rw-r--r--include/net/dst.h9
3 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ip.h b/include/linux/ip.h
index 487152a404f8..7d7633632d28 100644
--- a/include/linux/ip.h
+++ b/include/linux/ip.h
@@ -152,6 +152,7 @@ struct inet_sock {
};
#define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */
+#define IPCORK_ALLFRAG 2 /* always fragment (for ipv6 for now) */
static inline struct inet_sock *inet_sk(const struct sock *sk)
{
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index c3d5d043a5ca..5f6310f0d880 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -346,6 +346,7 @@ enum
#define RTAX_FEATURE_ECN 0x00000001
#define RTAX_FEATURE_SACK 0x00000002
#define RTAX_FEATURE_TIMESTAMP 0x00000004
+#define RTAX_FEATURE_ALLFRAG 0x00000008
struct rta_session
{
diff --git a/include/net/dst.h b/include/net/dst.h
index b7e47a7ad105..785c4a185ff5 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -124,6 +124,15 @@ dst_pmtu(const struct dst_entry *dst)
return mtu;
}
+static inline u32
+dst_allfrag(const struct dst_entry *dst)
+{
+ int ret = dst_path_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG;
+ /* Yes, _exactly_. This is paranoia. */
+ barrier();
+ return ret;
+}
+
static inline int
dst_metric_locked(struct dst_entry *dst, int metric)
{