diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 03:00:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:54 -0500 |
commit | 9cce96df5b76691712dba22e83ff5efe900361e1 (patch) | |
tree | eecf99e64c6866af944e1e1644d87737392b2da2 /net/ipv4 | |
parent | f42454d632753d71ea1a2df09be7bbda32b6372d (diff) |
net: Put fl4_* macros to struct flowi4 and use them again.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/icmp.c | 4 | ||||
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 4 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_standalone.c | 4 | ||||
-rw-r--r-- | net/ipv4/raw.c | 4 | ||||
-rw-r--r-- | net/ipv4/syncookies.c | 4 | ||||
-rw-r--r-- | net/ipv4/udp.c | 10 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 18 |
8 files changed, 26 insertions, 26 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 8eca3c28cbc3..a91dc1611081 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -384,8 +384,8 @@ static struct rtable *icmp_route_lookup(struct net *net, struct sk_buff *skb_in, | |||
384 | .saddr = saddr, | 384 | .saddr = saddr, |
385 | .flowi4_tos = RT_TOS(tos), | 385 | .flowi4_tos = RT_TOS(tos), |
386 | .flowi4_proto = IPPROTO_ICMP, | 386 | .flowi4_proto = IPPROTO_ICMP, |
387 | .uli.icmpt.type = type, | 387 | .fl4_icmp_type = type, |
388 | .uli.icmpt.code = code, | 388 | .fl4_icmp_code = code, |
389 | }; | 389 | }; |
390 | struct rtable *rt, *rt2; | 390 | struct rtable *rt, *rt2; |
391 | int err; | 391 | int err; |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index beecc1272169..6c0b7f4a3d7d 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -365,8 +365,8 @@ struct dst_entry *inet_csk_route_req(struct sock *sk, | |||
365 | .flowi4_tos = RT_CONN_FLAGS(sk), | 365 | .flowi4_tos = RT_CONN_FLAGS(sk), |
366 | .flowi4_proto = sk->sk_protocol, | 366 | .flowi4_proto = sk->sk_protocol, |
367 | .flowi4_flags = inet_sk_flowi_flags(sk), | 367 | .flowi4_flags = inet_sk_flowi_flags(sk), |
368 | .uli.ports.sport = inet_sk(sk)->inet_sport, | 368 | .fl4_sport = inet_sk(sk)->inet_sport, |
369 | .uli.ports.dport = ireq->rmt_port, | 369 | .fl4_dport = ireq->rmt_port, |
370 | }; | 370 | }; |
371 | struct net *net = sock_net(sk); | 371 | struct net *net = sock_net(sk); |
372 | 372 | ||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 2b9cc40397ee..67f241b97649 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -1479,8 +1479,8 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar | |||
1479 | .daddr = daddr, | 1479 | .daddr = daddr, |
1480 | .saddr = rt->rt_spec_dst, | 1480 | .saddr = rt->rt_spec_dst, |
1481 | .flowi4_tos = RT_TOS(ip_hdr(skb)->tos), | 1481 | .flowi4_tos = RT_TOS(ip_hdr(skb)->tos), |
1482 | .uli.ports.sport = tcp_hdr(skb)->dest, | 1482 | .fl4_sport = tcp_hdr(skb)->dest, |
1483 | .uli.ports.dport = tcp_hdr(skb)->source, | 1483 | .fl4_dport = tcp_hdr(skb)->source, |
1484 | .flowi4_proto = sk->sk_protocol, | 1484 | .flowi4_proto = sk->sk_protocol, |
1485 | .flowi4_flags = ip_reply_arg_flowi_flags(arg), | 1485 | .flowi4_flags = ip_reply_arg_flowi_flags(arg), |
1486 | }; | 1486 | }; |
diff --git a/net/ipv4/netfilter/nf_nat_standalone.c b/net/ipv4/netfilter/nf_nat_standalone.c index 963320b295e2..7317bdf1d457 100644 --- a/net/ipv4/netfilter/nf_nat_standalone.c +++ b/net/ipv4/netfilter/nf_nat_standalone.c | |||
@@ -56,7 +56,7 @@ static void nat_decode_session(struct sk_buff *skb, struct flowi *fl) | |||
56 | t->dst.protonum == IPPROTO_UDPLITE || | 56 | t->dst.protonum == IPPROTO_UDPLITE || |
57 | t->dst.protonum == IPPROTO_DCCP || | 57 | t->dst.protonum == IPPROTO_DCCP || |
58 | t->dst.protonum == IPPROTO_SCTP) | 58 | t->dst.protonum == IPPROTO_SCTP) |
59 | fl4->uli.ports.dport = t->dst.u.tcp.port; | 59 | fl4->fl4_dport = t->dst.u.tcp.port; |
60 | } | 60 | } |
61 | 61 | ||
62 | statusbit ^= IPS_NAT_MASK; | 62 | statusbit ^= IPS_NAT_MASK; |
@@ -68,7 +68,7 @@ static void nat_decode_session(struct sk_buff *skb, struct flowi *fl) | |||
68 | t->dst.protonum == IPPROTO_UDPLITE || | 68 | t->dst.protonum == IPPROTO_UDPLITE || |
69 | t->dst.protonum == IPPROTO_DCCP || | 69 | t->dst.protonum == IPPROTO_DCCP || |
70 | t->dst.protonum == IPPROTO_SCTP) | 70 | t->dst.protonum == IPPROTO_SCTP) |
71 | fl4->uli.ports.sport = t->src.u.tcp.port; | 71 | fl4->fl4_sport = t->src.u.tcp.port; |
72 | } | 72 | } |
73 | } | 73 | } |
74 | #endif | 74 | #endif |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 452e178d962d..e837ffd3edc3 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -433,8 +433,8 @@ static int raw_probe_proto_opt(struct flowi4 *fl4, struct msghdr *msg) | |||
433 | code = iov->iov_base; | 433 | code = iov->iov_base; |
434 | 434 | ||
435 | if (type && code) { | 435 | if (type && code) { |
436 | if (get_user(fl4->uli.icmpt.type, type) || | 436 | if (get_user(fl4->fl4_icmp_type, type) || |
437 | get_user(fl4->uli.icmpt.code, code)) | 437 | get_user(fl4->fl4_icmp_code, code)) |
438 | return -EFAULT; | 438 | return -EFAULT; |
439 | probed = 1; | 439 | probed = 1; |
440 | } | 440 | } |
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index e3b5b754311c..8b44c6d2a79b 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -353,8 +353,8 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
353 | .flowi4_tos = RT_CONN_FLAGS(sk), | 353 | .flowi4_tos = RT_CONN_FLAGS(sk), |
354 | .flowi4_proto = IPPROTO_TCP, | 354 | .flowi4_proto = IPPROTO_TCP, |
355 | .flowi4_flags = inet_sk_flowi_flags(sk), | 355 | .flowi4_flags = inet_sk_flowi_flags(sk), |
356 | .uli.ports.sport = th->dest, | 356 | .fl4_sport = th->dest, |
357 | .uli.ports.dport = th->source, | 357 | .fl4_dport = th->source, |
358 | }; | 358 | }; |
359 | security_req_classify_flow(req, flowi4_to_flowi(&fl4)); | 359 | security_req_classify_flow(req, flowi4_to_flowi(&fl4)); |
360 | rt = ip_route_output_key(sock_net(sk), &fl4); | 360 | rt = ip_route_output_key(sock_net(sk), &fl4); |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 91cba3ca37c4..588f47af5faf 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -778,7 +778,7 @@ static int udp_push_pending_frames(struct sock *sk) | |||
778 | if (!skb) | 778 | if (!skb) |
779 | goto out; | 779 | goto out; |
780 | 780 | ||
781 | err = udp_send_skb(skb, fl4->daddr, fl4->uli.ports.dport); | 781 | err = udp_send_skb(skb, fl4->daddr, fl4->fl4_dport); |
782 | 782 | ||
783 | out: | 783 | out: |
784 | up->len = 0; | 784 | up->len = 0; |
@@ -918,8 +918,8 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
918 | .flowi4_proto = sk->sk_protocol, | 918 | .flowi4_proto = sk->sk_protocol, |
919 | .flowi4_flags = (inet_sk_flowi_flags(sk) | | 919 | .flowi4_flags = (inet_sk_flowi_flags(sk) | |
920 | FLOWI_FLAG_CAN_SLEEP), | 920 | FLOWI_FLAG_CAN_SLEEP), |
921 | .uli.ports.sport = inet->inet_sport, | 921 | .fl4_sport = inet->inet_sport, |
922 | .uli.ports.dport = dport, | 922 | .fl4_dport = dport, |
923 | }; | 923 | }; |
924 | struct net *net = sock_net(sk); | 924 | struct net *net = sock_net(sk); |
925 | 925 | ||
@@ -976,8 +976,8 @@ back_from_confirm: | |||
976 | fl4 = &inet->cork.fl.u.ip4; | 976 | fl4 = &inet->cork.fl.u.ip4; |
977 | fl4->daddr = daddr; | 977 | fl4->daddr = daddr; |
978 | fl4->saddr = saddr; | 978 | fl4->saddr = saddr; |
979 | fl4->uli.ports.dport = dport; | 979 | fl4->fl4_dport = dport; |
980 | fl4->uli.ports.sport = inet->inet_sport; | 980 | fl4->fl4_sport = inet->inet_sport; |
981 | up->pending = AF_INET; | 981 | up->pending = AF_INET; |
982 | 982 | ||
983 | do_append_data: | 983 | do_append_data: |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 30b312c577bc..13e0e7f659ff 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -119,8 +119,8 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
119 | pskb_may_pull(skb, xprth + 4 - skb->data)) { | 119 | pskb_may_pull(skb, xprth + 4 - skb->data)) { |
120 | __be16 *ports = (__be16 *)xprth; | 120 | __be16 *ports = (__be16 *)xprth; |
121 | 121 | ||
122 | fl4->uli.ports.sport = ports[!!reverse]; | 122 | fl4->fl4_sport = ports[!!reverse]; |
123 | fl4->uli.ports.dport = ports[!reverse]; | 123 | fl4->fl4_dport = ports[!reverse]; |
124 | } | 124 | } |
125 | break; | 125 | break; |
126 | 126 | ||
@@ -128,8 +128,8 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
128 | if (pskb_may_pull(skb, xprth + 2 - skb->data)) { | 128 | if (pskb_may_pull(skb, xprth + 2 - skb->data)) { |
129 | u8 *icmp = xprth; | 129 | u8 *icmp = xprth; |
130 | 130 | ||
131 | fl4->uli.icmpt.type = icmp[0]; | 131 | fl4->fl4_icmp_type = icmp[0]; |
132 | fl4->uli.icmpt.code = icmp[1]; | 132 | fl4->fl4_icmp_code = icmp[1]; |
133 | } | 133 | } |
134 | break; | 134 | break; |
135 | 135 | ||
@@ -137,7 +137,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
137 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { | 137 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { |
138 | __be32 *ehdr = (__be32 *)xprth; | 138 | __be32 *ehdr = (__be32 *)xprth; |
139 | 139 | ||
140 | fl4->uli.spi = ehdr[0]; | 140 | fl4->fl4_ipsec_spi = ehdr[0]; |
141 | } | 141 | } |
142 | break; | 142 | break; |
143 | 143 | ||
@@ -145,7 +145,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
145 | if (pskb_may_pull(skb, xprth + 8 - skb->data)) { | 145 | if (pskb_may_pull(skb, xprth + 8 - skb->data)) { |
146 | __be32 *ah_hdr = (__be32*)xprth; | 146 | __be32 *ah_hdr = (__be32*)xprth; |
147 | 147 | ||
148 | fl4->uli.spi = ah_hdr[1]; | 148 | fl4->fl4_ipsec_spi = ah_hdr[1]; |
149 | } | 149 | } |
150 | break; | 150 | break; |
151 | 151 | ||
@@ -153,7 +153,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
153 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { | 153 | if (pskb_may_pull(skb, xprth + 4 - skb->data)) { |
154 | __be16 *ipcomp_hdr = (__be16 *)xprth; | 154 | __be16 *ipcomp_hdr = (__be16 *)xprth; |
155 | 155 | ||
156 | fl4->uli.spi = htonl(ntohs(ipcomp_hdr[1])); | 156 | fl4->fl4_ipsec_spi = htonl(ntohs(ipcomp_hdr[1])); |
157 | } | 157 | } |
158 | break; | 158 | break; |
159 | 159 | ||
@@ -165,13 +165,13 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
165 | if (greflags[0] & GRE_KEY) { | 165 | if (greflags[0] & GRE_KEY) { |
166 | if (greflags[0] & GRE_CSUM) | 166 | if (greflags[0] & GRE_CSUM) |
167 | gre_hdr++; | 167 | gre_hdr++; |
168 | fl4->uli.gre_key = gre_hdr[1]; | 168 | fl4->fl4_gre_key = gre_hdr[1]; |
169 | } | 169 | } |
170 | } | 170 | } |
171 | break; | 171 | break; |
172 | 172 | ||
173 | default: | 173 | default: |
174 | fl4->uli.spi = 0; | 174 | fl4->fl4_ipsec_spi = 0; |
175 | break; | 175 | break; |
176 | } | 176 | } |
177 | } | 177 | } |