aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-02-24 17:32:18 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-24 17:32:18 -0500
commit4853a615bbfb5aae4c3e2203b4b2742c109784c9 (patch)
tree535e45ef271ad5778ba4e6aca8f432b504a4ca39
parent9c869edac591977314323a4eaad5f7633fca684f (diff)
parentd91675f9c7f5752e8657df1e1d926bd6a624434f (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r--net/ipv6/ip6_output.c15
-rw-r--r--net/ipv6/ip6_tunnel.c1
2 files changed, 14 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index efa3e72cfcfa..f999edd846a9 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -494,6 +494,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
494 struct net_device *dev; 494 struct net_device *dev;
495 struct sk_buff *frag; 495 struct sk_buff *frag;
496 struct rt6_info *rt = (struct rt6_info*)skb->dst; 496 struct rt6_info *rt = (struct rt6_info*)skb->dst;
497 struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL;
497 struct ipv6hdr *tmp_hdr; 498 struct ipv6hdr *tmp_hdr;
498 struct frag_hdr *fh; 499 struct frag_hdr *fh;
499 unsigned int mtu, hlen, left, len; 500 unsigned int mtu, hlen, left, len;
@@ -505,7 +506,12 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
505 hlen = ip6_find_1stfragopt(skb, &prevhdr); 506 hlen = ip6_find_1stfragopt(skb, &prevhdr);
506 nexthdr = *prevhdr; 507 nexthdr = *prevhdr;
507 508
508 mtu = dst_mtu(&rt->u.dst) - hlen - sizeof(struct frag_hdr); 509 mtu = dst_mtu(&rt->u.dst);
510 if (np && np->frag_size < mtu) {
511 if (np->frag_size)
512 mtu = np->frag_size;
513 }
514 mtu -= hlen + sizeof(struct frag_hdr);
509 515
510 if (skb_shinfo(skb)->frag_list) { 516 if (skb_shinfo(skb)->frag_list) {
511 int first_len = skb_pagelen(skb); 517 int first_len = skb_pagelen(skb);
@@ -882,7 +888,12 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
882 inet->cork.fl = *fl; 888 inet->cork.fl = *fl;
883 np->cork.hop_limit = hlimit; 889 np->cork.hop_limit = hlimit;
884 np->cork.tclass = tclass; 890 np->cork.tclass = tclass;
885 inet->cork.fragsize = mtu = dst_mtu(rt->u.dst.path); 891 mtu = dst_mtu(rt->u.dst.path);
892 if (np && np->frag_size < mtu) {
893 if (np->frag_size)
894 mtu = np->frag_size;
895 }
896 inet->cork.fragsize = mtu;
886 if (dst_allfrag(rt->u.dst.path)) 897 if (dst_allfrag(rt->u.dst.path))
887 inet->cork.flags |= IPCORK_ALLFRAG; 898 inet->cork.flags |= IPCORK_ALLFRAG;
888 inet->cork.length = 0; 899 inet->cork.length = 0;
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index faea8a120ee2..48597538db3f 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -884,6 +884,7 @@ ip6ip6_tnl_change(struct ip6_tnl *t, struct ip6_tnl_parm *p)
884 t->parms.encap_limit = p->encap_limit; 884 t->parms.encap_limit = p->encap_limit;
885 t->parms.flowinfo = p->flowinfo; 885 t->parms.flowinfo = p->flowinfo;
886 t->parms.link = p->link; 886 t->parms.link = p->link;
887 ip6_tnl_dst_reset(t);
887 ip6ip6_tnl_link_config(t); 888 ip6ip6_tnl_link_config(t);
888 return 0; 889 return 0;
889} 890}