When an IPv6 packet is received for a raw socket which has the
IPPROTO_IPV6 level socket option IPV6_CHECKSUM enabled and the checksum check fails, drop the message. Without this fix, an ICMP6 message was sent indicating a parameter problem. Thanks to bz@ for suggesting a way to simplify this fix. Reviewed by: bz@ MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D19969
This commit is contained in:
parent
3a9d0aca8a
commit
fb288770e8
@ -243,6 +243,12 @@ rip6_input(struct mbuf **mp, int *offp, int proto)
|
||||
in6_cksum(m, proto, *offp,
|
||||
m->m_pkthdr.len - *offp)) {
|
||||
RIP6STAT_INC(rip6s_badsum);
|
||||
/*
|
||||
* Drop the received message, don't send an
|
||||
* ICMP6 message. Set proto to IPPROTO_NONE
|
||||
* to achieve that.
|
||||
*/
|
||||
proto = IPPROTO_NONE;
|
||||
goto skip_2;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user