aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/socket.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-12 03:45:05 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-17 19:26:07 +0200
commitd4f3c641cddabba35be5444afd9cd045cfc75b5d (patch)
treeb803a7188315be21f600c1e4776a5d3852c5a501 /src/socket.c
parentsend: improve dead packet control flow (diff)
downloadwireguard-monolithic-historical-d4f3c641cddabba35be5444afd9cd045cfc75b5d.tar.xz
wireguard-monolithic-historical-d4f3c641cddabba35be5444afd9cd045cfc75b5d.zip
socket: eliminate dead code
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/socket.c b/src/socket.c
index e3fd053..8d0e9ca 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -199,8 +199,7 @@ int socket_send_buffer_as_reply_to_skb(struct wireguard_device *wg, struct sk_bu
ret = send4(wg, skb, &endpoint, 0, NULL);
else if (endpoint.addr.sa_family == AF_INET6)
ret = send6(wg, skb, &endpoint, 0, NULL);
- else
- ret = -EAFNOSUPPORT;
+ /* No other possibilities if the endpoint is valid, which it is, as we checked above. */
return ret;
}