Skip to content

Commit 85f1e7c

Browse files
Haishuang Yanummakynes
authored andcommitted
netfilter: ipv6: unnecessary to check whether ip6_route_output() returns NULL
ip6_route_output() never returns NULL, so it is not appropriate to check if the return value is NULL. Signed-off-by: Haishuang Yan <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 8fef24c commit 85f1e7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/netfilter/nf_reject_ipv6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook)
158158
fl6.fl6_dport = otcph->source;
159159
security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6));
160160
dst = ip6_route_output(net, NULL, &fl6);
161-
if (dst == NULL || dst->error) {
161+
if (dst->error) {
162162
dst_release(dst);
163163
return;
164164
}

0 commit comments

Comments
 (0)