summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtadvd/config.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r299513,r299515:ngie2016-06-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | r299513 (by cem): rtadvd(8): Don't use-after-free This whole block of code as committed fully formed in r224144. I'm not really sure what the intent was, but it seems plausible that !persist ifis could need other member cleanup. Don't free the object until after we've finished cleaning its members. CID: 1006079 r299515 (by cem): rtadvd(8): Fix use-after-close in cm_handler_client cm_send() closes 'fd' on error. In that case, bail out early without trying to recv from or close 'fd' again. CID: 1006078
* MFC r299867truckman2016-05-201-1/+1
| | | | | | | | | Use strlcpy() instead of strncpy() when copying ifname to ensure that it is NUL terminated. Additional NUL padding is not required for short names. Reported by: Coverity CID: 974860, 1009972, 1009973
* Fix a crash when reloading the configuration file.hrs2013-08-271-4/+2
| | | | Spotted by: des
* Set the back pointer from the prefix to the interface before addingdes2013-08-231-1/+1
| | | | | | | | | the prefix to the interface's prefix list. This shouldn't make a difference, since rtadvd(8) is single-threaded, but I've seen it crash in delete_prefix() with pfx_rainfo == NULL, and this is the only place where a prefix can be added to the list with a NULL pfx_rainfo. MFC after: 3 days
* - Use time_uptime instead of time_second in data structures forhrs2013-08-051-9/+11
| | | | | | | | | PF_INET6 in kernel. This fixes various malfunction when the wall time clock is changed. Bump __FreeBSD_version to 1000041. - Use clock_gettime(CLOCK_MONOTONIC_FAST) in userland utilities. MFC after: 1 month
* Add a missing white space.hrs2013-07-091-1/+1
|
* Spelling fixes for usr.sbin/uqs2011-12-301-1/+1
|
* - Improve interface list handling. The rtadvd(8) now supports dynamically-hrs2011-07-171-191/+357
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added/removed interfaces in a more consistent manner and reloading the configuration file. - Implement burst unsolicited RA sending into the internal RA timer framework when AdvSendAdvertisements and/or configuration entries are changed as described in RFC 4861 6.2.4. This fixes issues that make termination of the rtadvd(8) daemon take very long time. An interface now has three internal states, UNCONFIGURED, TRANSITIVE, or CONFIGURED, and the burst unsolicited sending happens in TRANSITIVE. See rtadvd.h for the details. - rtadvd(8) now accepts non-existent interfaces as well in the command line. - Add control socket support and rtadvctl(8) utility to show the RA information in rtadvd(8). Dumping by SIGUSR1 has been removed in favor of it.
| * - Refactoring the interface list. It now supports dynamicallyhrs2011-07-141-103/+154
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added/removed interfaces in a more consistent manner and reloading the configuration file. - Add initial support for control socket. RA information in the daemon can be obtained by rtadvctl(8) instead of SIGUSR1 in a similar manner to ifconfig(8). The information dump has been removed in favor of it. (reload the configuration file) # rtadvctl reload (show RA messages being sent on each interfaces) # rtadvctl show em0: flags=<UP,CONFIGURED,PERSIST> status=<RA_SEND> mtu 1280 DefaultLifetime: 30m MinAdvInterval/MaxAdvInterval: 3m20s/3m20s AdvLinkMTU: <none>, Flags: O, Preference: medium ReachableTime: 0s, RetransTimer: 0s, CurHopLimit: 64 AdvIfPrefixes: yes (show RA messages being sent only on em0) # rtadvctl show em0 (rtadvctl -v show provides additional information) # rtadvctl -v show em0 em0: flags=<UP,CONFIGURED,PERSIST> status=<RA_SEND> mtu 1280 DefaultLifetime: 30m MinAdvInterval/MaxAdvInterval: 3m20s/3m20s AdvLinkMTU: <none>, Flags: O, Preference: medium ReachableTime: 0s, RetransTimer: 0s, CurHopLimit: 64 AdvIfPrefixes: yes Prefixes (1): 2001:db8:1::/64 (CONFIG, vltime=30d, pltime=7d, flags=LA) RDNSS entries: 2001:db8:1::128 (ltime=2m40s) (stop rtadvd) # rtadvctl shutdown A remaining issue when reloading the configuration file is that during that period rtadvd cannot communicate with rtadvctl due to some additional RA sending for graceful shutdown. This will be fixed later.
* Support SIGHUP for reloading /etc/rtadvd.conf.hrs2011-06-111-32/+111
|
* - Use ELM_MALLOC() for struct rainfo.hrs2011-06-071-11/+5
| | | | | | | - Fix a missing back pointer assignment in struct prefix to struct rainfo when addr="" is specified. This caused SIGSEGV. - Insert a prefix element to a tail queue after setting parameters.
* Fix build on 64-bit arch.hrs2011-06-061-1/+1
| | | | | Submitted by: dim Pointy hat to: hrs
* - Implement RDNSS and DNSSL options (RFC 6106, IPv6 Router Advertisementhrs2011-06-061-405/+615
| | | | | | | | | | | | | | | | | | | | | Options for DNS Configuration) into rtadvd(8) and rtsold(8). DNS information received by rtsold(8) will go to resolv.conf(5) by resolvconf(8) script. This is based on work by J.R. Oldroyd (kern/156259) but revised extensively[1]. - rtadvd(8) now supports "noifprefix" to disable gathering on-link prefixes from interfaces when no "addr" is specified[2]. An entry in rtadvd.conf with "noifprefix" + no "addr" generates an RA message with no prefix information option. - rtadvd(8) now supports RTM_IFANNOUNCE message to fix crashes when an interface is added or removed. - Correct bogus ND_OPT_ROUTE_INFO value to one in RFC 4191. Reviewed by: bz[1] PR: kern/156259 [1] PR: bin/152458 [2]
* Cleanup of userland __P usekevlo2007-11-071-3/+3
|
* avoid heap overrunsuz2006-03-231-1/+1
| | | | | Obtained from: KAME MFC after: 1 day
* fixed a typo in commentsuz2005-11-171-1/+1
|
* added an ioctl option in kernel so that ndp/rtadvd can change some ↵suz2005-10-191-0/+30
| | | | | | | | NDP-related kernel variables based on their configurations (RFC2461 p.43 6.2.1 mandates this for IPv6 routers) Obtained from: KAME Reviewd by: ume, gnn MFC after: 2 weeks
* removed compilation warningsuz2004-10-221-0/+1
| | | | PR: bin/71624
* - supported a string notation for xxflags.ume2003-08-151-225/+279
| | | | | | | | | | | | | | | | | | | | | | - deprecate routes#N, as it is hard to keep consistency with rtprefixN. accept any number of "rtprefix", "rtrefix0", ..., "rtprefix99". - deprecate "addrs#N", as it is difficult for users to keep consistency with "addrN". accept 100 prefix info in maximum - like "addr", "addr0" ... "addr99". WARNS=2 clean on netbsd. old configuration file should work just fine. behavior change: previously, we rejected "addrN" if there's "addr", and we rejected "addr" if there is "addrN". now we accept both without problem. - when an advertised prefix configured from the kernel has been added or invalidated, notice the change in a short delay. - when invalidating a prefix, do not bark even if there is inconsistency about prefix lifetimes. - wrap more specific route info code into ROUTEINFO. Obtained from: KAME MFC after: 1 week
* malloc() may return NULL.ume2003-08-121-0/+5
| | | | | Obtained from: KAME MFC after: 1 week
* reduce #ifdef.ume2003-08-111-5/+0
| | | | MFC after: 1 week
* use strlcpy() and snprintf().ume2003-08-111-1/+1
| | | | | Obtained from: KAME MFC after: 1 week
* use int64_t instead of long long.ume2003-08-111-2/+2
| | | | | Obtained from: KAME MFC after: 1 week
* Drop MIP6 code. We don't support MIP6 yet.ume2003-08-081-88/+0
| | | | MFC after: 1 week
* KNF, correct typos and cleanup spaces.ume2003-08-081-8/+5
| | | | | Obtained from: KAME MFC after: 1 week
* __FUNCTION__ --> __func__ume2003-08-081-53/+53
| | | | | Obtained from: KAME MFC after: 1 week
* - fixed byte order of route lifetimes in route info opptions.suz2003-04-101-2/+2
| | | | | | | - corrected wording in a log message. Obtained from: KAME MFC after: 1 week
* Use assignment, not equivalence test.njl2003-04-051-1/+1
| | | | No response from: suz
* fixed invalid pointer referencesuz2003-04-021-0/+1
| | | | Obtained from: KAME
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-2/+2
| | | | Add FreeBSD Id tag where missing.
* Do not issue deprecated ioctl.ume2002-06-151-0/+8
| | | | | Obtained from: KAME MFC after: 2 weeks
* Changed the behavior when an interface-direct prefix being advertisedume2002-06-131-16/+93
| | | | | | | | | | | was removed from the kernel; Advertise the prefix with zero lifetimes rather than to remove the prefix from the prefix list to be advertised. This will help renumber a receiving host by deprecating the address derived from the old prefix. Obtained from: KAME MFC after: 2 weeks
* Skip duplicated prefixes in get_prefix().ume2002-06-011-12/+18
| | | | Obtained from: KAME
* sprintf -> snprintfume2002-06-011-17/+25
| | | | Obtained from: KAME
* Sync with recent KAME.ume2001-06-111-79/+317
| | | | | | | | | | | | | | | | | | This work was based on kame-20010528-freebsd43-snap.tgz and some critical problem after the snap was out were fixed. There are many many changes since last KAME merge. TODO: - The definitions of SADB_* in sys/net/pfkeyv2.h are still different from RFC2407/IANA assignment because of binary compatibility issue. It should be fixed under 5-CURRENT. - ip6po_m member of struct ip6_pktopts is no longer used. But, it is still there because of binary compatibility issue. It should be removed under 5-CURRENT. Reviewed by: itojun Obtained from: KAME MFC after: 3 weeks
* zero-cleared allocated prefix information when configured.ume2001-01-231-0/+2
| | | | Obtained from: KAME
* make it easier to handle $FreeBSD$ tags (amount of diff matters).itojun2001-01-211-2/+1
|
* Sync with latest KAMEkris2000-07-051-18/+125
| | | | Obtained from: KAME
* Added several socket close() which were mistakenly forgotten.shin2000-03-091-0/+1
| | | | Reported by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
* Forbid include of soem inet6 header files from wrong placeshin2000-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KAME put INET6 related stuff into sys/netinet6 dir, but IPv6 standard API(RFC2553) require following files to be under sys/netinet. netinet/ip6.h netinet/icmp6.h Now those header files just include each following files. netinet6/ip6.h netinet6/icmp6.h Also KAME has netinet6/in6.h for easy INET6 common defs sharing between different BSDs, but RFC2553 requires only netinet/in.h should be included from userland. So netinet/in.h also includes netinet6/in6.h inside. To keep apps portability, apps should not directly include above files from netinet6 dir. Ideally, all contents of, netinet6/ip6.h netinet6/icmp6.h netinet6/in6.h should be moved into netinet/ip6.h netinet/icmp6.h netinet/in.h but to avoid big changes in this stage, add some hack, that -Put some special macro define into those files under neitnet -Let files under netinet6 cause error if it is included from some apps, and, if the specifal macro define is not defined. (which should have been defined if files under netinet is included) -And let them print an error message which tells the correct name of the include file to be included. Also fix apps which includes invalid header files. Approved by: jkh Obtained from: KAME project
* libipsec and IPsec related apps. (and some KAME related man pages)shin2000-01-061-0/+639
Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
OpenPOWER on IntegriCloud