summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/ip_gre.c5
-rw-r--r--net/ipv6/ip6_gre.c4
2 files changed, 0 insertions, 9 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 78365094f56c..b61f2285816d 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -313,11 +313,6 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
return PACKET_REJECT;
md = ip_tunnel_info_opts(&tun_dst->u.tun_info);
- if (!md) {
- dst_release((struct dst_entry *)tun_dst);
- return PACKET_REJECT;
- }
-
memcpy(md, pkt_md, sizeof(*md));
md->version = ver;
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 97f148f15429..b345b7e484c5 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -550,10 +550,6 @@ static int ip6erspan_rcv(struct sk_buff *skb, int gre_hdr_len,
info = &tun_dst->u.tun_info;
md = ip_tunnel_info_opts(info);
- if (!md) {
- dst_release((struct dst_entry *)tun_dst);
- return PACKET_REJECT;
- }
memcpy(md, pkt_md, sizeof(*md));
md->version = ver;