Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184525
b: refs/heads/master
c: 14f3ad6
h: refs/heads/master
i:
  184523: 7ba108e
v: v3
  • Loading branch information
Ulrich Weber authored and David S. Miller committed Feb 26, 2010
1 parent a36be40 commit 6e082b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fbf219f1c89b15e90ec2db5a3e9636376dc623db
refs/heads/master: 14f3ad6f4a12495b32b0dd743bc7179f36658208
12 changes: 8 additions & 4 deletions trunk/net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ int ip6_forward(struct sk_buff *skb)
struct ipv6hdr *hdr = ipv6_hdr(skb);
struct inet6_skb_parm *opt = IP6CB(skb);
struct net *net = dev_net(dst->dev);
u32 mtu;

if (net->ipv6.devconf_all->forwarding == 0)
goto error;
Expand Down Expand Up @@ -508,10 +509,14 @@ int ip6_forward(struct sk_buff *skb)
}
}

if (skb->len > dst_mtu(dst)) {
mtu = dst_mtu(dst);
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;

if (skb->len > mtu) {
/* Again, force OUTPUT device used as source address */
skb->dev = dst->dev;
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_mtu(dst));
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
IP6_INC_STATS_BH(net,
ip6_dst_idev(dst), IPSTATS_MIB_INTOOBIGERRORS);
IP6_INC_STATS_BH(net,
Expand Down Expand Up @@ -621,8 +626,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
mtu = ip6_skb_dst_mtu(skb);

/* We must not fragment if the socket is set to force MTU discovery
* or if the skb it not generated by a local socket. (This last
* check should be redundant, but it's free.)
* or if the skb it not generated by a local socket.
*/
if (!skb->local_df) {
skb->dev = skb_dst(skb)->dev;
Expand Down

0 comments on commit 6e082b5

Please sign in to comment.