OSDN Git Service

net: inet: Support UID-based routing in IP protocols.
[android-x86/kernel.git] / net / ipv6 / datagram.c
index 37874e2..c5d76d2 100644 (file)
@@ -54,6 +54,7 @@ static void ip6_datagram_flow_key_init(struct flowi6 *fl6, struct sock *sk)
        fl6->fl6_dport = inet->inet_dport;
        fl6->fl6_sport = inet->inet_sport;
        fl6->flowlabel = np->flow_label;
+       fl6->flowi6_uid = sk->sk_uid;
 
        if (!fl6->flowi6_oif)
                fl6->flowi6_oif = np->sticky_pktinfo.ipi6_ifindex;
@@ -715,6 +716,11 @@ void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg,
                        put_cmsg(msg, SOL_IPV6, IPV6_ORIGDSTADDR, sizeof(sin6), &sin6);
                }
        }
+       if (np->rxopt.bits.recvfragsize && opt->frag_max_size) {
+               int val = opt->frag_max_size;
+
+               put_cmsg(msg, SOL_IPV6, IPV6_RECVFRAGSIZE, sizeof(val), &val);
+       }
 }
 
 void ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg,