net: Make flowi ports AF dependent.

Create two sets of port member accessors, one set prefixed by fl4_*
and the other prefixed by fl6_*

This will let us to create AF optimal flow instances.

It will work because every context in which we access the ports,
we have to be fully aware of which AF the flowi is anyways.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2011-03-12 00:43:55 -05:00
parent 08704bcbf0
commit 6281dcc94a
28 changed files with 139 additions and 129 deletions

View File

@ -694,8 +694,8 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
code = iov->iov_base;
if (type && code) {
if (get_user(fl->fl_icmp_type, type) ||
get_user(fl->fl_icmp_code, code))
if (get_user(fl->fl6_icmp_type, type) ||
get_user(fl->fl6_icmp_code, code))
return -EFAULT;
probed = 1;
}
@ -706,7 +706,7 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
/* check if type field is readable or not. */
if (iov->iov_len > 2 - len) {
u8 __user *p = iov->iov_base;
if (get_user(fl->fl_mh_type, &p[2 - len]))
if (get_user(fl->fl6_mh_type, &p[2 - len]))
return -EFAULT;
probed = 1;
} else