Commit Graph

67 Commits

Author SHA1 Message Date
christos fb571d36af Don't forget to set sin_scope. From Ryota Ozaki 2015-12-14 18:24:06 +00:00
ozaki-r a3390d2a1a Add getaddrinfo.c to RUMPSRCS for link-local addresses 2015-12-14 06:17:05 +00:00
ozaki-r 3296ce621c Fix rump.ndp -I options by rump-ifying if_nametoindex(3)
From s-yamaguchi@IIJ
2015-09-01 09:54:34 +00:00
ozaki-r 10613e2fe6 Introduce rump.ndp
ndp(8) uses RTM that requires that getpid(2) works correctly. Unfortunately
supporting getpid(2) in librumphijack will be tricky so that we rump-ify
ndp(8) as well as arp(8).
2015-08-03 09:51:40 +00:00
christos 8ee626c9fa improve error messages (remove \n, use __func__, etc) 2015-06-16 23:04:13 +00:00
roy 0398025216 Add IPV6CTL_AUTO_LINKLOCAL and ND6_IFF_AUTO_LINKLOCAL toggles which
control the automatic creation of IPv6 link-local addresses when an
interface is brought up.

Taken from FreeBSD.
2014-06-05 16:06:49 +00:00
roy 263486c97b If IPv6 is disabled for an interface, mark all addresses as tentative.
If enabled, check for a duplicated link-local address and abort enabling
as per RFC 4862, section 5.4.5. If allowed to enable, perform DAD
on the tentative addresses.

Taken from FreeBSD.
2014-03-20 13:34:35 +00:00
martin 261edc5997 Simplify code to print the router/prefix list: use memcpy and local structs
properly aligned on the stack to decode the binary format passed by the
kernel - instead of (bogusly) assuming the format will obey all local
alignement requirements.
2013-12-17 20:26:46 +00:00
christos 94a96ec4ae use new scopeid functions 2013-10-19 17:16:25 +00:00
uwe fd21d10e53 Don't check MKINET6 - parent makefile doesn't descend to ndp if it's "no". 2013-06-21 12:50:50 +00:00
uwe 62fe4696d8 Remove this stub that hasn't been necessary in a decade or so. 2013-06-21 12:42:55 +00:00
joerg bec77c5f43 Use __dead 2011-08-31 13:32:36 +00:00
drochner 2125f0d5e4 make this work again after routing socket alignment changes 2011-06-06 16:50:46 +00:00
christos dc449ddee1 use new tcpdump. 2010-12-12 18:50:31 +00:00
dyoung 2bd83a5fc2 Update date. 2009-11-06 20:51:43 +00:00
dyoung 95d78285f1 Teach ndp(8) about override_rtadv. 2009-11-06 20:51:19 +00:00
lukem d877c4c3c0 Enable WARNS=4 by default, except for:
cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
2009-04-22 15:23:01 +00:00
joerg 4945fc29a8 Simplify markup by not using .Xo/.Xc. 2009-03-11 18:52:54 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
hubertf 889da1779b * Don't include headers twice
* Remove a few trailing whitespaces
 * Rearrange and join to one #if for some headers

Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
2007-01-16 17:32:04 +00:00
christos 9881dfaad3 c99 initializer 2006-10-22 21:24:44 +00:00
christos 01caf31f3a Cleanup KNF, WARNS=4.
Phew, this started just to make set() static so that coverity does not get
confused.
2006-05-13 20:46:15 +00:00
rpaulo 8c2379fd97 NDP-related improvements:
RFC4191
	- supports host-side router-preference

	RFC3542
	- if DAD fails on a interface, disables IPv6 operation on the
          interface
	- don't advertise MLD report before DAD finishes

	Others
	- fixes integer overflow for valid and preferred lifetimes
	- improves timer granularity for MLD, using callout-timer.
	- reflects rtadvd's IPv6 host variable information into kernel
	  (router only)
	- adds a sysctl option to enable/disable pMTUd for multicast
          packets
	- performs NUD on PPP/GRE interface by default
	- Redirect works regardless of ip6_accept_rtadv
	- removes RFC1885-related code

From the KAME project via SUZUKI Shinsuke.
Reviewed by core.
2006-03-05 23:47:08 +00:00
rpaulo 78678b130a Better support of IPv6 scoped addresses.
- most of the kernel code will not care about the actual encoding of
  scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
  scoped addresses as a special case.
- scope boundary check will be stricter.  For example, the current
  *BSD code allows a packet with src=::1 and dst=(some global IPv6
  address) to be sent outside of the node, if the application do:
    s = socket(AF_INET6);
    bind(s, "::1");
    sendto(s, some_global_IPv6_addr);
  This is clearly wrong, since ::1 is only meaningful within a single
  node, but the current implementation of the *BSD kernel cannot
  reject this attempt.
- and, while there, don't try to remove the ff02::/32 interface route
  entry in in6_ifdetach() as it's already gone.

This also includes some level of support for the standard source
address selection algorithm defined in RFC3484, which will be
completed on in the future.

From the KAME project via JINMEI Tatuya.
Approved by core@.
2006-01-21 00:15:35 +00:00
itojun e5802101b4 change description of -I to meet the current implementation. bump date 2004-10-26 06:42:14 +00:00
itojun 62eb5fae68 close(2) missing. Andrey Matveev 2004-05-24 03:51:04 +00:00
itojun 5d2c970d68 fflush(stdout) on -A. KAME-PR-584 2004-02-10 14:44:32 +00:00
itojun 71ee6e8bea typo (struct member name - has to be rtm_addrs). from fujitsu 2004-01-08 06:56:25 +00:00
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun da2e0c851d err() cleanup, from openbsd-current via kame 2003-06-27 07:49:40 +00:00
itojun aa5672d8c5 sscanf overrun 2003-05-17 01:02:01 +00:00
lukem 17d72c8a6b use NETBSDSRCDIR as appropriate 2002-09-18 03:54:26 +00:00
itojun d650d1adac with -i, flag on command line and flag displayed are different, and it does
nothing but confuse users.  sync them.

for -nud and such, you need "-- -nud" due to posix arg parsing.

sync w/kame
2002-07-17 13:08:27 +00:00
itojun 61ef51d198 comment out paragraph that does not fit to NetBSD 2002-06-08 21:19:08 +00:00
itojun 47af351cc9 recover backward compatibility in -I behavior. sync w/kame 2002-06-03 19:27:39 +00:00
itojun d3583acf8c more KNF/nroff. from deraadt via kame 2002-06-03 04:41:34 +00:00
itojun b21f26fdc1 typo 2002-06-03 04:31:29 +00:00
itojun 016477e967 more posix-compliant arg parsing. sync with kame. help from deraadt 2002-06-03 03:34:36 +00:00
itojun 4bb986ded2 KNF, from openbsd via kame 2002-06-02 23:43:21 +00:00
itojun 1675bb6f17 more strlcpy. from openbsd via kame 2002-05-29 22:23:06 +00:00
wiz 8b32b6b12c Drop a space, and two grammar fixes. 2002-05-29 08:51:28 +00:00
itojun b09ce00be9 use new SIOCGIFINFO_IN6. random other cleanups. 2002-05-29 08:04:39 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz ca3452180b Punctuation nits. 2002-02-02 01:21:44 +00:00
itojun e6ccd47666 use strncpy() to set ifname arg to ioctl. 2001-11-08 09:45:34 +00:00
bjh21 d5a914aad0 Use getnameinfo() to format link-layer addresses rather than doing it
ourselves.
2001-10-06 19:39:23 +00:00
itojun 2dde33d97b sync with latest kame code. ndp -i won't print info for yet-to-be-initialized
interface.
2001-07-23 14:47:43 +00:00
itojun d54eb3a39d change tcpdump dir to refer to. Daniel Carosone <dan@geek.com.au> 2001-06-26 13:43:29 +00:00
kleink a0649bd297 getopt(3): EOF -> -1. 2001-05-07 14:00:22 +00:00
wiz 9ce3f772a3 Xref tcpdump 8, not 1. 2001-04-03 11:27:42 +00:00