YOSHIFUJI Hideaki / $B5HF#1QL@ wrote:
I didn't this because there are several places which depend on u8.
If we go this way, we need to fix other places as well. e.g.
net/ipv4/raw.c:raw_probe_proto_opt()
get_user(fl->fl_icmp_type, type);
__get_user(fl->fl_icmp_code, code);
On x86_64 both care only about the pointer type, not the target type.
net/ipv4/xfrm4_policy.c:_decode_session4()
u8 *icmp = xprth;
fl->fl_icmp_type = icmp[0];
fl->fl_icmp_code = icmp[1];
No problem here.
net/ipv6/raw.c:rawv6_probe_proto_opt()
Same as IPv4.
net/ipv6/netfilter/ip6t_REJECT.c:send_unreach()
Not in mainline :)
net/ipv6/xfrm6_policy.c:_decode_session6()
Same as IPv4.
net/ipv6/ndisc.c:ndisc_flow_init()
fl->fl_icmp_type = type;
fl->fl_icmp_code = 0;
No problem.
net/ipv6/icmp.c:icmpv6_send()
fl.fl_icmp_type = type;
fl.fl_icmp_code = code;
Also ok.
net/ipv6/icmp.c:icmpv6_echo_reply()
fl.fl_icmp_type = ICMPV6_ECHO_REPLY;
Same here.
(Note that type and code are stored in network-byte order.)
Both are u8 so there is no byte order.
Regards
Patrick
|