1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

handle IPv6 router alert option contained in an incoming packet per

option value so that unrecognized options are ignored as specified in RFC2711.
(packets containing an MLD router alert option are passed to the upper layer
as before).

Approved by: gnn (mentor), ume (mentor)
This commit is contained in:
JINMEI Tatuya 2007-05-14 17:56:13 +00:00
parent f629328d0a
commit 7eefde2c0c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169557

View File

@ -657,11 +657,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;