Commit Graph

23 Commits

Author SHA1 Message Date
joerg bbdb057767 Just ignore a bunch of well-known routing socket messages ifwatchd
doesn't care about to make verbose mode less noisy.  When it does print
an unknown header type, also say which one it doesn't like.
2008-05-24 17:45:14 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
dyoung 1b8630a278 Cosmetic: KNF. Shorten staircases. Delete some whitespace at line
ends (makes navigation with vi more reliable).
2007-12-22 00:57:15 +00:00
martin 59ca47f545 In the initial interface scan at start time, query the link status of
the interfaces and call the CARRIER script if a link is already there.
This allows me to boot my notebook with the cable pluged and
fixes PR bin/26830.
2004-11-25 06:57:38 +00:00
martin 06eb7200cc Add support to call scripts at carrier detect/drop time (on network
interfaces that report this).
Basically from Brian Grayson, fixes his PR bin/23191.
2004-01-04 22:19:51 +00:00
martin 25943be498 Use the new SPPPGETSTATUSNCP ioctl, if supported, to avoid reporting
intermitent changes on "volatile" interfaces based on if_spppsubr.c.
This interfaces used to cause ifwatchd to call the up and down scripts
with 0.0.0.0 addresses between entering PPP phase network and IPCP
completition.
2003-12-27 00:05:46 +00:00
grant cacf2d0f45 s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
abs e364b78d41 Fix typo in last change (misplaced ');') 2003-07-04 14:11:36 +00:00
wiz 1dbe2d9b38 Sync usage with man page. 2003-07-04 12:45:05 +00:00
martin 3088b1239b Improve diagnostics a bit, log to syslog. 2003-06-23 21:50:12 +00:00
itojun 84e2880efb KNF 2003-05-17 19:14:25 +00:00
wiz 064e896cda Sync usage with man page. 2003-04-16 09:09:52 +00:00
martin 5005fdb656 Run "arrival" scripts too in the inital pass on startup.
Open the routing socket before this pass to close a small window where
we would miss messages at startup (and get state kept by the scripts
out of sync).
Patch supplied by KOIE Hidetaka in private mail.
2003-03-06 13:33:29 +00:00
martin 549d82b84d Add support for watching coming/going pccard interfaces.
Patch from KOIE Hidetaka in PR bin/20584.
2003-03-05 09:03:49 +00:00
tron 0f55b8bb08 Use vfork(2) and exec(2) instead of system for performance and security
reasons.
2002-04-15 21:08:41 +00:00
tron 7b03e17cb9 Don't invoke the up- and down-script for link local IPv6 addresses. 2002-04-15 20:42:37 +00:00
tron c28d45defe Invoke "ip-up" and "ip-down" script with parameters exactly matching
those used by pppd(8).
2002-04-15 17:32:18 +00:00
martin 573dfcd430 Fix copyright notice, sprinkle some $NetBSD$. 2002-04-14 11:41:42 +00:00
martin 7b6f872d11 Add, #ifdef SPPP_IF_SUPPORT, special case treatment for sys/net/if_spppsubr.c
based interfaces. Note: all other interface types work the same as before,
and no names are hardcoded.

When a if_spppsubr.c based interface is marked IFF_UP, but has not yet
reached phase NETWORK (i.e. it didn't connect yet or authentication has not
yet completed) do not call the ip-up script for it on the initial pass
over all IFF_UP interfaces.

This fixes a race condition on startup when ip-up/ip-down are statefull
and need to be called pairwise (for example if ip-up adds and ip-down
removes a default route).
2002-01-10 20:21:50 +00:00
martin 0f93714245 Pass the remote address (or broadcast addres) to the up/down scripts as
well. This is very usefull for setting up the right routes ;-)

Thanks to Bjoern Labitzke for pointing out this missing feature.
2002-01-10 19:38:51 +00:00
martin 136813d385 Call up-scripts for interface already up on startup to account for the
late start of this daemon on system boot.
Add and document an option to prevent this.
2001-12-10 14:54:09 +00:00
martin b44ac684a5 Add $NetBSD$, remove unneeded includes. 2001-11-19 10:20:34 +00:00
martin c8b09ee080 New utility: ifwatchd.
Monitors the routing socket for address changes of autonomous (kernel only)
interfaces (like PPPoE) and runs up/down scripts similar to what pppd
does for its interfaces.
2001-11-19 09:43:03 +00:00