OpenBSD CVS

CVS log for src/usr.sbin/rad/parse.y


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.23 / (download) - annotate - [select for diffs], Fri May 17 06:50:14 2024 UTC (3 weeks, 1 day ago) by florian
Branch: MAIN
CVS Tags: HEAD
Changes since 1.22: +7 -1 lines
Diff to previous 1.22 (colored)

Send source link-layer address option in router advertisements.

With this, hosts immediately learn the layer 2 (i.e. ethernet mac)
address of their default router and don't need to do another round
trip.

It also turns out that apple devices (macOS & iOS) install the default
route as what they call "interface scoped" if a DNS option is present
and the source link-layer address option is absent. This effectively
makes the default route unusable.

Problem with fruit devices tracked down & diff by Ryan Vogt (rvogt.ca
AT gmail), thanks!

OK sthen, bket

Revision 1.22 / (download) - annotate - [select for diffs], Tue Apr 23 22:11:59 2024 UTC (6 weeks, 3 days ago) by florian
Branch: MAIN
Changes since 1.21: +17 -3 lines
Diff to previous 1.21 (colored)

Implement RFC 4191 default router preference.

OK phessler, kn

(Committing from a ferry somewhere on the English channel. Sadly the
free WiFi does not provide IPv6.)

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 15 13:27:45 2022 UTC (19 months, 3 weeks ago) by florian
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
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Do not throw away errno.

Pointed out in the pref64 code, which was copied from here, by kn.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Oct 15 13:26:15 2022 UTC (19 months, 3 weeks ago) by florian
Branch: MAIN
Changes since 1.19: +115 -2 lines
Diff to previous 1.19 (colored)

Implement RFC 8781 PREF64 router advertisement option.

With this clients can learn the presence and used prefix for Network
Address and Protocol Translation between IPv6 and IPv4 (NAT64).

Apparently there is support in mobile devices as well as in macOS.

This option, together with the the dhcp "IPv6-only preferred"
option (108) enables the Customer-side transLATor (CLAT) on macOS so
IPv4 literals can be used in IPv6-only networks.

Input & OK kn

Revision 1.19 / (download) - annotate - [select for diffs], Fri Oct 15 15:01:28 2021 UTC (2 years, 7 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.18: +8 -8 lines
Diff to previous 1.18 (colored)

Don't declare variables as "unsigned char *" that are passed to
functions that take "char *" arguments.  Where such chars are
assigned to int or passed to ctype functions, explicitly cast them
to unsigned char.

For OpenBSD's clang, -Wpointer-sign has been disabled by default,
but when the parse.y code was built elsewhere, the compiler would
complain.

With help from millert@
ok benno@ deraadt@

Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 1 08:05:40 2021 UTC (3 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

off by one in bounds test
ok florian@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jan 19 17:38:41 2021 UTC (3 years, 4 months ago) by florian
Branch: MAIN
Changes since 1.16: +18 -7 lines
Diff to previous 1.16 (colored)

Get rid of inet_net_pton and inet_net_ntop.

This is not an api that seems to have caught on (especially the
AF_INET6 variant), maybe we can get rid of it entirely.
It is not difficult to hand-roll the AF_INET6 variant.
OK tb

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 30 17:47:48 2020 UTC (4 years, 2 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Use defines instead of raw numbers for intervals specified by RFC
4861. No binary change.
While here consistently use #define<tab> instead of #define<space>.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Oct 18 06:03:25 2019 UTC (4 years, 7 months ago) by otto
Branch: MAIN
Changes since 1.14: +3 -1 lines
Diff to previous 1.14 (colored)

Plug mem leak in error path; ok florian@ who also spotted the rad case

Revision 1.14 / (download) - annotate - [select for diffs], Fri May 10 01:29:31 2019 UTC (5 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.13: +1 -2 lines
Diff to previous 1.13 (colored)

Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>

ok krw@, jsg@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Mar 1 16:35:17 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

trailing whitespace

Revision 1.12 / (download) - annotate - [select for diffs], Wed Feb 13 22:57:08 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction...
Almost any cast to (unsigned) is a bug.
ok millert tb benno

Revision 1.11 / (download) - annotate - [select for diffs], Thu Nov 1 00:18:44 2018 UTC (5 years, 7 months ago) by sashan
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

- odd condition/test in PF lexer
  (and other lexers too)

This commit rectifies earlier change:

    in the lex... even inside quotes, a \ followed by space or tab should
    expand to space or tab, and a \ followed by newline should be ignored
    (as a line continuation).  compatible with the needs of hoststated
    (which has the most strict quoted string requirements), and ifstated
    (where one commonly does line continuations in strings).

OK deraadt@, OK millert@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Sep 16 18:58:36 2018 UTC (5 years, 8 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored)

If a prefix without length was specifed in the config file, then
128 was used.  This does not make much sense for rad(8).  Change
the default prefixlen to 64.
OK florian@

Revision 1.9 / (download) - annotate - [select for diffs], Fri Sep 7 07:35:31 2018 UTC (5 years, 9 months ago) by miko
Branch: MAIN
Changes since 1.8: +4 -9 lines
Diff to previous 1.8 (colored)

replace malloc()+strlcpy() with strndup() in cmdline_symset().

"looks good" gilles@ halex@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Aug 3 13:14:46 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.7: +53 -12 lines
Diff to previous 1.7 (colored)

Move dns settings to global options so that they don't need to be
repeated in every interface block - they can still be overwritten
on a per interface basis.
Pointed out by, tweaks & OK sthen

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 20 20:34:18 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Fix mem leaks on config reload:
- always free struct ra_iface_conf with free_ra_iface_conf()
- free_ra_iface_conf() needs to free the recently added
nameserver and search list

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 20 17:55:09 2018 UTC (5 years, 10 months ago) by bket
Branch: MAIN
Changes since 1.5: +6 -2 lines
Diff to previous 1.5 (colored)

Introduce MTU option.

The MTU option is used in Router Advertisement messages to ensure that
all nodes on a link use the same MTU value in those cases where the link
MTU is not well known.

Feedback (thank you!) and OK from florian@

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 20 17:48:58 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

We need to track the auto prefix in ra_prefix_conf otherwise we can't
configure its options. Trying so lead to a crash.
Found the hard way by & OK sthen

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jul 20 13:17:02 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.3: +13 -13 lines
Diff to previous 1.3 (colored)

Rename "resolver" to "nameserver" in the configuration file.

resolv.conf(5) and dhclient(8) are using the term nameserver for many
years, there is no good reason to be different here.

Pointed out by deraadt

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jul 15 09:28:21 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.2: +94 -2 lines
Diff to previous 1.2 (colored)

Implement RFC 8106: IPv6 Router Advertisement Options for DNS
Configuration.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jul 11 08:47:03 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

there is nothing secret about rad.conf

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 10 16:39:54 2018 UTC (5 years, 11 months ago) by florian
Branch: MAIN

Import rad(8).
It's a Router Advertisement Daemon written using the standard 3
process privsep pattern and a parse.y based config file.
Commit early to continue work in tree.
OK jca
"it's totally rad" phessler@
"usr.sbin never runs out of space" deraadt@

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.