diff options
author | ume <ume@FreeBSD.org> | 2001-06-11 12:39:29 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-06-11 12:39:29 +0000 |
commit | 832f8d224926758a9ae0b23a6b45353e44fbc87a (patch) | |
tree | a79fc7ad2b97862c4a404f352f0211ad93a7b5f1 /usr.sbin/mld6query/mld6.c | |
parent | 2693854b01a52b0395a91322aa3edf926bddff38 (diff) | |
download | FreeBSD-src-832f8d224926758a9ae0b23a6b45353e44fbc87a.zip FreeBSD-src-832f8d224926758a9ae0b23a6b45353e44fbc87a.tar.gz |
Sync with recent KAME.
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
Diffstat (limited to 'usr.sbin/mld6query/mld6.c')
-rw-r--r-- | usr.sbin/mld6query/mld6.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/mld6query/mld6.c b/usr.sbin/mld6query/mld6.c index 473e0f4..9b0b30a 100644 --- a/usr.sbin/mld6query/mld6.c +++ b/usr.sbin/mld6query/mld6.c @@ -1,3 +1,6 @@ +/* $KAME: mld6.c,v 1.11 2001/05/13 15:45:07 suz Exp $ */ +/* $FreeBSD$ */ + /* * Copyright (C) 1998 WIDE Project. * All rights reserved. @@ -75,7 +78,7 @@ main(int argc, char *argv[]) int ch; type = MLD6_LISTENER_QUERY; - while ((ch = getopt(argc, argv, "d")) != EOF) { + while ((ch = getopt(argc, argv, "dr")) != -1) { switch (ch) { case 'd': type = MLD6_LISTENER_DONE; @@ -98,7 +101,7 @@ main(int argc, char *argv[]) ifindex = (u_short)if_nametoindex(argv[0]); if (ifindex == 0) usage(); - if (argc == 3 && inet_pton(AF_INET6, argv[1], &maddr) != 1) + if (argc == 2 && inet_pton(AF_INET6, argv[1], &maddr) != 1) usage(); if ((s = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) @@ -188,7 +191,7 @@ make_msg(int index, struct in6_addr *addr, u_int type) m.msg_control = (caddr_t)cmsgbuf; m.msg_controllen = cmsglen; /* specify the outgoing interface */ - cmsgp->cmsg_len = CMSG_SPACE(sizeof(struct in6_pktinfo)); + cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); cmsgp->cmsg_level = IPPROTO_IPV6; cmsgp->cmsg_type = IPV6_PKTINFO; pi = (struct in6_pktinfo *)CMSG_DATA(cmsgp); |