diff options
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 8b1c9bd0091e..c2169b47ddfd 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -85,6 +85,8 @@ | |||
85 | 85 | ||
86 | int sysctl_ip_default_ttl = IPDEFTTL; | 86 | int sysctl_ip_default_ttl = IPDEFTTL; |
87 | 87 | ||
88 | static int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)); | ||
89 | |||
88 | /* Generate a checksum for an outgoing IP datagram. */ | 90 | /* Generate a checksum for an outgoing IP datagram. */ |
89 | __inline__ void ip_send_check(struct iphdr *iph) | 91 | __inline__ void ip_send_check(struct iphdr *iph) |
90 | { | 92 | { |
@@ -202,6 +204,11 @@ static inline int ip_finish_output2(struct sk_buff *skb) | |||
202 | 204 | ||
203 | static inline int ip_finish_output(struct sk_buff *skb) | 205 | static inline int ip_finish_output(struct sk_buff *skb) |
204 | { | 206 | { |
207 | #if defined(CONFIG_NETFILTER) && defined(CONFIG_XFRM) | ||
208 | /* Policy lookup after SNAT yielded a new policy */ | ||
209 | if (skb->dst->xfrm != NULL) | ||
210 | return xfrm4_output_finish(skb); | ||
211 | #endif | ||
205 | if (skb->len > dst_mtu(skb->dst) && | 212 | if (skb->len > dst_mtu(skb->dst) && |
206 | !(skb_shinfo(skb)->ufo_size || skb_shinfo(skb)->tso_size)) | 213 | !(skb_shinfo(skb)->ufo_size || skb_shinfo(skb)->tso_size)) |
207 | return ip_fragment(skb, ip_finish_output2); | 214 | return ip_fragment(skb, ip_finish_output2); |
@@ -409,7 +416,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) | |||
409 | * single device frame, and queue such a frame for sending. | 416 | * single device frame, and queue such a frame for sending. |
410 | */ | 417 | */ |
411 | 418 | ||
412 | int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) | 419 | static int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) |
413 | { | 420 | { |
414 | struct iphdr *iph; | 421 | struct iphdr *iph; |
415 | int raw = 0; | 422 | int raw = 0; |
@@ -1391,7 +1398,6 @@ void __init ip_init(void) | |||
1391 | #endif | 1398 | #endif |
1392 | } | 1399 | } |
1393 | 1400 | ||
1394 | EXPORT_SYMBOL(ip_fragment); | ||
1395 | EXPORT_SYMBOL(ip_generic_getfrag); | 1401 | EXPORT_SYMBOL(ip_generic_getfrag); |
1396 | EXPORT_SYMBOL(ip_queue_xmit); | 1402 | EXPORT_SYMBOL(ip_queue_xmit); |
1397 | EXPORT_SYMBOL(ip_send_check); | 1403 | EXPORT_SYMBOL(ip_send_check); |