struct ipv6_txoptions *fopt);
 void fl6_free_socklist(struct sock *sk);
 int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen);
-int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq);
+int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq,
+                          int flags);
 int ip6_flowlabel_init(void);
 void ip6_flowlabel_cleanup(void);
 
 
 #define IPV6_FL_F_CREATE       1
 #define IPV6_FL_F_EXCL         2
 #define IPV6_FL_F_REFLECT      4
+#define IPV6_FL_F_REMOTE       8
 
 #define IPV6_FL_S_NONE         0
 #define IPV6_FL_S_EXCL         1
 
        spin_unlock_bh(&ip6_sk_fl_lock);
 }
 
-int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq)
+int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq,
+                          int flags)
 {
        struct ipv6_pinfo *np = inet6_sk(sk);
        struct ipv6_fl_socklist *sfl;
 
+       if (flags & IPV6_FL_F_REMOTE) {
+               freq->flr_label = np->rcv_flowinfo & IPV6_FLOWLABEL_MASK;
+               return 0;
+       }
+
        if (np->repflow) {
                freq->flr_label = np->flow_label;
                return 0;
 
        case IPV6_FLOWLABEL_MGR:
        {
                struct in6_flowlabel_req freq;
+               int flags;
 
                if (len < sizeof(freq))
                        return -EINVAL;
                        return -EINVAL;
 
                len = sizeof(freq);
+               flags = freq.flr_flags;
+
                memset(&freq, 0, sizeof(freq));
 
-               val = ipv6_flowlabel_opt_get(sk, &freq);
+               val = ipv6_flowlabel_opt_get(sk, &freq, flags);
                if (val < 0)
                        return val;