In article <[EMAIL PROTECTED]> (at Sun, 19 Feb 2006 15:54:13 +0100), [EMAIL 
PROTECTED] says:

> Yes, Hugo Santos suggested me to use the minimum of both, the new
> patch is available there :
> 
> http://clarinet.u-strasbg.fr/~hoerdt/ip6_output.c.softfrag.patch2

Do you mean like this?

Signed-off-by: YOSHIFUJI Hideaki <[EMAIL PROTECTED]>

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index efa3e72..3264740 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -494,6 +494,7 @@ static int ip6_fragment(struct sk_buff *
        struct net_device *dev;
        struct sk_buff *frag;
        struct rt6_info *rt = (struct rt6_info*)skb->dst;
+       struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL;
        struct ipv6hdr *tmp_hdr;
        struct frag_hdr *fh;
        unsigned int mtu, hlen, left, len;
@@ -506,6 +507,8 @@ static int ip6_fragment(struct sk_buff *
        nexthdr = *prevhdr;
 
        mtu = dst_mtu(&rt->u.dst) - hlen - sizeof(struct frag_hdr);
+       if (np && np->frag_size && np->frag_size < dst_mtu(&rt->u.dst))
+               mtu = np->frag_size - hlen - sizeof(struct frag_hdr);
 
        if (skb_shinfo(skb)->frag_list) {
                int first_len = skb_pagelen(skb);


-- 
YOSHIFUJI Hideaki @ USAGI Project  <[EMAIL PROTECTED]>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to