1From 614408895d331467612a0f4ea60753b1fe5e4ce8 Mon Sep 17 00:00:00 2001
2From: David van Moolenbroek <david@minix3.org>
3Date: Thu, 2 Feb 2017 18:45:05 +0000
4Subject: [PATCH 3/4] MINIX 3 only: ignore IPv6 Router Advertisements
5
6For MINIX 3, there are two reasons why Router Advertisement messages
7should be ignored altogether, depending on the role of the system:
8
9  1) if the MINIX 3 node is acting as a router, accepting such
10     messages from other nodes would constitute an RFC violation;
11  2) if the MINIX 3 node is acting as a host, processing of the Router
12     Advertisement messages is the responsibility of userland, and
13     dhcpcd(8) in particular; letting lwIP process them would only
14     serve to fill lwIP's local (default-router and prefix) tables,
15     which may then erroneously override our subnet routing decisions.
16
17A negative side effect of this change is that in the host scenario,
18lwIP is no longer less likely to evict entries for routers from its
19neighbor cache.  This is an issue only on locally attached networks
20and should not pose many problems in practice.  The entries will also
21no longer show up as router entries in ndp(8) output.
22---
23 src/core/ipv6/icmp6.c | 2 ++
24 1 file changed, 2 insertions(+)
25
26diff --git a/src/core/ipv6/icmp6.c b/src/core/ipv6/icmp6.c
27index 13416bd..51b6705 100644
28--- a/src/core/ipv6/icmp6.c
29+++ b/src/core/ipv6/icmp6.c
30@@ -117,7 +117,9 @@ icmp6_input(struct pbuf *p, struct netif *inp)
31   switch (icmp6hdr->type) {
32   case ICMP6_TYPE_NA: /* Neighbor advertisement */
33   case ICMP6_TYPE_NS: /* Neighbor solicitation */
34+#if !defined(__minix)
35   case ICMP6_TYPE_RA: /* Router advertisement */
36+#endif /* !defined(__minix) */
37   case ICMP6_TYPE_RD: /* Redirect */
38   case ICMP6_TYPE_PTB: /* Packet too big */
39     nd6_input(p, inp);
40--
412.5.2
42
43