tun-dst could be NULL in case of incorrect action list
where set tunnel action is missing but packet is sent
to tunnel vport.
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
static inline struct ip_tunnel_info *ovs_skb_tunnel_info(struct sk_buff *skb)
{
- return &OVS_GSO_CB(skb)->tun_dst->u.tun_info;
+ if (likely(OVS_GSO_CB(skb)->tun_dst))
+ return &OVS_GSO_CB(skb)->tun_dst->u.tun_info;
+ else
+ return NULL;
}
static inline void ovs_skb_dst_drop(struct sk_buff *skb)