gtp: don't care if GTP socket is not yet ready in gtp_dev_xmit()

If we receive any packet, it will be just ignored. I don't find
any reason to prematurely drop this in the xmit patch.
This commit is contained in:
Pablo Neira Ayuso 2014-02-20 01:14:07 +01:00
parent e29789755f
commit 4e93f63f6f
1 changed files with 0 additions and 7 deletions

7
gtp.c
View File

@ -637,19 +637,12 @@ gtp_push_ip6hdr(struct sk_buff *skb, struct gtp_pktinfo *pktinfo)
static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct gtp_instance *gti = netdev_priv(dev);
struct udphdr *uh;
unsigned int payload_len;
struct gtp_pktinfo pktinfo;
unsigned int proto = ntohs(skb->protocol);
int err;
/* UDP socket not initialized, skip */
if (!gti->sock0) {
pr_info("xmit: no socket / need cfg, skipping\n");
return NETDEV_TX_OK;
}
rcu_read_lock();
switch (proto) {
case ETH_P_IP: