aboutsummaryrefslogtreecommitdiffstats
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 18:08:46 -0500
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)
899 * Create a UDP header 899 * Create a UDP header
900 */ 900 */
901 uh = udp_hdr(skb); 901 uh = udp_hdr(skb);
902 uh->source = fl->fl_ip_sport; 902 uh->source = fl->fl6_sport;
903 uh->dest = fl->fl_ip_dport; 903 uh->dest = fl->fl6_dport;
904 uh->len = htons(up->len); 904 uh->len = htons(up->len);
905 uh->check = 0; 905 uh->check = 0;
906 906
@@ -1036,7 +1036,7 @@ do_udp_sendmsg:
1036 if (sin6->sin6_port == 0) 1036 if (sin6->sin6_port == 0)
1037 return -EINVAL; 1037 return -EINVAL;
1038 1038
1039 fl.fl_ip_dport = sin6->sin6_port; 1039 fl.fl6_dport = sin6->sin6_port;
1040 daddr = &sin6->sin6_addr; 1040 daddr = &sin6->sin6_addr;
1041 1041
1042 if (np->sndflow) { 1042 if (np->sndflow) {
@@ -1065,7 +1065,7 @@ do_udp_sendmsg:
1065 if (sk->sk_state != TCP_ESTABLISHED) 1065 if (sk->sk_state != TCP_ESTABLISHED)
1066 return -EDESTADDRREQ; 1066 return -EDESTADDRREQ;
1067 1067
1068 fl.fl_ip_dport = inet->inet_dport; 1068 fl.fl6_dport = inet->inet_dport;
1069 daddr = &np->daddr; 1069 daddr = &np->daddr;
1070 fl.fl6_flowlabel = np->flow_label; 1070 fl.fl6_flowlabel = np->flow_label;
1071 connected = 1; 1071 connected = 1;
@@ -1112,7 +1112,7 @@ do_udp_sendmsg:
1112 fl.fl6_dst.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ 1112 fl.fl6_dst.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */
1113 if (ipv6_addr_any(&fl.fl6_src) && !ipv6_addr_any(&np->saddr)) 1113 if (ipv6_addr_any(&fl.fl6_src) && !ipv6_addr_any(&np->saddr))
1114 ipv6_addr_copy(&fl.fl6_src, &np->saddr); 1114 ipv6_addr_copy(&fl.fl6_src, &np->saddr);
1115 fl.fl_ip_sport = inet->inet_sport; 1115 fl.fl6_sport = inet->inet_sport;
1116 1116
1117 final_p = fl6_update_dst(&fl, opt, &final); 1117 final_p = fl6_update_dst(&fl, opt, &final);
1118 if (final_p) 1118 if (final_p)