summaryrefslogtreecommitdiffstatshomepage
path: root/src/device.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-10-22 17:12:30 +0900
committerJason A. Donenfeld <Jason@zx2c4.com>2016-10-22 17:12:30 +0900
commitbac10706747bc3112498e5c5c8ec53c1a44c4019 (patch)
treec934a32bae2019c4d93be844edc5dce424338b24 /src/device.c
parentcompat: support PaX constify plugin (diff)
downloadwireguard-monolithic-historical-bac10706747bc3112498e5c5c8ec53c1a44c4019.tar.xz
wireguard-monolithic-historical-bac10706747bc3112498e5c5c8ec53c1a44c4019.zip
device: better debug message for unroutable packets
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 584a8f0..d364154 100644
--- a/src/device.c
+++ b/src/device.c
@@ -112,7 +112,11 @@ static netdev_tx_t xmit(struct sk_buff *skb, struct net_device *dev)
peer = routing_table_lookup_dst(&wg->peer_routing_table, skb);
if (unlikely(!peer)) {
- net_dbg_ratelimited("No peer is configured for outgoing packet address\n");
+#ifdef DEBUG
+ struct sockaddr_storage addr;
+ socket_addr_from_skb(&addr, skb);
+ net_dbg_ratelimited("No peer is configured for %pISc\n", &addr);
+#endif
skb_unsendable(skb, dev);
return -ENOKEY;
}