aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 03:00:33 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 18:08:54 -0500
commit9cce96df5b76691712dba22e83ff5efe900361e1 (patch)
treeeecf99e64c6866af944e1e1644d87737392b2da2 /net/ipv4/xfrm4_policy.c
parentf42454d632753d71ea1a2df09be7bbda32b6372d (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/xfrm4_policy.c')
-rw-r--r--net/ipv4/xfrm4_policy.c18
1 files changed, 9 insertions, 9 deletions
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 }