]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/ipv6/ip6_flowlabel.c
ipv6: remove old conditions on flow label sharing
[mirror_ubuntu-bionic-kernel.git] / net / ipv6 / ip6_flowlabel.c
index 46e88433ec7d229550eecadc29f8eacc139fe5b2..819578e924999b5c8c620f40442e34fe30fc0071 100644 (file)
@@ -465,34 +465,6 @@ static int mem_check(struct sock *sk)
        return 0;
 }
 
-static bool ipv6_hdr_cmp(struct ipv6_opt_hdr *h1, struct ipv6_opt_hdr *h2)
-{
-       if (h1 == h2)
-               return false;
-       if (h1 == NULL || h2 == NULL)
-               return true;
-       if (h1->hdrlen != h2->hdrlen)
-               return true;
-       return memcmp(h1+1, h2+1, ((h1->hdrlen+1)<<3) - sizeof(*h1));
-}
-
-static bool ipv6_opt_cmp(struct ipv6_txoptions *o1, struct ipv6_txoptions *o2)
-{
-       if (o1 == o2)
-               return false;
-       if (o1 == NULL || o2 == NULL)
-               return true;
-       if (o1->opt_nflen != o2->opt_nflen)
-               return true;
-       if (ipv6_hdr_cmp(o1->hopopt, o2->hopopt))
-               return true;
-       if (ipv6_hdr_cmp(o1->dst0opt, o2->dst0opt))
-               return true;
-       if (ipv6_hdr_cmp((struct ipv6_opt_hdr *)o1->srcrt, (struct ipv6_opt_hdr *)o2->srcrt))
-               return true;
-       return false;
-}
-
 static inline void fl_link(struct ipv6_pinfo *np, struct ipv6_fl_socklist *sfl,
                struct ip6_flowlabel *fl)
 {
@@ -603,11 +575,6 @@ recheck:
                                     uid_eq(fl1->owner.uid, fl->owner.uid)))
                                        goto release;
 
-                               err = -EINVAL;
-                               if (!ipv6_addr_equal(&fl1->dst, &fl->dst) ||
-                                   ipv6_opt_cmp(fl1->opt, fl->opt))
-                                       goto release;
-
                                err = -ENOMEM;
                                if (sfl1 == NULL)
                                        goto release;