]> err.no Git - linux-2.6/blobdiff - net/ipv6/ip6_output.c
ipv4: replace dst_metric() with dst_mtu() in net/ipv4/route.c.
[linux-2.6] / net / ipv6 / ip6_output.c
index 0981c1ef305797322ab0b703a4aba609efcbbfc2..a4402de425d9ecb0b1f56dad298dc6cc92c8fb47 100644 (file)
@@ -116,7 +116,7 @@ static int ip6_dev_loopback_xmit(struct sk_buff *newskb)
        __skb_pull(newskb, skb_network_offset(newskb));
        newskb->pkt_type = PACKET_LOOPBACK;
        newskb->ip_summed = CHECKSUM_UNNECESSARY;
-       BUG_TRAP(newskb->dst);
+       WARN_ON(!newskb->dst);
 
        netif_rx(newskb);
        return 0;
@@ -236,6 +236,10 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        skb_reset_network_header(skb);
        hdr = ipv6_hdr(skb);
 
+       /* Allow local fragmentation. */
+       if (ipfragok)
+               skb->local_df = 1;
+
        /*
         *      Fill in the IPv6 header
         */
@@ -265,7 +269,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        skb->mark = sk->sk_mark;
 
        mtu = dst_mtu(dst);
-       if ((skb->len <= mtu) || ipfragok || skb_is_gso(skb)) {
+       if ((skb->len <= mtu) || skb->local_df || skb_is_gso(skb)) {
                IP6_INC_STATS(ip6_dst_idev(skb->dst),
                              IPSTATS_MIB_OUTREQUESTS);
                return NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev,
@@ -411,7 +415,7 @@ int ip6_forward(struct sk_buff *skb)
        struct inet6_skb_parm *opt = IP6CB(skb);
        struct net *net = dev_net(dst->dev);
 
-       if (ipv6_devconf.forwarding == 0)
+       if (net->ipv6.devconf_all->forwarding == 0)
                goto error;
 
        if (skb_warn_if_lro(skb))
@@ -458,7 +462,7 @@ int ip6_forward(struct sk_buff *skb)
        }
 
        /* XXX: idev->cnf.proxy_ndp? */
-       if (ipv6_devconf.proxy_ndp &&
+       if (net->ipv6.devconf_all->proxy_ndp &&
            pneigh_lookup(&nd_tbl, net, &hdr->daddr, skb->dev, 0)) {
                int proxied = ip6_forward_proxy_check(skb);
                if (proxied > 0)