diff options
author | Florent Fourcot <florent.fourcot@enst-bretagne.fr> | 2014-01-17 17:15:04 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-20 02:12:31 +0100 |
commit | 46e5f401762c639e38eea350d335c0f54ec2442f (patch) | |
tree | 76f12d6f2425d05a13f09e27cd66c981b29312f4 /net/ipv6/ipv6_sockglue.c | |
parent | ipv6: add the IPV6_FL_F_REFLECT flag to IPV6_FL_A_GET (diff) | |
download | linux-46e5f401762c639e38eea350d335c0f54ec2442f.tar.xz linux-46e5f401762c639e38eea350d335c0f54ec2442f.zip |
ipv6: add a flag to get the flow label used remotly
This information is already available via IPV6_FLOWINFO
of IPV6_2292PKTOPTIONS, and them a filtering to get the flow label
information. But it is probably logical and easier for users to add this
here, and to control both sent/received flow label values with the
IPV6_FLOWLABEL_MGR option.
Signed-off-by: Florent Fourcot <florent.fourcot@enst-bretagne.fr>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 2855b00ed49d..7024a874e901 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -1221,6 +1221,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, case IPV6_FLOWLABEL_MGR: { struct in6_flowlabel_req freq; + int flags; if (len < sizeof(freq)) return -EINVAL; @@ -1232,9 +1233,11 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, 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; |