diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-04 17:13:03 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-04 17:16:28 +0200 |
commit | 1db09bdc2914d767633fe1b9981ca33bb6076203 (patch) | |
tree | 2faf823d0685d8adbf25db1e87f578174e0ac228 | |
parent | version: bump snapshot (diff) | |
download | wireguard-monolithic-historical-1db09bdc2914d767633fe1b9981ca33bb6076203.tar.xz wireguard-monolithic-historical-1db09bdc2914d767633fe1b9981ca33bb6076203.zip |
device: print daddr not saddr in missing peer error
-rw-r--r-- | src/device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index df9189b..89944ca 100644 --- a/src/device.c +++ b/src/device.c @@ -132,7 +132,10 @@ static netdev_tx_t xmit(struct sk_buff *skb, struct net_device *dev) peer = allowedips_lookup_dst(&wg->peer_allowedips, skb); if (unlikely(!peer)) { ret = -ENOKEY; - net_dbg_skb_ratelimited("%s: No peer is configured for %pISc\n", dev->name, skb); + if (skb->protocol == htons(ETH_P_IP)) + net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI4\n", dev->name, &ip_hdr(skb)->daddr); + else if (skb->protocol == htons(ETH_P_IPV6)) + net_dbg_ratelimited("%s: No peer has allowed IPs matching %pI6\n", dev->name, &ipv6_hdr(skb)->daddr); goto err; } |