Happy Holidays! In article <[EMAIL PROTECTED]> (at Sun, 10 Dec 2006 22:50:55 -0800 (PST)), David Miller <[EMAIL PROTECTED]> says:
> From: YOSHIFUJI Hideaki <[EMAIL PROTECTED]> > Date: Tue, 05 Dec 2006 20:02:42 +0900 (JST) > > > In article <[EMAIL PROTECTED]> (at Tue, 5 Dec 2006 19:03:27 +0900), > > Masahide NAKAMURA <[EMAIL PROTECTED]> says: > > > > > Add checksum default defines for mobility header(MH). > > > As the result kernel's behavior is to handle MH checksum > > > as default. > > > > I'd like to hold this on. I need to check RFC. > > Is there any resolution about this? Sorry to have kept you waiting. According to RFC4584 (Extension to Sockets API for Mobile IPv6) Section 6.1 (Receiving and Sending Mobility Header Messages), an implementation that supports the Mobile IPv6 API must implement Mobility Header API checksum calculations by default at the kernel. This is true in our kernel so far because we always performs it in net/ipv6/raw.c:mip6_mh_filter(). However, the default value for IPV6_CHECKSUM socket option was not 4 but -1, which is inconsistent. So, the proposed patch tried changing the default for IPV6_CHECKSUM. But, wait... currently, we cannot disable checksumming by IPV6_CHECKSUM for IPPROTO_MH sockets while we can do it for IPPROTO_ICMPV6 sockets. This is still not good. RFC3775 Section 9.2 (Processing Mobility Headers) says that Mobile IPv6 implementation must observe the following items: - Checksum (-> silently discard) Note: calculated by the common IPv6 checksum algorithm and its offset in MH is 4. - MH Type (-> Binding Error) - Payload protocol (-> ICMPv6 Parameter Problem) - Length (-> ICMPv6 Parameter Problem) Note: The order of these checks is not specified. In Linux, mip6_mh_filter() performs basic checks for Mobile Header, which corresponds to RFC3775 Section 9.2: - Length (depends on MH type) - Checksum - Payload protocol Note: MH is checked in user-space daemon, to send BE. If it is okay to defer the checksumming after checking the next header protocol, we can omit the checksumming in mip6_mh_filter(), and leave it to rawv6_rcv() and rawv6_recvmsg(). Anyway, we have 4 options. 1. IPV6_CHECKSUM default for IPPROTO_MH == 4 omit checksumming in mip6_mh_filter() 2. IPV6_CHECKSUM default for IPPROTO_MH == -1 omit checksumming in mip6_mh_filter() 3. IPV6_CHECKSUM for IPPROTO_MH == 4 always perform checksumming in mip6_mh_filter() 4. IPV6_CHECKSUM default for IPPROTO_MH == -1 always perform checksumming in mip6_mh_filter() Current behavior is 4, but it is not appropriate. I guess 1 is the way to go. Another question may arise; is it okay to change the default if the raw socket for Mobility Header is NOT for user-space daemon? or, is it okay to have two different default value depending on CONFIG_IPV6_MIP6? If we take these question seriously, we should take 2. Note: in any case, all IPPROTO_MH raw socket users should explicitly set IPV6_CHECKSUM socket option. Opinions? Objections? -- YOSHIFUJI Hideaki @ USAGI Project <[EMAIL PROTECTED]> GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html