diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-03-06 05:34:23 -0800 |
|---|---|---|
| committer | David S. Miller <davem@northbeach.davemloft.net.davemloft.net> | 2005-03-06 05:34:23 -0800 |
| commit | 4d37d4632f042e2f4ea7414bbc512fa03f522e5f (patch) | |
| tree | 1ca7d7aa9796d1f9cb2c69bcdcfc5ca6daeb1376 /include/net/dst.h | |
| parent | e58c25485309321a74467b8d8dd8fd5d947d9728 (diff) | |
[IPSEC]: Use dst_mtu i n xfrm[46]_output
There was a lot of fun in laying the foundations. Now it's time
to start using it.
This patch fixes the calculations in xfrm[46]_output so that we don't
reject properly sized packets from the TCP stack. The previous
calculation is wrong because the xfrm overhead is not constant.
After this I'll start cleaning stuff up. For example, tcp's
ext2_header_len and dst's path can both be removed.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dst.h')
| -rw-r--r-- | include/net/dst.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index b7e47a7ad105..2e7ddfbec3a1 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -124,6 +124,16 @@ dst_pmtu(const struct dst_entry *dst) return mtu; } +static inline u32 dst_mtu(const struct dst_entry *dst) +{ + u32 mtu = dst_metric(dst, RTAX_MTU); + /* + * Alexey put it here, so ask him about it :) + */ + barrier(); + return mtu; +} + static inline int dst_metric_locked(struct dst_entry *dst, int metric) { |
