Hajimu UMEMOTO
3b24803f01
rtm_seq is int, so seq/myseq should be int.
...
Obtained from: KAME
MFC after: 1 week
2003-08-18 16:20:30 +00:00
Hajimu UMEMOTO
0d30357ff6
suppress outpt on dump request if -q is specified.
...
Obtained from: KAME
MFC after: 1 week
2003-08-18 16:15:30 +00:00
Hajimu UMEMOTO
8ecfc219e1
atoi -> strtoul
...
Obtained from: KAME
MFC after: 1 week
2003-08-18 16:09:59 +00:00
Hajimu UMEMOTO
c706c1cddc
- port numbers are unsigned. use %u.
...
- %d is not 10 chars, but 12 chars.
Obtained from: KAME
MFC after: 1 week
2003-08-18 15:58:23 +00:00
Hajimu UMEMOTO
651555cc54
explicitly specify IPPROTO_UDP when calling getaddrinfo().
...
Obtained from: KAME
MFC after: 1 week
2003-08-18 15:54:08 +00:00
Hajimu UMEMOTO
16dd7c128d
remove a variable that is never used.
...
Obtained from: KAME
MFC after: 1 week
2003-08-18 15:47:17 +00:00
Hajimu UMEMOTO
7b01856526
support poll(2).
...
Obtained from: KAME
MFC after: 1 week
2003-08-18 15:35:33 +00:00
Hajimu UMEMOTO
ed7ac91c5f
- don't select with FD_SETSIZE.
...
- avoid fd_set overrun.
Obtained from: KAME
MFC after: 1 week
2003-08-18 15:24:32 +00:00
Hajimu UMEMOTO
b18ac9358c
- don't print strerror() if errno == 0 on fatal().
...
- va_start/end audit.
- can't use vfprintf() twice. need va_start/end pair every time.
Obtained from: KAME
MFC after: 1 week
2003-08-17 18:35:56 +00:00
Hajimu UMEMOTO
4776b349ce
- do not SEGV on IFF_UP.
...
- recover rrt_gw setting for non-p2p case. otherwise, we will not
be able to recover interface route on interface down -> up
transition.
- clarify loop exit condition
Obtained from: KAME
MFC after: 1 week
2003-08-17 18:12:11 +00:00
Hajimu UMEMOTO
6b036f549c
do not send dump request on -N
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 17:51:30 +00:00
Hajimu UMEMOTO
ceb128190f
macro pedant
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 17:47:22 +00:00
Hajimu UMEMOTO
70aff8bf47
minor cleanup; no need for extra variable here
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 17:40:47 +00:00
Hajimu UMEMOTO
691ab711fb
use strchr(3).
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 17:34:09 +00:00
Hajimu UMEMOTO
532ba48e39
daemon() has to be called prior to file descriptor setups
...
(otherwise file descriptors could be closed mistakenly)
Obtained from: KAME
MFC after: 1 week
2003-08-17 17:29:54 +00:00
Hajimu UMEMOTO
8a92d72c44
getifaddrs(3) is always used.
...
MFC after: 1 week
2003-08-17 17:21:00 +00:00
Hajimu UMEMOTO
05d7208ae7
knf, typo, space.
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 16:26:35 +00:00
Hajimu UMEMOTO
65033d4fcb
set IPV6_V6ONLY.
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 16:08:56 +00:00
Hajimu UMEMOTO
1dd7cfc46f
- die if malloc fails.
...
- use strlcpy.
Obtained from: KAME
MFC after: 1 week
2003-08-17 16:07:57 +00:00
Hajimu UMEMOTO
be71e4ad8a
use strncpy
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 16:06:52 +00:00
Hajimu UMEMOTO
4c4ac8c03d
"sin" is a reserved C library function name. use sin6
...
Obtained from: KAME
MFC after: 1 week
2003-08-17 16:05:49 +00:00
Hajimu UMEMOTO
e5a9696004
We don't need __ss hack.
...
MFC after: 1 week
2003-08-17 16:03:58 +00:00
Hajimu UMEMOTO
96316581fc
backout 1.11. ifname in struct ifreq should be copyed by strncpy.
...
Pointed out by: itojun
2003-08-17 11:54:58 +00:00
Hajimu UMEMOTO
9a364ca35a
- improved the -a option. it can probe a interface automatically when
...
the interface wake up. it can be started anytime even when there is
no network interface on the list of intarfaces in the kernel.
- get a correct link ID for each interface at initialization
(using scope libraries if HAVE_SCOPELIB is defined).
- fill in sin6_scope_id correctly before sendmsg().
Obtained from: KAME
MFC after: 1 week
2003-08-17 11:11:32 +00:00
Philippe Charnier
96d282ece6
add FBSDID, compare getopt() against -1, use fprintf() + exit() in usage()
...
instead of errx() to get the message starting with "usage:".
2003-08-17 09:06:08 +00:00
Philippe Charnier
b0fed5c6b6
Make it clear that -a flag and interface parameter are mutually exclusive
2003-08-16 22:23:16 +00:00
Hajimu UMEMOTO
4774e8e607
use strlcpy().
...
Pointed out by: Pawel Jakub Dawidek <nick@garage.freebsd.pl>
MFC after: 1 week
2003-08-16 20:19:20 +00:00
Philippe Charnier
336ea56a67
add section name
...
Approved by: Nate Lawson
2003-08-16 19:59:53 +00:00
Hajimu UMEMOTO
131033d55c
- added the case of 802.11 to check link status.
...
- use strncpy just in case.
- __P() cleanup.
Obtained from: KAME
MFC after: 1 week
2003-08-16 19:00:32 +00:00
Hajimu UMEMOTO
fc35a81b09
- supported a string notation for xxflags.
...
- 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
2003-08-15 19:13:53 +00:00
Hajimu UMEMOTO
dba14c305c
use arc4random.
...
Obtained from: KAME
MFC after: 1 week
2003-08-15 17:51:51 +00:00
Hajimu UMEMOTO
51964a1b2b
variable shared with signal handler needs to be "volatile sig_atomic_t".
...
Obtained from: KAME
MFC after: 1 week
2003-08-15 17:20:49 +00:00
Hajimu UMEMOTO
fbcc332a1d
set LOG_PERROR for openlog() when running foreground.
...
Obtained from: KAME
MFC after: 1 week
2003-08-15 17:15:10 +00:00
Hajimu UMEMOTO
767b3bfd66
dump the content of route information options
...
Obtained from: KAME
MFC after: 1 week
2003-08-15 17:04:28 +00:00
Hajimu UMEMOTO
776fdb8006
logged the fact to dump the status.
...
Obtained from: KAME
MFC after: 1 week
2003-08-15 16:50:34 +00:00
Hajimu UMEMOTO
145b960169
daemon() has to be called prior to file descriptor setups
...
(otherwise file descriptors could be closed mistakenly)
Obtained from: KAME
MFC after: 1 week
2003-08-14 19:05:24 +00:00
Hajimu UMEMOTO
5c706347d5
support poll(2).
...
Obtained from: KAME
MFC after: 1 week
2003-08-14 18:43:57 +00:00
Hajimu UMEMOTO
92bdf888a6
daemon() has to be called prior to file descriptor setups
...
(otherwise file descriptors could be closed mistakenly)
Obtained from: KAME
MFC after: 1 week
2003-08-14 18:13:34 +00:00
Hajimu UMEMOTO
4eb4a0e6ec
- rename some variables.
...
- remove unused block.
Obtained from: KAME
MFC after: 1 week
2003-08-14 16:51:13 +00:00
Hajimu UMEMOTO
71aa258ee8
signal handler must take "int" arg.
...
Obtained from: KAME
MFC after: 1 week
2003-08-14 16:23:39 +00:00
Hajimu UMEMOTO
eaa5529180
avoid fd_set overrun.
...
Obtained from: KAME
MFC after: 1 week
2003-08-14 16:19:59 +00:00
Hajimu UMEMOTO
653b3bd48b
signal handler must take "int" arg.
...
Obtained from: KAME
MFC after: 1 week
2003-08-14 15:57:52 +00:00
Hajimu UMEMOTO
8998f69b13
avoid fd_set overrun.
...
Obtained from: KAME
MFC after: 1 week
2003-08-14 15:47:31 +00:00
Hajimu UMEMOTO
7bc56ec444
decreased too-strong log levels.
...
Obtained from: KAME
MFC after: 1 week
2003-08-14 15:21:55 +00:00
Garance A Drosehn
53953407b6
Use STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO in a few more
...
places (replacing constants 0, 1 & 2).
Noticed by:
Reviewed by: md5
MFC after: 4 days
2003-08-13 20:31:33 +00:00
Hartmut Brandt
7cfb043cce
Make this WARNS=6 clean by just constifying two local char pointers.
2003-08-13 07:51:06 +00:00
Hartmut Brandt
3af5ca9948
Put all the argument-less options together in the synopsis as required
...
by style(9).
2003-08-13 07:43:08 +00:00
Hartmut Brandt
1cdff5c9f7
Implement two command line options that allow one to change the
...
file descriptors that are used for input and output. That allows
one, for example, to use nghook to bi-directionally pipe the
input and output into/from another non-netgraph-aware program.
2003-08-13 07:42:07 +00:00
David E. O'Brien
1c327ba712
Imply NOLIBC_R for PowerPC.
2003-08-13 00:13:37 +00:00
Hajimu UMEMOTO
d7f0819bf0
malloc() may return NULL.
...
Obtained from: KAME
MFC after: 1 week
2003-08-12 16:58:32 +00:00