1 From 614408895d331467612a0f4ea60753b1fe5e4ce8 Mon Sep 17 00:00:00 2001
2 From: David van Moolenbroek <david@minix3.org>
3 Date: Thu, 2 Feb 2017 18:45:05 +0000
4 Subject: [PATCH 3/4] MINIX 3 only: ignore IPv6 Router Advertisements
6 For MINIX 3, there are two reasons why Router Advertisement messages
7 should be ignored altogether, depending on the role of the system:
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.
17 A negative side effect of this change is that in the host scenario,
18 lwIP is no longer less likely to evict entries for routers from its
19 neighbor cache. This is an issue only on locally attached networks
20 and should not pose many problems in practice. The entries will also
21 no longer show up as router entries in ndp(8) output.
23 src/core/ipv6/icmp6.c | 2 ++
24 1 file changed, 2 insertions(+)
26 diff --git a/src/core/ipv6/icmp6.c b/src/core/ipv6/icmp6.c
27 index 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 */