]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ip6_flowlabel.c
[IPV6]: Use macro for rwlock_t initialization.
[linux-2.6-omap-h63xx.git] / net / ipv6 / ip6_flowlabel.c
index f841bde30c18493a94fd5d522b84724a8eb82a4a..89d12b4817a9fddec6254c24cf5c93f231a7dec5 100644 (file)
@@ -200,6 +200,8 @@ struct ip6_flowlabel * fl6_sock_lookup(struct sock *sk, u32 label)
        return NULL;
 }
 
+EXPORT_SYMBOL_GPL(fl6_sock_lookup);
+
 void fl6_free_socklist(struct sock *sk)
 {
        struct ipv6_pinfo *np = inet6_sk(sk);
@@ -225,20 +227,16 @@ struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space,
                                         struct ip6_flowlabel * fl,
                                         struct ipv6_txoptions * fopt)
 {
-       struct ipv6_txoptions * fl_opt = fl ? fl->opt : NULL;
-
-       if (fopt == NULL || fopt->opt_flen == 0) {
-               if (!fl_opt || !fl_opt->dst0opt || fl_opt->srcrt)
-                       return fl_opt;
-       }
-
+       struct ipv6_txoptions * fl_opt = fl->opt;
+       
+       if (fopt == NULL || fopt->opt_flen == 0)
+               return fl_opt;
+       
        if (fl_opt != NULL) {
                opt_space->hopopt = fl_opt->hopopt;
-               opt_space->dst0opt = fl_opt->srcrt ? fl_opt->dst0opt : NULL;
+               opt_space->dst0opt = fl_opt->dst0opt;
                opt_space->srcrt = fl_opt->srcrt;
                opt_space->opt_nflen = fl_opt->opt_nflen;
-               if (fl_opt->dst0opt && !fl_opt->srcrt)
-                       opt_space->opt_nflen -= ipv6_optlen(fl_opt->dst0opt);
        } else {
                if (fopt->opt_nflen == 0)
                        return fopt;
@@ -483,7 +481,7 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
                                                goto done;
                                        }
                                        fl1 = sfl->fl;
-                                       atomic_inc(&fl->users);
+                                       atomic_inc(&fl1->users);
                                        break;
                                }
                        }