Permalink
Browse files

ignore "unrecognized" router alert options so that the router can

forward packets containing such a router alert option.  Actually, this code
only treats IP6OPT_RTALERT_MLD as "recognized".

pointed out by Andrew McDonald
  • Loading branch information...
1 parent 070ed03 commit e0778297a4dade56716d785412d19ae6d49bef01 jinmei committed Apr 8, 2007
Showing with 19 additions and 5 deletions.
  1. +19 −5 kame/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $KAME: ip6_input.c,v 1.369 2006/11/14 07:37:00 itojun Exp $ */
+/* $KAME: ip6_input.c,v 1.370 2007/04/08 17:04:31 jinmei Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -974,11 +974,25 @@ ip6_input(m)
nxt = hbh->ip6h_nxt;
/*
- * accept the packet if a router alert option is included
- * and we act as an IPv6 router.
+ * If we are acting as a router and the packet contains a
+ * router alert option, see if we know the option value.
+ * Currently, we only support the option value for MLD, in which
+ * case we should pass the packet to the multicast routing
+ * daemon.
*/
- if (rtalert != ~0 && ip6_forwarding)
- ours = 1;
+ if (rtalert != ~0 && ip6_forwarding) {
+ switch (rtalert) {
+ case IP6OPT_RTALERT_MLD:
+ ours = 1;
+ break;
+ default:
+ /*
+ * RFC2711 requires unrecognized values must be
+ * silently ignored.
+ */
+ break;
+ }
+ }
} else
nxt = ip6->ip6_nxt;

0 comments on commit e077829

Please sign in to comment.