summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcrelay/dispatch.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Put the clearing of possible embedded scope in an __KAME__ block.claudio2021-01-171-2/+7
| | | | | | This code does not really need to be optional since for non embedded scope link local addresses this is a NOP. OK jca@
* Handle carp(4) as HTYPE_ETHER.reyk2017-07-071-6/+7
| | | | | | 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
* The unsigned result cannot be -1, turn it into a signed variable.reyk2017-04-041-2/+2
| | | | OK rzalamena@
* Improve the interface and addresses discovery code and prepare torzalamena2017-03-151-50/+130
| | | | | | receive IPv6 support. ok reyk@
* Eliminate pointless'%m' (a.k.a. hand rolled strerror()) by using fatal() andkrw2017-02-131-6/+4
| | | | log_warn(). Zap a couple of explicit 'syslog()' calls.
* Adjust some long lines.krw2017-02-131-2/+2
|
* Do the strerror() elimination dance with a log_warnx() -> log_warn().krw2017-02-131-3/+2
|
* Switch from old errwarn.c logging to shiny new log.[ch].krw2017-02-131-11/+12
| | | | ok benno@
* Implement support for layer 2 relaying and add further Relay Agentrzalamena2016-12-121-3/+4
| | | | | | | Information (RFC 3046) options. While at there change the naming of the remote destination parameters: instead of "server" call it "destination". ok reyk@
* Clean up function prototypes: use a single struct to hold all addressrzalamena2016-12-081-15/+8
| | | | | | | | information instead of passing multiple different parameters. This also prepares the dhcrelay code to receive new features, like: IPv6, layer 2 relaying. ok jca@
* Simplify get_interfaces function, make it return NULL if we didn't findrzalamena2016-12-081-22/+21
| | | | | | | the interface and abort dhcrelay with a more friendly message when we don't have an address configured in the interface. ok jca@
* Rename function discover_interfaces into get_interface and change itsrzalamena2016-12-071-15/+20
| | | | | | prototype to be more useful. ok reyk@
* Pull in <time.h> for one or more of gmtime, strftime, strptime, time,guenther2016-08-271-1/+2
| | | | | | timegm, and tzset ok deraadt@
* Eliminate #include inside *.h files and include only needed headers inkrw2016-02-071-3/+16
| | | | | | | each *.c file. Inspired by mention of header silliness by Edgar Pettijohn and mmcc@ on tech@.
* Add support for "DHCP-over-IPsec" by implementing RFC 3046 (DHCP Relayreyk2009-09-031-2/+9
| | | | | | | | | | 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@
* Sync with dhcpd. Do not use < 0 to check for failed syscalls use == -1claudio2008-09-151-3/+3
| | | | instead. OK henning@
* use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt2007-09-021-2/+2
|
* warn() -> warning() to not overload with libc function; this hasstevesk2006-12-181-3/+3
| | | | previously been done to dhclient and dhcpd
* spelling fixes; ok jmc@ henning@david2004-09-211-2/+2
|
* handle interface removals in the poll loop. ok henning@canacar2004-06-221-2/+2
|
* remove unused stuff; henning okderaadt2004-05-041-118/+1
|
* more shrinking; ok henningderaadt2004-04-201-12/+9
|
* initial cut at split out dhcrelay, whacked from usr.sbin/dhcp/ and sbin/dhclienthenning2004-04-121-0/+496