]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ip6_output.c
netns: Add network namespace argument to rt6_fill_node() and ipv6_dev_get_saddr()
[linux-2.6-omap-h63xx.git] / net / ipv6 / ip6_output.c
index 6811901e6b1ec94c0e3084de16c7b8c408bb0503..0e844c2736a77b0dad9aa87095298be92d01bf7c 100644 (file)
@@ -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,
@@ -930,7 +934,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
                goto out_err_release;
 
        if (ipv6_addr_any(&fl->fl6_src)) {
-               err = ipv6_dev_get_saddr(ip6_dst_idev(*dst)->dev,
+               err = ipv6_dev_get_saddr(net, ip6_dst_idev(*dst)->dev,
                                         &fl->fl6_dst,
                                         sk ? inet6_sk(sk)->srcprefs : 0,
                                         &fl->fl6_src);