summaryrefslogtreecommitdiff
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 00:43:55 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 15:08:46 -0800
commit6281dcc94a96bd73017b2baa8fa83925405109ef (patch)
tree8deee4d66d256d10ea25f66520eb96b1fade1545 /net/ipv6/udp.c
parent08704bcbf022786532b5f188935ab6619906049f (diff)
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>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 91f8047463ec..dad035fb0afd 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -899,8 +899,8 @@ static int udp_v6_push_pending_frames(struct sock *sk)
* Create a UDP header
*/
uh = udp_hdr(skb);
- uh->source = fl->fl_ip_sport;
- uh->dest = fl->fl_ip_dport;
+ uh->source = fl->fl6_sport;
+ uh->dest = fl->fl6_dport;
uh->len = htons(up->len);
uh->check = 0;
@@ -1036,7 +1036,7 @@ do_udp_sendmsg:
if (sin6->sin6_port == 0)
return -EINVAL;
- fl.fl_ip_dport = sin6->sin6_port;
+ fl.fl6_dport = sin6->sin6_port;
daddr = &sin6->sin6_addr;
if (np->sndflow) {
@@ -1065,7 +1065,7 @@ do_udp_sendmsg:
if (sk->sk_state != TCP_ESTABLISHED)
return -EDESTADDRREQ;
- fl.fl_ip_dport = inet->inet_dport;
+ fl.fl6_dport = inet->inet_dport;
daddr = &np->daddr;
fl.fl6_flowlabel = np->flow_label;
connected = 1;
@@ -1112,7 +1112,7 @@ do_udp_sendmsg:
fl.fl6_dst.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */
if (ipv6_addr_any(&fl.fl6_src) && !ipv6_addr_any(&np->saddr))
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
- fl.fl_ip_sport = inet->inet_sport;
+ fl.fl6_sport = inet->inet_sport;
final_p = fl6_update_dst(&fl, opt, &final);
if (final_p)