Thread (1 message) 1 message, 1 author, 2015-03-04

Re: [PATCH v2] net: ping: Return EAFNOSUPPORT when appropriate.

From: Erik Kline <hidden>
Date: 2015-03-04 08:58:46

quoted hunk
@@ -305,6 +308,11 @@ static int ping_check_bind_addr(struct sock *sk, struct inet_sock *isk,
                if (addr_len < sizeof(*addr))
                        return -EINVAL;

+               if (addr->sin_family != AF_INET &&
+                   !(addr->sin_family == AF_UNSPEC &&
+                     addr->sin_addr.s_addr == htonl(INADDR_ANY)))
+                       return -EAFNOSUPPORT;
+
Aside: I would be all in favor of deprecating this legacy "bind to \0
and gee whiz it just works (for IPv4)" kind of behaviour.  But
anyway...

Acked-by: Erik Kline <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help