diff options
author | Sami Kerola <kerolasa@iki.fi> | 2018-10-31 20:01:56 +0000 |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2018-10-31 20:01:56 +0000 |
commit | 7d0014ad75927fab1a8639219d7e6c1edadb982e (patch) | |
tree | 4f79aa21e40148549dfa3af318f22b81485f8576 | |
parent | fc8781c488f99aa326de4b717228414612a14fb9 (diff) | |
download | iputils-7d0014ad75927fab1a8639219d7e6c1edadb982e.tar.gz |
ninfod: remove dead code
The only call to check_nigroup() has not been compiled in latest 13 releases
(from s20121125 to s20180629). It is time to remove the dead code.
Reference: 0ae42139342f47a5a62977346f095fd94e1508c2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r-- | ninfod/ninfod.h | 1 | ||||
-rw-r--r-- | ninfod/ninfod_core.c | 12 | ||||
-rw-r--r-- | ninfod/ninfod_name.c | 6 |
3 files changed, 0 insertions, 19 deletions
diff --git a/ninfod/ninfod.h b/ninfod/ninfod.h index ffa692c..eae052a 100644 --- a/ninfod/ninfod.h +++ b/ninfod/ninfod.h @@ -120,7 +120,6 @@ void init_nodeinfo_ipv4addr(INIT_ARGS __attribute__((__unused__))); int pr_nodeinfo_ipv4addr(CHECKANDFILL_ARGS); /* ninfod_name.c */ -int check_nigroup(const struct in6_addr *addr); void init_nodeinfo_nodename(INIT_ARGS); int pr_nodeinfo_nodename(CHECKANDFILL_ARGS); diff --git a/ninfod/ninfod_core.c b/ninfod/ninfod_core.c index 717ef61..48cc42c 100644 --- a/ninfod/ninfod_core.c +++ b/ninfod/ninfod_core.c @@ -527,18 +527,6 @@ int pr_nodeinfo(struct packetcontext *p) free(p); return -1; } -#if 0 - /* Do not discard NI Queries to multicast address - * other than its own NI Group Address(es) by default. - */ - if (!check_nigroup(&p->pktinfo.ipi6_addr)) { - DEBUG(LOG_WARNING, - "Destination is link-local multicast address other than " - "NI Group address.\n"); - free(p); - return -1; - } -#endif } /* Step 1: Check length */ diff --git a/ninfod/ninfod_name.c b/ninfod/ninfod_name.c index 8694bd4..a70767c 100644 --- a/ninfod/ninfod_name.c +++ b/ninfod/ninfod_name.c @@ -134,12 +134,6 @@ static struct ipv6_mreq nigroup; /* ---------- */ /* Functions */ -int check_nigroup(const struct in6_addr *addr) -{ - return IN6_IS_ADDR_MULTICAST(&nigroup.ipv6mr_multiaddr) && - IN6_ARE_ADDR_EQUAL(&nigroup.ipv6mr_multiaddr, addr); -} - static int encode_dnsname(const char *name, char *buf, size_t buflen, int fqdn) |