aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ipv6_sockglue.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r--net/ipv6/ipv6_sockglue.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 4919a8e6063e..1c6ce3119ff8 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -1212,6 +1212,34 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
1212 val = np->sndflow; 1212 val = np->sndflow;
1213 break; 1213 break;
1214 1214
1215 case IPV6_FLOWLABEL_MGR:
1216 {
1217 struct in6_flowlabel_req freq;
1218
1219 if (len < sizeof(freq))
1220 return -EINVAL;
1221
1222 if (copy_from_user(&freq, optval, sizeof(freq)))
1223 return -EFAULT;
1224
1225 if (freq.flr_action != IPV6_FL_A_GET)
1226 return -EINVAL;
1227
1228 len = sizeof(freq);
1229 memset(&freq, 0, sizeof(freq));
1230
1231 val = ipv6_flowlabel_opt_get(sk, &freq);
1232 if (val < 0)
1233 return val;
1234
1235 if (put_user(len, optlen))
1236 return -EFAULT;
1237 if (copy_to_user(optval, &freq, len))
1238 return -EFAULT;
1239
1240 return 0;
1241 }
1242
1215 case IPV6_ADDR_PREFERENCES: 1243 case IPV6_ADDR_PREFERENCES:
1216 val = 0; 1244 val = 0;
1217 1245