summaryrefslogtreecommitdiffhomepage
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
commit3cc06eb2b2219af5720134ee2dea53afca6549ca (patch)
treef7329f1cce79f75672a5f81470e7740944f5cbba
parentf530808906141502dc8944bca5b822970b4dead7 (diff)
device: better debug message for unroutable packets
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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;
}