diff options
| -rw-r--r-- | net/ipv6/netfilter.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index 30fcee465448..8992cf6651d4 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
| @@ -100,9 +100,16 @@ static int nf_ip6_route(struct net *net, struct dst_entry **dst, | |||
| 100 | .pinet6 = (struct ipv6_pinfo *) &fake_pinfo, | 100 | .pinet6 = (struct ipv6_pinfo *) &fake_pinfo, |
| 101 | }; | 101 | }; |
| 102 | const void *sk = strict ? &fake_sk : NULL; | 102 | const void *sk = strict ? &fake_sk : NULL; |
| 103 | 103 | struct dst_entry *result; | |
| 104 | *dst = ip6_route_output(net, sk, &fl->u.ip6); | 104 | int err; |
| 105 | return (*dst)->error; | 105 | |
| 106 | result = ip6_route_output(net, sk, &fl->u.ip6); | ||
| 107 | err = result->error; | ||
| 108 | if (err) | ||
| 109 | dst_release(result); | ||
| 110 | else | ||
| 111 | *dst = result; | ||
| 112 | return err; | ||
| 106 | } | 113 | } |
| 107 | 114 | ||
| 108 | __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | 115 | __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, |
