summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcrelay/dhcrelay.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@cvs.openbsd.org>2016-12-13 17:40:42 +0000
committerRafael Zalamena <rzalamena@cvs.openbsd.org>2016-12-13 17:40:42 +0000
commit60959d5344e6b64ea4c604aaade418b72a7da2c0 (patch)
tree7b9e2195fa5d809d3d98ac067fe23710479d9153 /usr.sbin/dhcrelay/dhcrelay.c
parent14a0584266526fc8f6df3d7eb214641974b4dc9a (diff)
Unbreak the dhcrelay(8) support to run on enc(4) interfaces.
ok reyk@
Diffstat (limited to 'usr.sbin/dhcrelay/dhcrelay.c')
-rw-r--r--usr.sbin/dhcrelay/dhcrelay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/dhcrelay/dhcrelay.c b/usr.sbin/dhcrelay/dhcrelay.c
index 34c3e13f04a..edf372b97e7 100644
--- a/usr.sbin/dhcrelay/dhcrelay.c
+++ b/usr.sbin/dhcrelay/dhcrelay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcrelay.c,v 1.53 2016/12/13 15:28:19 rzalamena Exp $ */
+/* $OpenBSD: dhcrelay.c,v 1.54 2016/12/13 17:40:41 rzalamena Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
@@ -224,7 +224,8 @@ main(int argc, char *argv[])
error("no interface given");
/* We need an address for running layer 3 mode. */
if (drm == DRM_LAYER3 &&
- interfaces->primary_address.s_addr == 0)
+ (interfaces->hw_address.htype != HTYPE_IPSEC_TUNNEL &&
+ interfaces->primary_address.s_addr == 0))
error("interface '%s' does not have an address",
interfaces->name);