Currently, when an application requests a lease for a flowlabel via the
IPV6_FLOWLABEL_MGR socket option, no error is returned if an invalid type
of destination address is supplied as part of the request, leading to a
silent failure. This patch ensures that EINVAL is returned to the
application in this case.
Please apply.
Signed-off-by: James Morris <[EMAIL PROTECTED]>
---
net/ipv6/ip6_flowlabel.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -purN -X dontdiff linux-2.6.p/net/ipv6/ip6_flowlabel.c
linux-2.6.w/net/ipv6/ip6_flowlabel.c
--- linux-2.6.p/net/ipv6/ip6_flowlabel.c 2006-10-30 18:30:34.000000000
-0500
+++ linux-2.6.w/net/ipv6/ip6_flowlabel.c 2006-10-30 18:57:33.000000000
-0500
@@ -330,8 +330,10 @@ fl_create(struct in6_flowlabel_req *freq
fl->share = freq->flr_share;
addr_type = ipv6_addr_type(&freq->flr_dst);
if ((addr_type&IPV6_ADDR_MAPPED)
- || addr_type == IPV6_ADDR_ANY)
+ || addr_type == IPV6_ADDR_ANY) {
+ err = -EINVAL;
goto done;
+ }
ipv6_addr_copy(&fl->dst, &freq->flr_dst);
atomic_set(&fl->users, 1);
switch (fl->share) {
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html