OpenBSD CVS

CVS log for src/usr.sbin/dhcrelay/dispatch.c


[BACK] Up to [local] / src / usr.sbin / dhcrelay

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.23 / (download) - annotate - [select for diffs], Sun Jan 17 13:40:59 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.22: +7 -2 lines
Diff to previous 1.22 (colored)

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@

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jul 7 17:25:09 2017 UTC (6 years, 11 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.21: +7 -6 lines
Diff to previous 1.21 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 4 15:52:12 2017 UTC (7 years, 2 months ago) by reyk
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

The unsigned result cannot be -1, turn it into a signed variable.

OK rzalamena@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Mar 15 14:31:49 2017 UTC (7 years, 2 months ago) by rzalamena
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.19: +130 -50 lines
Diff to previous 1.19 (colored)

Improve the interface and addresses discovery code and prepare to
receive IPv6 support.

ok reyk@

Revision 1.19 / (download) - annotate - [select for diffs], Mon Feb 13 22:49:38 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.18: +4 -6 lines
Diff to previous 1.18 (colored)

Eliminate pointless'%m' (a.k.a. hand rolled strerror()) by using fatal() and
log_warn(). Zap a couple of explicit 'syslog()' calls.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Feb 13 22:05:35 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Adjust some long lines.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Feb 13 21:57:31 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.16: +2 -3 lines
Diff to previous 1.16 (colored)

Do the strerror() elimination dance with a log_warnx() -> log_warn().

Revision 1.16 / (download) - annotate - [select for diffs], Mon Feb 13 19:15:39 2017 UTC (7 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.15: +12 -11 lines
Diff to previous 1.15 (colored)

Switch from old errwarn.c logging to shiny new log.[ch].

ok benno@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Dec 12 15:41:05 2016 UTC (7 years, 5 months ago) by rzalamena
Branch: MAIN
Changes since 1.14: +4 -3 lines
Diff to previous 1.14 (colored)

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@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 8 19:18:15 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.13: +8 -15 lines
Diff to previous 1.13 (colored)

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@

Revision 1.13 / (download) - annotate - [select for diffs], Thu Dec 8 09:29:50 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.12: +20 -21 lines
Diff to previous 1.12 (colored)

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@

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 7 13:19:18 2016 UTC (7 years, 6 months ago) by rzalamena
Branch: MAIN
Changes since 1.11: +20 -15 lines
Diff to previous 1.11 (colored)

Rename function discover_interfaces into get_interface and change its
prototype to be more useful.

ok reyk@

Revision 1.11 / (download) - annotate - [select for diffs], Sat Aug 27 01:26:22 2016 UTC (7 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

Pull in <time.h> for one or more of gmtime, strftime, strptime, time,
timegm, and tzset

ok deraadt@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Feb 7 00:49:28 2016 UTC (8 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.9: +16 -3 lines
Diff to previous 1.9 (colored)

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@.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 3 11:56:49 2009 UTC (14 years, 9 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.8: +8 -1 lines
Diff to previous 1.8 (colored)

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@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Sep 15 20:39:21 2008 UTC (15 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Sync with dhcpd. Do not use < 0 to check for failed syscalls use == -1
instead. OK henning@

Revision 1.7 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:38 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 18 01:08:58 2006 UTC (17 years, 5 months ago) by stevesk
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

warn() -> warning() to not overload with libc function; this has
previously been done to dhclient and dhcpd

Revision 1.5 / (download) - annotate - [select for diffs], Tue Sep 21 04:07:04 2004 UTC (19 years, 8 months ago) by david
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

spelling fixes; ok jmc@ henning@

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jun 22 01:10:49 2004 UTC (19 years, 11 months ago) by canacar
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

handle interface removals in the poll loop. ok henning@

Revision 1.3 / (download) - annotate - [select for diffs], Tue May 4 21:23:10 2004 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.2: +1 -118 lines
Diff to previous 1.2 (colored)

remove unused stuff; henning ok

Revision 1.2 / (download) - annotate - [select for diffs], Tue Apr 20 04:19:00 2004 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.1: +9 -12 lines
Diff to previous 1.1 (colored)

more shrinking; ok henning

Revision 1.1 / (download) - annotate - [select for diffs], Mon Apr 12 21:10:28 2004 UTC (20 years, 2 months ago) by henning
Branch: MAIN

initial cut at split out dhcrelay, whacked from usr.sbin/dhcp/ and sbin/dhclient

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.