OpenBSD CVS

CVS log for src/sbin/slaacd/slaacd.c


[BACK] Up to [local] / src / sbin / slaacd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.69 / (download) - annotate - [select for diffs], Sun Apr 21 17:33:05 2024 UTC (5 weeks, 6 days ago) by florian
Branch: MAIN
CVS Tags: HEAD
Changes since 1.68: +3 -1 lines
Diff to previous 1.68 (colored)

Pass advertising router to the kernel.

We are using the ifra_dstaddr for this because it will always be
unused with autoconf addresses since they can't be used on P2P links.

OK bluhm

Revision 1.68 / (download) - annotate - [select for diffs], Wed Feb 15 13:47:00 2023 UTC (15 months, 2 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.67: +2 -2 lines
Diff to previous 1.67 (colored)

Use correct order of arguments for shutdown(2).

Luckily routesock would never be <= 2 so shutdown would always failing
with EINVAL and not shutting down random other sockets.
The kernel was just uselessly piling up route messages that we were
never reading.

This mistake first showed up in slaacd(8) and then was copied to the
other daemons.

Reported & fixed by Josiah Frentsos (jfrent at tilde.team), thanks!
OK kn

Revision 1.67 / (download) - annotate - [select for diffs], Sun Nov 27 15:19:38 2022 UTC (18 months ago) by kn
Branch: MAIN
Changes since 1.66: +6 -3 lines
Diff to previous 1.66 (colored)

Provide more accurate lock error message

When started manuall from single-user mode (/ still read-only), the current
error is misleading:
	# slaacd -dv
	slaacd: already running

The lock was specifically added to prevent multiple instances in the
installer, which discards the error message entirely anyway.

Retain the useful EAGAIN/"already running" message, but otherwise print the
real error reason:
	# slaacd -dv
	slaacd: /dev/slaacd.lock: Read-only file system

Feedback OK deraadt millert

Revision 1.66 / (download) - annotate - [select for diffs], Thu Sep 15 07:59:59 2022 UTC (20 months, 2 weeks ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.65: +3 -2 lines
Diff to previous 1.65 (colored)

Ignore error when we try to delete an address that's already gone.

This will happen when an address expires because the vltime drops to
zero. The kernel then deletes the address and slaacd tries to do so,
too. The correct fix is to track in slaacd that the kernel already
deleted the address for us, but that's too much work shortly before a
release so just hide the ugly warning for now, it's harmless.
Problem reported by semarie some time ago.
OK deraadt, benno

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jul 12 16:54:59 2022 UTC (22 months, 3 weeks ago) by florian
Branch: MAIN
Changes since 1.64: +1 -11 lines
Diff to previous 1.64 (colored)

Rewrite state machine in the style of dhcpleased(8).

It is less cluttered, easier to reason about and fixes some bugs in
passing that would have been difficult in the old state machine.

Stale IPv6 addresses, default routes and nameservers are now correctly
removed when moving from one IPv6 enabled network to another IPv6
enabled network.
Default routes and nameservers correctly expire when they are not
refreshed and nameservers are updated when router advertisements
change the nameserver option.

Testing & input caspar@

Putting it in now to get wider testing and shake out bugs, discussed
with deraadt@ at r2k22.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Aug 24 14:56:06 2021 UTC (2 years, 9 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.63: +3 -2 lines
Diff to previous 1.63 (colored)

When an interface disappears, e.g. when a usb dongle gets unplugged,
we get a RTM_IFANNOUNCE message not a RTM_IFINFO message.
Handle this message to not accumulate "unknown" interfaces.
While here fix a bug where we would remove an interface only in the
engine process but not in the frontend when an interfaces gets
unplugged while we process a RTM_IFINFO message for it.
OK benno

Revision 1.63 / (download) - annotate - [select for diffs], Tue Jul 27 08:15:11 2021 UTC (2 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

The SIOCAIFADDR_IN6 ioctl could lose a race against another process
configuring the same IP.
I forgot to fix slaacd after fixing the same problem in dhcpleased.
Pointed out by afresh1

Revision 1.62 / (download) - annotate - [select for diffs], Thu Jul 22 15:32:51 2021 UTC (2 years, 10 months ago) by kn
Branch: MAIN
Changes since 1.61: +3 -11 lines
Diff to previous 1.61 (colored)

Send rDNS proposals on ramdisks

Otherwise resolvd(8) will never learn nameservers and update
/etc/resolv.conf with IPv6 resolvers.

At the moment IPv6 only installations always prompt for nameservers
anyway, but that is its own bug and will be fixed soon.

This enables the upcoming fix to detect learned nameservers in the
first place.

Feedback OK florian

Revision 1.61 / (download) - annotate - [select for diffs], Wed Jul 21 03:53:50 2021 UTC (2 years, 10 months ago) by kn
Branch: MAIN
Changes since 1.60: +6 -2 lines
Diff to previous 1.60 (colored)

Use exclusive lock under /dev/, silence expected errors in installer

resolvd(8), slaacd(8) and dhcpleased(8) are different from other daemons
in that there must only be a single instance.

resolvd already does this, adjust slaacd and dhcpleased accordingly while
moving the lockfile paths under /dev/ such that they work early on boot and
don't run into races should /var be (un)mounted between daemon starts.

Locking is especially required in the installer where all three daemons are
started every time the "(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? "
prompt is entered, i.e. restarting installation or dropping into a shell
and back into the prompt again would start multiple instances.

To avoid expected lockfile error messages in between installer prompts,
discard standard error when starting the autoconf daemons;  none of them
has other potential failure cases in installer mode before daemon(3)izing.

Input sthen deraadt
OK deraadt

Revision 1.60 / (download) - annotate - [select for diffs], Sat May 1 11:53:24 2021 UTC (3 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.59: +4 -3 lines
Diff to previous 1.59 (colored)

In singel user mode / is mounted ro. Just warn if we can't create
the control socket instead of fatal().
OK deraadt

Revision 1.59 / (download) - annotate - [select for diffs], Sun Mar 21 18:25:24 2021 UTC (3 years, 2 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

Use new terminology of RFC 8981 and (mechanically) replace "privacy"
with "temporary".

Revision 1.58 / (download) - annotate - [select for diffs], Sun Mar 7 10:31:20 2021 UTC (3 years, 2 months ago) by florian
Branch: MAIN
Changes since 1.57: +1 -12 lines
Diff to previous 1.57 (colored)

Fold get_lladdr into update_iface, now the only caller.
This allows us to pass the link state over to engine here instead of
in update_addr which is not available in small.
This gets us more in line dhcpleased.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Feb 27 10:28:12 2021 UTC (3 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Path #defines are traditionally prefixed with _PATH.
pointed out by deraadt

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 19 16:49:56 2021 UTC (3 years, 4 months ago) by florian
Branch: MAIN
Changes since 1.55: +6 -6 lines
Diff to previous 1.55 (colored)

Make imsg event structs static to fix -fno-common.
Follows claudio's lead in ospfd et al.
Problem reported by mortimer.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jan 19 16:48:20 2021 UTC (3 years, 4 months ago) by florian
Branch: MAIN
Changes since 1.54: +10 -6 lines
Diff to previous 1.54 (colored)

No need for a global slaacd_process; unbreaks -fno-common.
Problem reported by mortimer

Revision 1.54 / (download) - annotate - [select for diffs], Sun Jan 17 15:39:17 2021 UTC (3 years, 4 months ago) by florian
Branch: MAIN
Changes since 1.53: +3 -1 lines
Diff to previous 1.53 (colored)

Mark up locations of KAME hack with #ifdef __KAME__ so that we can
find it again if and when we no longer need it. No object change.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Dec 1 18:08:53 2020 UTC (3 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Sync get_ifrdomain() to rad(8) version by removing a useles (void)
cast in front of a strlcpy(3).
tb@ had pointed out that the use in rad(8) was not consistent.
I consider the void cast a useless annotation, either the strl*
functions must have the canonical trucation check or it must be
obvious that truncation cannot happen or is not a problem.
While at it remove a bunch more casts that snuck in over time.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Sep 14 09:40:28 2020 UTC (3 years, 8 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.51: +7 -3 lines
Diff to previous 1.51 (colored)

We might race against removal of an rdomain we just want to handle.
Make setsockopt non-fatal in this case and just ignore the request.
Spotted in a diff by reyk for rad(8); discussed with claudio

Revision 1.51 / (download) - annotate - [select for diffs], Mon Sep 14 09:07:05 2020 UTC (3 years, 8 months ago) by florian
Branch: MAIN
Changes since 1.50: +52 -55 lines
Diff to previous 1.50 (colored)

Let slaacd handle all rdomains in a single daemon.
Suggested by claudio and matthieu
Testing matthieu
Putting it in now to get enough testing before release so that there
is enough time to back it out, suggested by deraadt

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jul 3 17:42:50 2020 UTC (3 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Rename IN6_IFF_PRIVACY to IN6_IFF_TEMPORARY.
This is the name the other BSDs use for this, there is no reason to
be different, the IPv6 RFCs call these addresses temporary, and some
software in ports wants to use this as well.
Most recently pointed out for firefox by landry.
OK claudio, sthen

Revision 1.49 / (download) - annotate - [select for diffs], Mon May 25 16:52:15 2020 UTC (4 years ago) by florian
Branch: MAIN
Changes since 1.48: +1 -3 lines
Diff to previous 1.48 (colored)

Do not log "startup" to syslog.

slaacd and unwind start very early in the boot process and syslog is
not fully available yet so these messages tend to get lost.
But they are also not particularly useful.
Prompted by a report by Jason Mader on bugs@
OK deraadt, claudio, bluhm

Note that this code has been copied around to all our privsep daemons
and also lives in usr.sbin. Leave it alone there because multiple people
said they find it useful for those daemons.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Apr 16 05:28:30 2020 UTC (4 years, 1 month ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.47: +9 -3 lines
Diff to previous 1.47 (colored)

Make the control socket name depend on the routing domain we are in.
That way, when slaacd gets started in a different rdomain with
route exec things just work, no need to provide an alternative
control socket.
Pointed out by claudio
Original diff by benno, but I like my bikeshed purple.
OK benno, claudio

Revision 1.47 / (download) - annotate - [select for diffs], Tue Apr 14 06:44:59 2020 UTC (4 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

When slaacd is run in a routing domain (rdomain) other than the default (0) it
sends router solicitations and receives router advertisements only
from interfaces that are in its own rdomain.
It also only sees interfaces arriving, or departing in its own
rdomain.
However, for the default route there is rdomain cross-talk because
slaacd configures the default route in the default rdomain (and
fails).
Make slaacd honour the rdomain it's running in as well.
OK denis, phessler, benno

Revision 1.46 / (download) - annotate - [select for diffs], Sun Dec 15 16:34:08 2019 UTC (4 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

semarie diagnosed a what appeared to be a 'large backwards memcpy' of an
ipv6 address, but was actually oversize (a large union).  correct access
to the right subfield.
ok florian semarie

Revision 1.45 / (download) - annotate - [select for diffs], Sat Nov 23 08:17:39 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.44: +10 -1 lines
Diff to previous 1.44 (colored)

    On startup withdraw all proposals for all interfaces by sending an
    empty proposal with if_index 0.

    It is possible that the set of autoconf interfaces changed between a
    stop -> start transition and slaacd would never withdraw nameservers
    for interfaces that had the autoconf flag previously but no longer
    after the restart.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Nov 22 15:30:00 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.43: +9 -13 lines
Diff to previous 1.43 (colored)

    Merge DNS proposals coming from the same interface.
    That way we no longer need to handle withdraws in unwind. A new
    proposal from a daemon on an interface is always a replacement.
    If nameservers expire or an interface goes away we sent an empty list
    of nameservers.
    pestering^Wprodding deraadt

Revision 1.43 / (download) - annotate - [select for diffs], Thu Nov 21 03:55:22 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Configure the default route with RTP_NONE so that the kernel assigns
different priorities for wired vs. wireless interfaces for us.
Gleaned from dhclient.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Nov 11 05:48:46 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.41: +69 -2 lines
Diff to previous 1.41 (colored)

    Send DNS proposals on route socket when new nameservers are learned
    from router advertisements.
    unwind(8) can solicit DNS proposals by sending an empty RTM_PROPOSAL
    message with priority RTP_PROPOSAL_SOLICIT.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 7 08:45:31 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.40: +6 -100 lines
Diff to previous 1.40 (colored)

    Remove half way implemented address and default route proposals.
    This never worked out and is getting in the way of DNS proposals which
    are coming next.
    No (intended) functional change.
    Input & OK tohe

Revision 1.40 / (download) - annotate - [select for diffs], Tue Nov 5 15:43:18 2019 UTC (4 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

trailing whitespace

Revision 1.39 / (download) - annotate - [select for diffs], Fri Aug 30 17:25:37 2019 UTC (4 years, 9 months ago) by pamela
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.38: +36 -1 lines
Diff to previous 1.38 (colored)

Remove configured IPv6 addresses remaining when slaacd(8) detects a
link-state change and no new router advertisement is obtained (in accordance
with RFC 6059).

This should improve IPv6 -> legacy-IP-only transitions, preventing
applications from believing IPv6 connectivity is available when it is
not, potentially resulting in long timeouts.

suggestion, input and OK florian@ phessler@

Revision 1.38 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:46 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +10 -10 lines
Diff to previous 1.37 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Mar 31 03:36:18 2019 UTC (5 years, 2 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.36: +6 -2 lines
Diff to previous 1.36 (colored)

Avoid calling dup2(oldd, newd) when oldd == newd.  In that case the
descriptor keeps CLOEXEC flag then it will be closed unexpectedly by
exec().

ok tedu florian

Revision 1.36 / (download) - annotate - [select for diffs], Mon Mar 11 22:53:29 2019 UTC (5 years, 2 months ago) by pamela
Branch: MAIN
Changes since 1.35: +4 -2 lines
Diff to previous 1.35 (colored)

Make slaacd(8) imsg processing more paranoid. Unexpected size mismatches
mean we should no longer trust processes, so we call fatal(x). The
control socket is the exception, where we ignore rather than allow
crashes due to data from the outside.
suggestion/input and OK florian@

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 11 15:27:07 2019 UTC (5 years, 2 months ago) by pamela
Branch: MAIN
Changes since 1.34: +8 -8 lines
Diff to previous 1.34 (colored)

Change fatal() to fatalx() where errno is not set.
input and OK florian@

Revision 1.34 / (download) - annotate - [select for diffs], Tue Mar 5 15:46:37 2019 UTC (5 years, 2 months ago) by pamela
Branch: MAIN
Changes since 1.33: +3 -7 lines
Diff to previous 1.33 (colored)

slaacd doesn't have a config file to reload on hangup. We can ignore
those signals, so remove unnecessary signal handling code.
pointed at and OK florian@

Revision 1.33 / (download) - annotate - [select for diffs], Sat Mar 2 05:34:59 2019 UTC (5 years, 3 months ago) by pamela
Branch: MAIN
Changes since 1.32: +21 -19 lines
Diff to previous 1.32 (colored)

Introduce the IMSG_DATA_SIZE() macro to replace recurring math on
imsg.hdr.len to shorten and simplify code.
correction and OK florian@

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jan 22 09:25:29 2019 UTC (5 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.31: +4 -4 lines
Diff to previous 1.31 (colored)

PF_ROUTE -> AF_ROUTE in the scattered sock()/setsockopt() calls
where the "wrong" #define was used.

ok dlg@

Revision 1.31 / (download) - annotate - [select for diffs], Sun Aug 19 12:29:03 2018 UTC (5 years, 9 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Call daemon with 0 as first argument so that it changes the cwd to /
otherwise the main process will keep sitting in the directory from
where slaacd was started which might for example prevent an unmount.
Problem first observed by dlg in ntpd(8).
Discussed with deraadt@

Revision 1.30 / (download) - annotate - [select for diffs], Sun Aug 5 09:37:52 2018 UTC (5 years, 9 months ago) by mestre
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Since -s argument is no longer checked, during reexec, the argv size then must
be shortened by 1.

OK florian@

Revision 1.29 / (download) - annotate - [select for diffs], Sat Aug 4 09:36:49 2018 UTC (5 years, 9 months ago) by florian
Branch: MAIN
Changes since 1.28: +5 -14 lines
Diff to previous 1.28 (colored)

Leave the control socket behind on shutdown. It doesn't hurt anyone.
On the other hand it is much more powerful to get rid of cpath; slaacd
has no filesystem access whatsoever.
Triggered by mestre@'s work to fix unlinking in other daemons and a
question from deraadt@
OK mestre

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jul 27 06:20:01 2018 UTC (5 years, 10 months ago) by bket
Branch: MAIN
Changes since 1.27: +13 -1 lines
Diff to previous 1.27 (colored)

Enable slaacd(8) to set MTU on an interface.

If a router advertisement message with the MTU option is received on an
interface slaacd will set the specified MTU on that interface.

Lots of help from florian@. Thank you!

OK florian@

Revision 1.27 / (download) - annotate - [select for diffs], Mon Jul 23 17:25:52 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.26: +12 -1 lines
Diff to previous 1.26 (colored)

When moving between networks slaacd configures new addresses but
leaves old ones behind. The IPv6 RFCs don't seem to offer guidance on
what to do in this case. (RFC 5220 discusses related issues, but not
exactly this.)

It seems a bit harsh to just delete old addresses - a naive
implementation can easily lead to flip-flopping between two prefixes.

Instead set the preferred lifetime to 0 for all addresses on an
interface when the link goes down, thus marking addresses as
deprecated but still usable. When the link comes back send a router
solicitation. If we are still on the old network and receive a router
advertisement the preferred lifetime will increase and the addresses
will no longer be deprecated.

If we moved to a new network we will get new router advertisements and
form new addresses. The old ones will stay deprecated and the address
selection algorithm will prefer new addresses.

Problem reported by many.

testing & OK phessler

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jul 23 06:14:14 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Handle duplicate address detection failures.

We get notified when duplication is detected on the route socket. For
privacy addresses simply generate a new random address. If we have
soii enabled increase the dad counter on the prefix and generate a new
address. For eui64 addresses nothing can be done.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Jul 9 07:41:15 2018 UTC (5 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.24: +1 -37 lines
Diff to previous 1.24 (colored)

Remove array of IMSG type names.

It was helpfull in the beginning to know which IMSG are flying around
but unusable (and unsused) since slaacd(8) is on the ramdisk.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Jul 7 12:08:07 2018 UTC (5 years, 10 months ago) by sthen
Branch: MAIN
Changes since 1.23: +5 -4 lines
Diff to previous 1.23 (colored)

slaacd is not interested in v4-related route messages so set the address
family on the two socket() calls to open the routing socket, so that only
v6-related and af-unspecific messages are seen.

One of the sockets is only used for sending not receiving messages;
shutdown the receive side to avoid receiving messages as suggested by
claudio@.

slaacd is run by default (watching for interface changes to add the
"autoconf" flag), so has to process route messages even where IPv6
autoconf isn't used - these changes reduce CPU use on machines processing
large numbers of route updates (in particular full-table BGP routers).

ok florian@ claudio@ benno@

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jun 18 16:13:45 2018 UTC (5 years, 11 months ago) by florian
Branch: MAIN
Changes since 1.22: +3 -9 lines
Diff to previous 1.22 (colored)

Pledge main process now that we have wroute.

Revision 1.22 / (download) - annotate - [select for diffs], Thu May 17 13:39:00 2018 UTC (6 years ago) by florian
Branch: MAIN
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored)

Handle RTM_DELETE of slaacd managed default route by re-inserting it.
Problem pointed out & OK phessler

Revision 1.21 / (download) - annotate - [select for diffs], Thu May 17 11:52:04 2018 UTC (6 years ago) by florian
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

Fully align this with route(8); no need to be different here and might
help us if we ever get rid of KAME hack.

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 17 11:51:27 2018 UTC (6 years ago) by florian
Branch: MAIN
Changes since 1.19: +5 -4 lines
Diff to previous 1.19 (colored)

Introduce SLAACD_RTA_LABEL define to not use a string constant all
over the place.

Revision 1.19 / (download) - annotate - [select for diffs], Wed May 16 11:39:30 2018 UTC (6 years ago) by florian
Branch: MAIN
Changes since 1.18: +5 -3 lines
Diff to previous 1.18 (colored)

Create all sockets with SOCK_CLOEXEC, we never want to hold on to them
over execve(2).

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 15 16:34:18 2018 UTC (6 years ago) by florian
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

typo in log message

Revision 1.17 / (download) - annotate - [select for diffs], Thu Apr 26 17:07:31 2018 UTC (6 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.16: +9 -1 lines
Diff to previous 1.16 (colored)

The frontend tells the main process when the startup is finished so
that we can drop the sendfd pledge.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Apr 26 17:06:27 2018 UTC (6 years, 1 month ago) by florian
Branch: MAIN
Changes since 1.15: +13 -11 lines
Diff to previous 1.15 (colored)

Hoist initialisations up; while here tighten not yet working pledge.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Feb 10 05:57:59 2018 UTC (6 years, 3 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.14: +17 -3 lines
Diff to previous 1.14 (colored)

RFC 7217 support for slaacd

OK naddy, sthen

Revision 1.14 / (download) - annotate - [select for diffs], Sun Dec 10 17:34:05 2017 UTC (6 years, 5 months ago) by stsp
Branch: MAIN
Changes since 1.13: +5 -1 lines
Diff to previous 1.13 (colored)

add #ifndef SMALL to slaacd.c as needed to fix 'make release'

Revision 1.13 / (download) - annotate - [select for diffs], Sun Dec 10 10:07:54 2017 UTC (6 years, 5 months ago) by florian
Branch: MAIN
Changes since 1.12: +70 -17 lines
Diff to previous 1.12 (colored)

Move privileged initialization from frontend to main process.
Needed for future work where we will spin up children via
fork - privdrop - exec. Child processes will no longer come
up with root privileges.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Nov 3 12:28:41 2017 UTC (6 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

There can be multiple default routers sending router advertisements.
Install the default route with mpath flag.
OK mpi

Revision 1.11 / (download) - annotate - [select for diffs], Wed Aug 23 15:49:08 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.10: +11 -12 lines
Diff to previous 1.10 (colored)

Overhaul verbosity handling.
Get rid of cmd_opts which is a leftover from daemons that handle
config files. Instead use a verbose counter for the amount of -v
given on the command line. One enables debug logging, two logs
received router advertisements. This will make debugging unexpected
RAs easier.
Instead of asking for a pcap we can ask for -vv.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Aug 23 10:48:01 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
Changes since 1.9: +13 -1 lines
Diff to previous 1.9 (colored)

When starting up or when the autoconf6 flag is set on an interface
collect already configured autoconf addresses and track them in the
engine.
That way we are not adding a new privacy address on every restart.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Aug 21 14:44:26 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
Changes since 1.8: +19 -1 lines
Diff to previous 1.8 (colored)

Move sin6_to_str() to slaacd.c so that it can be used in more
places. While here do not compile it for the ramdisk.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 19 11:14:04 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
Changes since 1.7: +18 -3 lines
Diff to previous 1.7 (colored)

Set route label to make it easier to identify slaacd routes.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Aug 19 11:13:38 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Set correct sin6_len for mask, amazing that this even worked.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 12 16:31:09 2017 UTC (6 years, 9 months ago) by florian
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Make not yet implemented pledges more visible in grep output.
input benno, deraadt, tedu
also standardize on #if 0 since it makes tedu's editor vomit.
OK benno, pirofti on a previous version

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 14 09:29:40 2017 UTC (6 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.4: +11 -1 lines
Diff to previous 1.4 (colored)

run IMSG_UPDATE_IF through the main process, reduces upcomming diff
for RFC 7217 support

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jul 6 15:02:53 2017 UTC (6 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.3: +11 -2 lines
Diff to previous 1.3 (colored)

Sprinkel in some #ifndef SMALL to make slaacd smaller for the
installer.

This removes the control socket handling which is useless because we
won't have slaacctl in the installer.

Also deraadt@ pointed out that this would be the first use of log.c in
the installer where we don't have syslogd running so it's rather
pointless. So this completely neuters logging.

The log.h change doesn't interfere with benno@'s efforts of unifying
log.c

The installer version of slaacd won't even compile control.c and log.c

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jul 6 14:57:29 2017 UTC (6 years, 10 months ago) by florian
Branch: MAIN
Changes since 1.2: +6 -7 lines
Diff to previous 1.2 (colored)

reorder imsg_type enum so that we can #ifndef SMALL all the control
related imsg types

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jul 3 19:02:04 2017 UTC (6 years, 11 months ago) by florian
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

s/log_warn/log_warnx/ where errno is not set

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jun 3 10:00:29 2017 UTC (7 years ago) by florian
Branch: MAIN

Move slaacd to /sbin
jca points out that all the other interface configuration tools live
there (like ifconfig or dhclient). Furthermore it starts so early in
the boot process that /usr might not be mounted yet if it's a nfs
filesystem.
sthen and deraadt agree

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.