claudio
c4532b7fec
Put the clearing of possible embedded scope in an __KAME__ block.
...
This code does not really need to be optional since for non embedded
scope link local addresses this is a NOP.
OK jca@
2021-01-17 13:40:59 +00:00
reyk
8d53af64ef
Handle carp(4) as HTYPE_ETHER.
...
This fixes "dhcrelay -i carpX" that used to work when dhcrelay didn't care.
Reported and tested by Kapetanakis Giannis bilias at edu.physics.uoc.gr
2017-07-07 17:25:09 +00:00
reyk
72bd338bb4
The unsigned result cannot be -1, turn it into a signed variable.
...
OK rzalamena@
2017-04-04 15:52:12 +00:00
rzalamena
962cae8e7a
Improve the interface and addresses discovery code and prepare to
...
receive IPv6 support.
ok reyk@
2017-03-15 14:31:49 +00:00
krw
d8cc3220c5
Eliminate pointless'%m' (a.k.a. hand rolled strerror()) by using fatal() and
...
log_warn(). Zap a couple of explicit 'syslog()' calls.
2017-02-13 22:49:38 +00:00
krw
4971ba0ea5
Adjust some long lines.
2017-02-13 22:05:35 +00:00
krw
88f6d33ef2
Do the strerror() elimination dance with a log_warnx() -> log_warn().
2017-02-13 21:57:31 +00:00
krw
986dbb4c4e
Switch from old errwarn.c logging to shiny new log.[ch].
...
ok benno@
2017-02-13 19:15:39 +00:00
rzalamena
e4b4972171
Implement support for layer 2 relaying and add further Relay Agent
...
Information (RFC 3046) options. While at there change the naming of the
remote destination parameters: instead of "server" call it "destination".
ok reyk@
2016-12-12 15:41:05 +00:00
rzalamena
fa3d4f89ea
Clean up function prototypes: use a single struct to hold all address
...
information instead of passing multiple different parameters. This also
prepares the dhcrelay code to receive new features, like: IPv6, layer 2
relaying.
ok jca@
2016-12-08 19:18:15 +00:00
rzalamena
a29cd94b79
Simplify get_interfaces function, make it return NULL if we didn't find
...
the interface and abort dhcrelay with a more friendly message when we
don't have an address configured in the interface.
ok jca@
2016-12-08 09:29:50 +00:00
rzalamena
ffc715d7c9
Rename function discover_interfaces into get_interface and change its
...
prototype to be more useful.
ok reyk@
2016-12-07 13:19:18 +00:00
guenther
579e3f2d03
Pull in <time.h> for one or more of gmtime, strftime, strptime, time,
...
timegm, and tzset
ok deraadt@
2016-08-27 01:26:22 +00:00
krw
f70ef60c9d
Eliminate #include inside *.h files and include only needed headers in
...
each *.c file.
Inspired by mention of header silliness by Edgar Pettijohn and mmcc@
on tech@.
2016-02-07 00:49:28 +00:00
reyk
4be048dca4
Add support for "DHCP-over-IPsec" by implementing RFC 3046 (DHCP Relay
...
Agent Information Option) and RFC 3456 (DHCP Configuration of IPsec
Tunnel Mode). This allows to configure various IPsec clients
dynamically via DHCP; dhcrelay needs to listen on enc0 and forward
requests to a DHCP server that supports RFC 3046, like I recently did
for dhcpd(8).
ok krw@
2009-09-03 11:56:49 +00:00
claudio
23ccc4305a
Sync with dhcpd. Do not use < 0 to check for failed syscalls use == -1
...
instead. OK henning@
2008-09-15 20:39:21 +00:00
deraadt
1ed98fdf61
use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg
2007-09-02 15:19:07 +00:00
stevesk
32f01720c6
warn() -> warning() to not overload with libc function; this has
...
previously been done to dhclient and dhcpd
2006-12-18 01:08:58 +00:00
david
fd9f780d5a
spelling fixes; ok jmc@ henning@
2004-09-21 04:07:03 +00:00
canacar
87cb66193f
handle interface removals in the poll loop. ok henning@
2004-06-22 01:10:49 +00:00
deraadt
7877d30c5c
remove unused stuff; henning ok
2004-05-04 21:23:10 +00:00
deraadt
cb13f2148c
more shrinking; ok henning
2004-04-20 04:19:00 +00:00
henning
48be18b437
initial cut at split out dhcrelay, whacked from usr.sbin/dhcp/ and sbin/dhclient
2004-04-12 21:10:28 +00:00