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:
parent
7ce35c288a
commit
3b02a8ea6a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user