diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-03-20 03:17:45 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-03-20 03:17:45 +0000 |
commit | 2d093684d58910c0a1ef2138185415a8415c0c5a (patch) | |
tree | b4eb51d3a9405a92492498bddf3240ef3c4c54b5 /sys/netinet6/icmp6.c | |
parent | c5521f3866427c903a4d152dcce57fc8163c0150 (diff) |
change interpretation of net.inet6.icmp6.nodeinfo from true/fale to bitmap.
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r-- | sys/netinet6/icmp6.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 0b16830d133..5ecee10780c 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,5 +1,5 @@ -/* $OpenBSD: icmp6.c,v 1.34 2001/03/08 00:18:36 itojun Exp $ */ -/* $KAME: icmp6.c,v 1.203 2001/03/08 00:17:54 itojun Exp $ */ +/* $OpenBSD: icmp6.c,v 1.35 2001/03/20 03:17:44 itojun Exp $ */ +/* $KAME: icmp6.c,v 1.204 2001/03/20 02:44:39 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -703,6 +703,9 @@ icmp6_input(mp, offp, proto) u_char *p; int maxlen, maxhlen; + if ((icmp6_nodeinfo & 1) == 0) + break; + if (code != 0) goto badcode; maxlen = sizeof(*nip6) + sizeof(*nicmp6) + 4; @@ -1379,6 +1382,18 @@ ni6_input(m, off) break; } + /* refuse based on configuration. XXX ICMP6_NI_REFUSED? */ + switch (qtype) { + case NI_QTYPE_FQDN: + if ((icmp6_nodeinfo & 1) == 0) + goto bad; + break; + case NI_QTYPE_NODEADDR: + if ((icmp6_nodeinfo & 2) == 0) + goto bad; + break; + } + /* guess reply length */ switch (qtype) { case NI_QTYPE_NOOP: |