Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rtadvd Punt dead code
details: https://anonhg.NetBSD.org/src/rev/971ba63c5de3
branches: trunk
changeset: 361266:971ba63c5de3
user: roy <roy%NetBSD.org@localhost>
date: Fri Apr 20 10:43:38 2018 +0000
description:
Punt dead code
diffstat:
usr.sbin/rtadvd/rtadvd.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diffs (45 lines):
diff -r 00d213a35c15 -r 971ba63c5de3 usr.sbin/rtadvd/rtadvd.c
--- a/usr.sbin/rtadvd/rtadvd.c Fri Apr 20 10:39:37 2018 +0000
+++ b/usr.sbin/rtadvd/rtadvd.c Fri Apr 20 10:43:38 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtadvd.c,v 1.61 2018/04/20 10:39:37 roy Exp $ */
+/* $NetBSD: rtadvd.c,v 1.62 2018/04/20 10:43:38 roy Exp $ */
/* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */
/*
@@ -716,9 +716,6 @@
{
ssize_t i;
int *hlimp = NULL;
-#ifdef OLDRAWSOCKET
- struct ip6_hdr *ip;
-#endif
struct icmp6_hdr *icp;
int ifindex = 0;
struct cmsghdr *cm;
@@ -791,17 +788,6 @@
return;
}
-#ifdef OLDRAWSOCKET
- if ((size_t)i < sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr)) {
- logit(LOG_ERR,
- "%s: packet size(%d) is too short",
- __func__, i);
- return;
- }
-
- ip = (struct ip6_hdr *)rcvmhdr.msg_iov[0].iov_base;
- icp = (struct icmp6_hdr *)(ip + 1); /* XXX: ext. hdr? */
-#else
if ((size_t)i < sizeof(struct icmp6_hdr)) {
logit(LOG_ERR,
"%s: packet size(%zd) is too short",
@@ -810,7 +796,6 @@
}
icp = (struct icmp6_hdr *)rcvmhdr.msg_iov[0].iov_base;
-#endif
switch (icp->icmp6_type) {
case ND_ROUTER_SOLICIT:
Home |
Main Index |
Thread Index |
Old Index